Unable to convert URDF to sdf to use in Gazebo, but works fine in Rviz
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!
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.
@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.