ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

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

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

dbworth gravatar image

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

Ubuntu 12.04
Fuerte

Hi
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

and

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"}'

or

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/empty.world __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.

Thanks.

edit retag flag offensive close merge delete

Comments

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

1 Answer

Sort by ยป oldest newest most voted
1

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

wcaarls gravatar image

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

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:

https://code.ros.org/trac/ros-pkg/attachment/ticket/5580/

edit flag offensive delete link more

Comments

1

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

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

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

Question Tools

Stats

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

Seen: 1,644 times

Last updated: Nov 21 '12