rosservice call Gazebo get_link_properties fails "... responded with an error: " or crashes gzserver
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.
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?