Ask Your Question

rosservice call Gazebo get_link_properties fails "... responded with an error: " or crashes gzserver

asked 2012-07-26 03:35:51 -0600

dbworth gravatar image

updated 2012-07-26 03:41:20 -0600

Ubuntu 12.04

I'm having problems using:

rosservice call gazebo/get_joint_properties ...
rosservice call gazebo/get_link_properties ...

Firstly I am launching a Gazebo simulation, with spawns a urdf model in a world.
I have also found the same errors testing the NASA R2 simulation.

While Gazebo is running, I can successfully execute:

rosservice call gazebo/get_world_properties


rosservice call gazebo/get_model_properties '{model_name: MyModel}'

However, if I try to get the properties of a known link:

rosservice call gazebo/get_link_properties '{link_name: "link1"}'


rosservice call gazebo/get_link_properties '{link_name: "MyModel::link1"}'

I get the error:

ERROR: service [/gazebo/get_link_properties] responded with an error:

and if I try to get the properties of a non-existent link:

rosservice call gazebo/get_link_properties '{link_name: "blah"}'

I get the error:

ERROR: transport error completing service call: unable to receive data from sender, check sender's logs for details

but worse is that Gazebo crashes with:

gzserver: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T* boost::shared_ptr<T>::operator->() const [with T = gazebo::physics::Link]: Assertion `px != 0' failed.
Aborted (core dumped)
[empty_world_server-2] process has died [pid 22661, exit code 134, cmd /opt/ros/fuerte/stacks/simulator_gazebo/gazebo/scripts/gazebo /home/username/ros_workspace/my/ros/project/path/ __name:=empty_world_server __log:=/home/username/.ros/log/33194194-d723-11e1-9760-5c260a0c5681/empty_world_server-2.log].
log file: /home/username/.ros/log/33194194-d723-11e1-9760-5c260a0c5681/empty_world_server-2*.log

Similarly, trying a service call to gazebo/get_joint_properties also fails.

I recently updated all my ubuntu ros-fuerte packages, but I can't remember if this was working before that.

So, do I have the correct syntax? and why am I getting this error "ERROR: service [/gazebo/get_link_properties] responded with an error" ?
Can I trace the error in more detail?

Also if it is normal behaviour, maybe Gazebo shouldn't crash for unknown link/joint names.


edit retag flag offensive close merge delete


I get the same behavior when I try to use the GetLinkForce() and GetLinkTorque() methods in the Joint Class for plug-ins... maybe related? Does your log file ever print out?

mcevoyandy gravatar image mcevoyandy  ( 2012-07-26 10:53:16 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-11-21 04:28:44 -0600

wcaarls gravatar image

updated 2012-11-21 04:35:49 -0600

This is a problem with the Gazebo ROS API. In the Electric branch, looking up a link was coded (gazeboros.cpp)

gazebo::Body* body = dynamic_cast<gazebo::body*>(gazebo::World::Instance()->GetEntityByName(req.link_name));
if (body == NULL)

while in the Fuerte and Groovy branches it's (gazebo_ros_api_plugin.cpp)

gazebo::physics::LinkPtr body = boost::dynamic_pointer_cast<gazebo::physics::link>(this->world->GetEntity(req.link_name));
if (body)

The check is thus reversed, which shouldn't be the case. I've submitted a patch:

edit flag offensive delete link more



Should this be fixed in ROS Groovy? I am still having the same problem with gazebo/get_joint_properties in Groovy.

r0nald gravatar image r0nald  ( 2013-01-16 22:41:35 -0600 )edit

As far as I can tell, this has not been fixed in Groovy.

wcaarls gravatar image wcaarls  ( 2013-02-10 20:29:22 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-07-26 03:35:51 -0600

Seen: 1,091 times

Last updated: Nov 21 '12