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

How are link names referenced for gazebo/SetLinkState?

asked 2011-05-26 08:50:28 -0500

updated 2011-06-02 03:39:30 -0500

In trying to use gazebo/SetLinkState I can't seem to figure out what to call the links to get gazebo to recognize them. I use the names I see published on "/gazebo/link_states". But everytime I use a link name that I know exists, it always replies with:

SetLinkState: link [My/Link/Name/Here_link] does not exist

I've tried many permutations including prefixing the link name with the model/robot name like:

Robot_Name/My/Link/Name/Here_link

to no avail.

TLDR: How are link names referenced? What is the magic formula for getting gazebo to recognize link names?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2011-05-26 08:52:25 -0500

updated 2011-06-02 03:45:36 -0500

It turns out the scope token for models is '::' so to get it to work, the link has to be referenced using a string like:

Robot_Name::My/Link/Name/Here_link

Currently the /gazebo/link_states topic does not publish the root scope (e.g. Robot_Name:: ) but this has been patched and the scope will be published along with the name in "Electric Turtle".

A patch for gazeboros in diamondback is available here.

edit flag offensive delete link more

Comments

Next admin that sees this: Could you please mark this as the answer?
Asomerville gravatar image Asomerville  ( 2011-06-02 03:36:20 -0500 )edit
0

answered 2011-05-26 09:01:30 -0500

hsu gravatar image

It's implicitly defined in the tutorials but I'll add it to the message comment as well. Sorry about that.

edit flag offensive delete link more

Comments

Thanks. I just missed that because I was skimming and searching for set_link specific stuff without reading in between. Hard to know when to go depth first, or breadth first when searching for clues : )
Asomerville gravatar image Asomerville  ( 2011-05-26 09:11:39 -0500 )edit
btw is there a reason that the link state publisher on topic "/gazebo/link_states" does not use the same robot/model qualification?
Asomerville gravatar image Asomerville  ( 2011-05-26 11:22:23 -0500 )edit
that's an oversight. I've ticketed myself. https://code.ros.org/trac/ros-pkg/ticket/4972. Thanks for the patch, applied in electric turtle unstable trunk.
hsu gravatar image hsu  ( 2011-05-26 11:59:58 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2011-05-26 08:50:28 -0500

Seen: 1,729 times

Last updated: Jun 02 '11