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

Revision history [back]

click to hide/show revision 1
initial version

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/

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

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

NULL)

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

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

(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/