Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Cannot Spawn URDF into gazebo using ros2

I am trying to load a URDF file into gazebo, and do so using a ros2 python launch file. This was easily done in the past with ros1 xml launch files, however I am having trouble doing the same with ros2 python launch files. I am able to launch gazebo from this ros2 launch file, however my robot model is not displaying. There are no errors, and says everything is processed cleanly though the robot does not appear. I am loading the xml data of the urdf to robot_state_publisher, and publishing the xml data on a topic. I then use the spawn_entity node to read the xml data from that topic. In my URDF I have built my robot using meshes, and I suspect that when passing the xml data to spawn_entity on a topic, the location or file in formation of those meshes are not completed transferred. I suspect this to be the case, because if I build a robot with out meshes and use basic geometries ( box, cylinder..) in the urdf, then everything works fine and I am able to spawn the robot from a urdf into gazebo using ros2.

I am running Ubunut 20.04, gazebo 11, ros2-foxy, and gazebo_ros_packages foxy branch

Here is the code:

image description

Here is the terminal ; image description

Any help would be greatly appreciated.

Here is a portion of the URDF. image description image description

Here is the result in Gazebo image description