0
$\begingroup$

Gazebo Answers logo

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 gazebo_ros_control, 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 gazebo::physics::World::ProcessMessages() ()
   from /usr/lib/libgazebo_physics.so.1
#9  0x00007ffff7367d68 in gazebo::physics::World::Step() ()
   from /usr/lib/libgazebo_physics.so.1
#10 0x00007ffff736913d in gazebo::physics::World::RunLoop() ()
   from /usr/lib/libgazebo_physics.so.1
#11 0x00007ffff5bb76e9 in ?? () from /usr/lib/libboost_thread.so.1.49.0
#12 0x00007ffff69f7f8e in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#13 0x00007ffff4f5da0d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Originally posted by mmw on Gazebo Answers with karma: 26 on 2014-05-27

Post score: 0


Original comments

Comment by Adolfo Rodríguez T on 2014-05-28:
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.

Comment by mmw on 2014-05-28:
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.

Comment by Adolfo Rodríguez T on 2014-05-28:
I'll try to give the tutorials a go and see if I can reproduce.

Comment by mmw on 2014-05-28:
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.

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

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.


Originally posted by mmw with karma: 26 on 2014-05-30

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Jose Luis Rivero on 2014-05-30:
It would be nice to improve error checking or reporting. gazebo_ros_control project lives at https://github.com/ros-simulation/gazebo_ros_pkgs. Could you also mark this answer as valid, clicking the check button at the left? Thanks.

Comment by mmw on 2014-05-30:
I would, but I don't have enough points.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.