How to load urdf.xacro in ros-noetic?
I trid two ways(way1 and way2) to load urdf ,it's all ok in ros-kinetic(ubuntn16.04);but the ways all failed in ros-noetic(ubuntu20.04).What can I do to solve this problem?
when test in ros-noetic,I get:
ylh@ylh:~$ roslaunch test test.launch
... logging to /home/ylh/.ros/log/151c452e-a09c-11ea-9172-8f7723f9d611/roslaunch-ylh-25551.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.
No such file or directory: /home/ylh/catkin_ws/src/arobot_ws/test/urdf/test.urdf.xacro [Errno 2] No such file or directory: '/home/ylh/catkin_ws/src/arobot_ws/test/urdf/test.urdf.xacro'
RLException: Invalid <param> tag: Cannot load command parameter [robot_description]: command [['/opt/ros/noetic/lib/xacro/xacro', '/home/ylh/catkin_ws/src/arobot_ws/test/urdf/test.urdf.xacro']] returned with code [2].
Param xml is
(way1) param name="robot_description" command="$(find xacro)/xacro '$(find test)/urdf/test.urdf.xacro'"
The traceback for the exception was written to the log file
ylh@ylh:~$ roslaunch test test.launch
... logging to /home/ylh/.ros/log/3203c572-a09c-11ea-9172-8f7723f9d611/roslaunch-ylh-25605.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.
cat: /home/ylh/catkin_ws/src/arobot_ws/test/urdf/test.urdf.xacro: No such file or directory
RLException: Invalid <param> tag: Cannot load command parameter [robot_description]: command [['cat', '/home/ylh/catkin_ws/src/arobot_ws/test/urdf/test.urdf.xacro']] returned with code [1].
Param xml is
(way2) param name="robot_description" command="cat '$(find test)/urdf/test.urdf.xacro'"
The traceback for the exception was written to the log file
ylh@ylh:~$
test.urdf.xacro:
<robot xmlns:xacro = "http://www.ros.org/wiki/xacro" name="test">
<link name="base_link">
<visual>
<geometry>
<box size="1 1 0.1"/>
</geometry>
</visual>
<collision>
<geometry>
<box size="1 1 0.1"/>
</geometry>
</collision>
<inertial>
<mass value="40" />
<origin xyz="0 0 0" rpy="0 0 0"/>
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1" />
</inertial>
</link>
<joint name="wheel_to_base_link" type="continuous">
<parent link="base_link"/>
<child link="board"/>
<origin xyz="0 0 -0.4" rpy="0 0 0"/>
<axis xyz="0 1 0" rpy="0 0 0" />
</joint>
<link name="board">
<visual>
<geometry>
<cylinder length="0.1" radius="0.2"/>
</geometry>
<origin rpy="1.5707 0 0" xyz="0 0 0"/>
</visual>
<collision>
<geometry>
<cylinder length="0.1" radius="0.2"/>
</geometry>
<origin rpy="1.5707 0 0" xyz="0 0 0"/>
</collision>
<inertial>
<mass value="1" />
<origin xyz="0 0 0" rpy="0 0 0"/>
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1" />
</inertial>
</link>
< /robot >
What can I do to solve this ...