0
$\begingroup$

Rosanswers logo

Hi all,

I am new to ROS and was trying to follow along the urdf tutorials on URDF to create my own robot (a cart that should be pushed) and using it in Gazebo. I managed to create cart_v0.urdf.xacro that is visualized by

roslaunch urdf_tutorial display.launch model:=`rospack find reemc_cart`/urdf/cart_v0.urdf.xacro

like this (not enough karma to upload files). Then I try to

roslaunch urdf_sim_tutorial gazebo.launch model:=`rospack find reemc_cart`/urdf/cart_v0.urdf.xacro 

according to the next tutorial in order to spawn the model in Gazebo, producing this console output (this indicates that the spawn has been successful right?). However, the produced world is empty besides the ground_plane, supposedly created by Gazebo?

I already tried converting cart_v0.urdf.xacro to cart_v0.urdf by

xacro --inorder cart_v0.urdf.xacro > cart_v0.urdf`

to test it for sdf generating by Gazebo according to

gz sdf -p cart_v0.urdf

However, the generated sdf file just consists of a sdf version and model name:

<sdf version='1.6'>
  <model name='reemc_cart'/>
</sdf>

I suppose this is also the reason why the world is empty without Gazebo throwing warnings/errors, but have not been able to find anyone suffering from the same problem. Is the fact that Rviz is able to show my urdf file without warnings enough indication that the URDF file itself is not faulty? And if the URDF is not faulty, where should I start looking in order to use this URDF in Gazebo?

I'm running Ubuntu 16.04 with ROS Kinetic and an install according to the relevant REEM-C tutorial. I tried to adhere to the post guidelines, but if I forgot to attach relevant information, please indicate it and I'll try to add it.

Thanks in advance!


Originally posted by JJJ on ROS Answers with karma: 33 on 2019-09-20

Post score: 2


Original comments

Comment by kscottz on 2019-09-20:
I approved you as a user and your post. I believe you should be able to upload files now. Good job providing all the relevant information despite this.

Comment by gvdhoorn on 2019-09-21:
@kscottz: attaching images requires a minimum of 10 points. Just letting a user through the moderation queue does not change their karma, so @JJJ cannot post images.

@JJJ: I've given you sufficient karma to attach the images directly to your post.

Could you please also try to avoid using external pastebin like sites for linking to console output and/or .xacro files? Please include them also verbatim into your post. External sites tend to go away/die/don't have the retention we'd like, leaving your post with dead links in the future, reducing it's value significantly.

If files are long, place them at the end of your question text.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Could it be that you wrote <inertia> instead of <inertial>? For reference, this is also happening here.


Originally posted by aPonza with karma: 589 on 2019-09-23

This answer was ACCEPTED on the original site

Post score: 4


Original comments

Comment by Delb on 2019-09-23:
You are right, you can see this stated in the official documentation under the Required section.

And just to be clear, the inertia, mass and origin tags have to be contained in the tag inertial (urdf specification here).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.