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

you should be able to use:

math::Pose currentPose
currentPose=world->GetModel(i)->GetLink("link_name_from_urdf")->GetWorldPose();

since i can change even when loading the same urdf file, you can find i by something like:

world->GetModel(i)->GetName().find("model_name_in_gazebo")!=std::string::npos

check out the manipulating models world plugin example and the math page for some more info.

you should be able to use:

math::Pose currentPose
currentPose;
currentPose=world->GetModel(i)->GetLink("link_name_from_urdf")->GetWorldPose();

since i can change even when loading the same urdf file, you can find i by something like:

world->GetModel(i)->GetName().find("model_name_in_gazebo")!=std::string::npos
if (world->GetModel(i)->GetName().find("model_name_in_gazebo")!=std::string::npos) { }

check out the manipulating models world plugin example and the math page for some more info.