Gazebo | Ignition | Community
Ask Your Question

spawn a robot with .xacro file in c++

asked 2017-04-21 12:09:41 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi everyone

I plannning to spawn a robot by calling spawn_urdf_model service in C++. But the robot description format I used is .xacro rather .urdf. So, I am confused whether I can still assign the path of .xacro file to model_xml field? Or I need to do some conversion in C++ file.


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-04-21 12:56:14 -0600

eugene-katsevman gravatar image

updated 2017-04-21 12:57:08 -0600

You have to run xacro converter first. But if you do not modify you xacro model during simulation, you could run xacro just once, prior running gazebo in the launch-file. Then you could just swawn the urdf model.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-04-21 12:09:41 -0600

Seen: 466 times

Last updated: Apr 21 '17