小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
xacro
-
<robot name="my_base" xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:property name="PI" value="3.141"/> <material name="black"> <color rgba="0 0 0 1.0" /> </material> <xacro:property name="base_footprint_radius" value="0.001" /> <xacro:property name="base_link_radius" value="0.1" /> <xacro:property name="base_link_length" value="0.08" /> <xacro:property name="earth_space" value="0.015" /> <link name="base_footprint"> <visual> <geometry> <sphere radius="${base_footprint_radius}" /> </geometry> </visual> </link> <link name="base_link"> <visual> <geometry> <cylinder radius="${base_link_radius}" length="${base_link_length}" /> </geometry> <origin xyz="0 0 0" rpy="0 0 0" /> <material name="yellow"> <color rgba="0.5 0.3 0.0 0.5" /> </material> </visual> </link> <joint name="base_link2base_footprint" type="fixed"> <parent link="base_footprint" /> <child link="base_link" /> <origin xyz="0 0 ${earth_space + base_link_length / 2 }" /> </joint>
launch文件
<launch>
<param name="robot_description" command="$(find xacro)/xacro $(find urdf01_rviz)/urdf/xacro/demo02_test.xacro" />
<node pkg="rviz" name="rviz" type="rviz" args="-d $(find urdf01_rviz)/config/show_mycar.rviz" />
<node pkg="joint_state_publisher" name="joint_state_publisher" type="joint_state_publisher" />
<node pkg="robot_state_publisher" name="robot_state_publisher" type="robot_state_publisher" />
<node pkg="joint_state_publisher_gui" name="joint_state_publisher_gui" type="joint_state_publisher_gui" />
</launch>~/catkin_ws$ roslaunch urdf01_rviz demo01_test_xacro.launch
... logging to /home/amov/.ros/log/501cc910-c8a7-11ed-9417-1cc10cb8638e/roslaunch-amov-21757.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.XML parsing error: mismatched tag: line 74, column 10
when processing file: /home/amov/catkin_ws/src/urdf01_rviz/urdf/xacro/demo02_test.xacroCheck that:
- Your XML is well-formed
- You have the xacro xmlns declaration: xmlns:xacro="http://www.ros.org/wiki/xacro"
RLException: Invalid <param> tag: Cannot load command parameter [robot_description]: command [['/opt/ros/melodic/lib/xacro/xacro', '/home/amov/catkin_ws/src/urdf01_rviz/urdf/xacro/demo02_test.xacro']] returned with code [2].
Param xml is <param command="$(find xacro)/xacro $(find urdf01_rviz)/urdf/xacro/demo02_test.xacro" name="robot_description"/>
The traceback for the exception was written to the log file
amov@amov:~/catkin_ws$ source ./devel/setup.bash
amov@amov:~/catkin_ws$ roslaunch urdf01_rviz demo01_test_xacro.launch
... logging to /home/amov/.ros/log/b4f1aada-c8a8-11ed-9417-1cc10cb8638e/roslaunch-amov-22623.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.XML parsing error: mismatched tag: line 74, column 10
when processing file: /home/amov/catkin_ws/src/urdf01_rviz/urdf/xacro/demo02_test.xacroCheck that:
- Your XML is well-formed
- You have the xacro xmlns declaration: xmlns:xacro="http://www.ros.org/wiki/xacro"
RLException: Invalid <param> tag: Cannot load command parameter [robot_description]: command [['/opt/ros/melodic/lib/xacro/xacro', '/home/amov/catkin_ws/src/urdf01_rviz/urdf/xacro/demo02_test.xacro']] returned with code [2].
Param xml is <param command="$(find xacro)/xacro $(find urdf01_rviz)/urdf/xacro/demo02_test.xacro" name="robot_description"/>
The traceback for the exception was written to the log file
amov@amov:~/catkin_ws$ roslaunch urdf01_rviz demo01_test_xacro.launch
... logging to /home/amov/.ros/log/964a3ab0-c8a9-11ed-9417-1cc10cb8638e/roslaunch-amov-23038.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.XML parsing error: mismatched tag: line 74, column 10
when processing file: /home/amov/catkin_ws/src/urdf01_rviz/urdf/xacro/demo02_test.xacroCheck that:
- Your XML is well-formed
- You have the xacro xmlns declaration: xmlns:xacro="http://www.ros.org/wiki/xacro"
RLException: Invalid <param> tag: Cannot load command parameter [robot_description]: command [['/opt/ros/melodic/lib/xacro/xacro', '/home/amov/catkin_ws/src/urdf01_rviz/urdf/xacro/demo02_test.xacro']] returned with code [2].
Param xml is <param command="$(find xacro)/xacro $(find urdf01_rviz)/urdf/xacro/demo02_test.xacro" name="robot_description"/>
The traceback for the exception was written to the log file