Gazebo | Ignition | Community
Ask Your Question
0

gazebo_ros_control segfaults on load

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

mmw gravatar image

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

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.

<gazebo>
<plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
    <robotNamespace>/motoman_sia20d</robotNamespace>
</plugin>
</gazebo>

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 @ http://127.0.0.1:11345
Msg Publicized address: 192.168.0.10
[ 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/empty.world __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.

Edit:

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/libc.so.6
(gdb) bt
#0  0x00007ffff4fcd301 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff54fe69c in std::string::operator=(char const*) ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#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/libtransmission_interface_parser.so
#3  0x00007fff9028fa4c in gazebo_ros_control::GazeboRosControlPlugin::parseTransmissionsFromURDF(std::string const&) ()
   from /opt/ros/hydro/lib/libgazebo_ros_control.so
#4  0x00007fff9028d9d8 in gazebo_ros_control::GazeboRosControlPlugin::Load(boost::shared_ptr<gazebo::physics::Model>, boost::shared_ptr<sdf::Element>) ()
   from /opt/ros/hydro/lib/libgazebo_ros_control.so
#5  0x00007ffff7334609 in gazebo::physics::Model::LoadPlugin(boost::shared_ptr<sdf::Element>) () from /usr/lib/libgazebo_physics.so.1
#6  0x00007ffff73349c3 in gazebo::physics::Model::LoadPlugins() ()
   from /usr/lib/libgazebo_physics.so.1
#7  0x00007ffff73666ab in gazebo::physics::World::ProcessFactoryMsgs() ()
   from /usr/lib/libgazebo_physics.so.1
#8  0x00007ffff736777c in ...
(more)
edit retag flag offensive close merge delete

Comments

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 -0500 )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 -0500 )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 -0500 )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 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

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

mmw gravatar image

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

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

Comments

It would be nice to improve error checking or reporting. gazeboroscontrol project lives at https://github.com/ros-simulation/gazeborospkgs. 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 -0500 )edit

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

mmw gravatar imagemmw ( 2014-05-30 18:03:50 -0500 )edit

Question Tools

Stats

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

Seen: 2,804 times

Last updated: May 30 '14