Home | Tutorials | Wiki | Issues
Ask Your Question
0

How is GetLinkById() supposed to work in Gazebo 1.3?

asked 2013-02-05 07:39:51 -0600

AndreiHaidu gravatar image

updated 2013-02-05 07:46:24 -0600

Hi,

After I upgraded to Gazebo 1.3 (from 1.2.5) I noticed the model->GetLink() function has changed. It does not overload anymore with the (string) link_name or with the (unsigned int) id arguments.

Now there are two functions GetLink(string link_name) and GetLinkByID(unsigned int _id). However the later GetLinkById() it doesn't work.
Is it a bug? Or am I not using it right, I used it for example with values 0 or 1 (0 being until now the first link of the model).

Code example:
this->model->GetLinkById(0)->GetName().c_str()

The error I get:

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.

Thanks, Andrei

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-02-05 11:23:21 -0600

nkoenig gravatar image

The ID of a link is a unique integer that is assigned when the Link is instantiated. The ID is primarily used for internal purposes.

edit flag offensive delete link more

Comments

Login/Signup to Answer

Question Tools

Stats

Asked: 2013-02-05 07:39:51 -0600

Seen: 132 times

Last updated: Feb 05 '13