0
$\begingroup$

Gazebo Answers logo

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


Originally posted by AndreiHaidu on Gazebo Answers with karma: 2108 on 2013-02-05

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

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.


Originally posted by nkoenig with karma: 7676 on 2013-02-05

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by nkoenig on 2013-02-05:
Here is a pull request to "fix" this: https://bitbucket.org/osrf/gazebo/pull-request/271/remove-doxygen-processing-of-some-internal/diff

Comment by nkoenig on 2013-02-05:
Here is a pull request to "fix" this: https://bitbucket.org/osrf/gazebo/pull-request/271/remove-doxygen-processing-of-some-internal/diff

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.