近期尝试UR5和PhantomOmni的联动仿真出现的问题
最近在Github找到了几个代码,虽然代码是好几年前的,但经过尝试编译后有部分可以用,有部分有问题,现在拿一个来解释一下几年前的ROS很现在的ROS有什么变化,并且抛出一个问题代日后解决。
关于旧版的ROS代码如何编译
旧版的代码包和现在的代码包很大不同,其结构是
我们要把这些文件全都放到一个重新建立的文件夹/src
然后返回上一级文件夹,也就是/src
的上一级文件夹然后
catkin_make
这时候就像前几篇文章中那样,
#进入devel,source setup.bash
cd devel
source setup.bash
#roslaunch一下,这个就得根据实际情况好好地揣摩,一般是根据Project名称进入空间 然后 *****.launch,例如
roslaunch summer_gazebo ur5_robotiq_v6.launch
问题:在运行UR5模型的时候出现了一下报错:
Traceback (most recent call last):
File "/opt/ros/noetic/lib/xacro/xacro", line 33, in <module>
xacro.main()
File "/opt/ros/noetic/lib/python3/dist-packages/xacro/__init__.py", line 1153, in main
out.write(doc.toprettyxml(indent=' ', **encoding))
File "/usr/lib/python3.8/xml/dom/minidom.py", line 59, in toprettyxml
self.writexml(writer, "", indent, newl, encoding)
File "/usr/lib/python3.8/xml/dom/minidom.py", line 1797, in writexml
node.writexml(writer, indent, addindent, newl)
File "/usr/lib/python3.8/xml/dom/minidom.py", line 1185, in writexml
raise ValueError("'--' is not allowed in a comment node")
#以下的报错我觉得是关键
ValueError: '--' is not allowed in a comment node
RLException: while processing /home/***/01_Projects/DoubleOmni_12_25/Control-of-two-UR5s-by-two-phantom-omnies--master/UR5/src/summer/summer_description/launch/summer_upload.launch:
#这个Invalid应该是问题所在
Invalid <param> tag: Cannot load command parameter [robot_description]: command [['/opt/ros/noetic/lib/xacro/xacro', '/home/***/01_Projects/DoubleOmni_12_25/Control-of-two-UR5s-by-two-phantom-omnies--master/UR5/src/summer/summer_description/urdf/summer_robot.urdf.xacro']] returned with code [1].
Param xml is <param unless="$(arg limited)" name="robot_description" command="$(find xacro)/xacro '$(find summer_description)/urdf/summer_robot.urdf.xacro'"/>
The traceback for the exception was written to the log file
Invalid <param> tag: Cannot load command parameter [robot_description]: command [['/opt/ros/noetic/lib/xacro/xacro', ..........] ] return with code[1]