22.04.15

学习《机器人编程原理与应用》P152

执行

roslaunch mobot_urdf mobot_w_arm_and_jnt_pub.launch
... logging to /home/b/.ros/log/555b034e-bc67-11ec-b736-ff1a64f2f305/roslaunch-bb-6829.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.

RLException: Invalid <param> tag: Cannot load command parameter [robot_description]: no such command [['/opt/ros/noetic/share/xacro/xacro.py', '/home/b/rosstudy/rosws/src/learning_ros_noetic/Part_2/mobot_urdf/urdf/mobot_w_arm_and_jnt_pub.xacro']]. 

Param xml is <param name="robot_description" command="$(find xacro)/xacro.py '$(find mobot_urdf)/urdf/mobot_w_arm_and_jnt_pub.xacro'"/>
The traceback for the exception was written to the log file

找到下面文件

里面这句话

<param name="robot_description" command="$(find xacro)/xacro -i '$(find mobot_urdf)/urdf/mobot_w_arm_and_jnt_pub.xacro'" />

把里面 xacro.py修改为 xacro -i

再次运行成功。