unitreerobotics / unitree_ros

BSD 3-Clause "New" or "Revised" License
542 stars 249 forks source link

resource not found: a1_gazebo #35

Open smileyenot983 opened 2 years ago

smileyenot983 commented 2 years ago

When i am running roslaunch unitree_gazebo normal.launch rname:=a1`

It gives me the following errors: xacro: in-order processing became default in ROS Melodic. You can drop the option. resource not found: a1_gazebo ROS path [0]=/opt/ros/melodic/share/ros ROS path [1]=/home/ramil/catkin_ws/src ROS path [2]=/opt/ros/melodic/share when processing file: /home/ramil/catkin_ws/src/unitree_ros/robots/a1_description/xacro/robot.xacro RLException: Invalid tag: Cannot load command parameter [robot_description]: command [['/opt/ros/melodic/lib/xacro/xacro', '--inorder', '/home/ramil/catkin_ws/src/unitree_ros/robots/a1_description/xacro/robot.xacro', 'DEBUG:=false']] returned with code [2].

Param xml is The traceback for the exception was written to the log file

However, when i am running gazebo for laikago by writing roslaunch unitree_gazebo normal.launch rname:=laikago` everything works well

shirellm commented 2 years ago

I got the same problem for both a1 and go1

smileyenot983 commented 2 years ago

After investing some time into this problem it turned out that the problem is in xacro. The problem is that xacro parses all comments in .xacro files. Thus, if there is some path which does not exist xacro will return an error, even though it is commented. You can read about it here https://github.com/ros/xacro/pull/300 .Should be fixed soon. Issue may be closed.

smileyenot983 commented 2 years ago

I got the same problem for both a1 and go1

As a temporary fix you can just delete the comment in robot description xacro. In case of a1 it is <!-- <xacro:include filename="$(find a1_gazebo)/launch/stairs.urdf.xacro"/> -->

shirellm commented 2 years ago

worked thank you!