Ask Your Question
0

Check_urdf does not expand macros in Inertial: mass attribute correctly

asked 2017-07-12 05:48:51 -0500

ParthC gravatar image

(using Ubuntu 16.04 with ROS Kinetic full desktop install and Gazebo7)

Hi, I've been working on a URDF which works half decently in Gazebo & fully in RViz & joint_state_publisher(some links and joints aren't displayed in Gazebo) but fails to pass Model Parsing in check_urdf and urdf_to_graphiz. I discovered that for some reason both these packages are unable to parse if any attributes of mass or intertia are specified as xacro:property macros, but parse well if replaced by literals.

How can I try to make these macros work well in both Gazebo and the urdf parsers? Which gits should I be raising issues in? I checked some commercial well maintained URDF's (Clearpath Robotics Ridgeback & Gazebo-ROS-demos), both face the exact same issues despite running well in Gazebo & RViz.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-07-12 06:00:21 -0500

gvdhoorn gravatar image

updated 2017-07-12 06:16:09 -0500

I discovered that for some reason both these packages are unable to parse if any attributes of mass or intertia are specified as xacro:property macros, but parse well if replaced by literals.

This reads as if you are passing xacro to check_urdf and urdf_to_graphviz.

As far as I know those two tools only work with URDF, not xacro. So you'll have to first convert from xacro to urdf, and then pass it on to check_urdf and friends.

which works half decently in Gazebo & fully in RViz & joint_state_publisher

This probably works because whatever launch file loads your robot_description parameter uses something like the following:

<param name="robot_description" command="$(find xacro)/xacro '$(find your_pkg)/some_xacro_file.xacro'" />

that converts xacro to urdf and stores the result on the parameter server in one go.

How can I try to make these macros work well in both Gazebo and the urdf parsers?

That should be clear now.

Which gits should I be raising issues in? I checked some commercial well maintained URDF's (Clearpath Robotics Ridgeback & Gazebo-ROS-demos), both face the exact same issues despite running well in Gazebo & RViz

I don't think there is actually a problem to report.

Please try converting xacro to urdf and see whether that fixes your issue(s).

edit flag offensive delete link more

Comments

Thanks a lot, that fixed my issue!

ParthC gravatar imageParthC ( 2017-07-12 06:47:46 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-07-12 05:48:51 -0500

Seen: 37 times

Last updated: Jul 12 '17