Gazebo | Ignition | Community
Ask Your Question

gazebo_ros_control segfaults on load

asked 2014-05-27 14:57:51 -0600

mmw gravatar image

updated 2014-05-28 08:31:48 -0600

I’m currently trying to convert a robot urdf to a Gazebo-capable urdf using the tutorial
ROS Control with Gazebo. Things went well when adding <inertial> and <transmission> tags, and I could load my urdf into gazebo without problem until this last step.

I then added the following tag to my urdf as directed, so that ROS can interact with my gazebo robot.

<plugin name="gazebo_ros_control" filename="">

Unfortunately, after adding this tag gazebo_ros_control segfaults and brings gazebo down when loaded. I get the following unhelpful error message:

Msg Connected to gazebo master @
Msg Publicized address:
[ INFO] [1401218278.042023066, 0.464000000]: Physics dynamic reconfigure ready.
[spawn_urdf-3] process has finished cleanly
log file: /home/user/.ros/log/5d00190e-e5ce-11e3-8bb2-6cfdb9443545/spawn_urdf-3*.log
[ INFO] [1401218278.671392508, 0.464000000]: Loading gazebo_ros_control plugin
[ INFO] [1401218278.671556062, 0.464000000]: Starting gazebo_ros_control plugin in namespace: /
[ INFO] [1401218278.672528655, 0.464000000]: gazebo_ros_control plugin is waiting for model URDF in parameter [robot_description] on the ROS param server.
Segmentation fault (core dumped)
[gazebo-1] process has died [pid 3683, exit code 139, cmd /opt/ros/hydro/lib/gazebo_ros/gzserver worlds/ __name:=gazebo 
[gazebo_gui-2] process has finished cleanly

My urdf isn’t the only one that breaks. Trying to load the rrbot.xacro file from the provided example causes gazebo to segfault with the same message. The common factor seems to be gazeboroscontrol, which segfaults with no useful information after load.

Is there something I’m missing here? gazebo_ros_control is installed. I’m using the newest packages in the stable ros hydro ubuntu repository.

I’m not running any controller in the background. All my launch file does is load my urdf, start Gazebo, and load the urdf. The urdf is loaded to the robot_description topic, since Gazebo could access it before.


I'm running Gazebo 1.9.5, and gazebo_ros_control reports its version as 2.3.5.

ros-hydro-gazebo-ros-control package version: 2.3.5-1quantal-20140525-0057-+0000

gazebo package version: 1.9.5-1~quantal

Stack trace of gazebo crashing:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff917d7700 (LWP 8709)]
0x00007ffff4fcd301 in ?? () from /lib/x86_64-linux-gnu/
(gdb) bt
#0  0x00007ffff4fcd301 in ?? () from /lib/x86_64-linux-gnu/
#1  0x00007ffff54fe69c in std::string::operator=(char const*) ()
   from /usr/lib/x86_64-linux-gnu/
#2  0x00007fff9002a89c in transmission_interface::TransmissionParser::parse(std::string const&, std::vector<transmission_interface::TransmissionInfo, std::allocator<transmission_interface::TransmissionInfo> >&) ()
   from /opt/ros/hydro/lib/
#3  0x00007fff9028fa4c in gazebo_ros_control::GazeboRosControlPlugin::parseTransmissionsFromURDF(std::string const&) ()
   from /opt/ros/hydro/lib/
#4  0x00007fff9028d9d8 in gazebo_ros_control::GazeboRosControlPlugin::Load(boost::shared_ptr<gazebo::physics::Model>, boost::shared_ptr<sdf::Element>) ()
   from /opt/ros/hydro/lib/
#5  0x00007ffff7334609 in gazebo::physics::Model::LoadPlugin(boost::shared_ptr<sdf::Element>) () from /usr/lib/
#6  0x00007ffff73349c3 in gazebo::physics::Model::LoadPlugins() ()
   from /usr/lib/
#7  0x00007ffff73666ab in gazebo::physics::World::ProcessFactoryMsgs() ()
   from /usr/lib/
#8  0x00007ffff736777c in ...
edit retag flag offensive close merge delete


Could you please post the installed versions of the gazebo and ros-hydro-gazebo-ros-control packages?. Also, it would help if you could get a gdb backtrace of the crash.

Adolfo Rodríguez T gravatar imageAdolfo Rodríguez T ( 2014-05-28 03:01:18 -0600 )edit

I'm running Gazebo 1.9.5 and gazebo-ros-control 2.3.5.

I added the package versions and Gazebo's backtrace up above.

mmw gravatar imagemmw ( 2014-05-28 08:34:30 -0600 )edit

I'll try to give the tutorials a go and see if I can reproduce.

Adolfo Rodríguez T gravatar imageAdolfo Rodríguez T ( 2014-05-28 09:31:42 -0600 )edit

I got it to crash like this by grabbing rrbot description and then trying to load rrbot.xacro with either a launch file and by directly using spawn model, so that should work.

mmw gravatar imagemmw ( 2014-05-28 09:36:24 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2014-05-30 13:32:24 -0600

mmw gravatar image

updated 2014-05-30 13:32:41 -0600

I fixed it.

It turns out the tranmission tags in my urdf were wrong. I had a couple joints misnamed, and I had <type>SimpleTransmission</type> in my transmission tag instead of <type>transmission_interface/SimpleTransmission</type>.

If you are having a similar problem, note that gazebo_ros_control will segfault without a helpful error message if your transmission tags are wrong. I think it might be the same for other parts of the urdf too.

edit flag offensive delete link more


It would be nice to improve error checking or reporting. gazeboroscontrol project lives at Could you also mark this answer as valid, clicking the check button at the left? Thanks.

Jose Luis Rivero gravatar imageJose Luis Rivero ( 2014-05-30 17:59:47 -0600 )edit

I would, but I don't have enough points.

mmw gravatar imagemmw ( 2014-05-30 18:03:50 -0600 )edit
Login/Signup to Answer

Question Tools


Asked: 2014-05-27 14:57:51 -0600

Seen: 2,650 times

Last updated: May 30 '14