It's possible get a model link from other model?
Hi there,
I'am writing a plugin for Gazebo and my question is if is possible get a model link from other model? With none relationship between them, no child or parent. Some thing like this:
hydrophone_pos = this->link->GetWorldPose().Ign().Pos();
beaconpos = this->beaconlink->GetWorldPose().Ign().Pos();
Thanks!
Asked by fredvaz on 2018-03-22 12:33:58 UTC
Answers
First get the world:
auto world = this->GetWorld()
Then from the world get the other model:
auto beaconModel = world->GetModel("name_of_beacon_model")
Then get the link:
auto beaconLink = beaconModel->GetLink("name_of_beacon_link")
Asked by chapulina on 2018-03-22 17:58:41 UTC
Comments
Thanks! It's works! :D
Asked by fredvaz on 2018-03-23 12:25:34 UTC
Comments