Home | Tutorials | Wiki | Issues
Ask Your Question
0

Simulating GPS outage due to tree foliage

asked 2017-09-03 09:58:37 -0500

Galto2000 gravatar image

Howdy folks,

I'd like to simulate GPS outage/degradation due to tree foliage in Gazebo. This is conceivably "relatively easy" to do if I knew where all the tree model objects are located in Gazebo. I am totally new to Gazebo and I have just started studying the code for ROS Gazebo plugins (like the gazebo ros imu, gps, etc.).

Can someone point me to a tutorial or some demonstration code for querying specific Gazebo models (i.e. the models that represent the trees) within a certain vicinity to the robot model?

In the mean time I'll keep on keepin' on with going through the published Gazebo tutorials and searching for answers, but any advice, pointers or clues that would speed up this process would be greatly appreciated :)

Thanks in advance

Galto

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-09-07 13:28:53 -0500

iche033 gravatar image

you should be able to get models in the world in your plugin by doing world->GetModel("your_model_name")

from there, calling model->GetWorldPose() will give you position and rotation of that model which should help you workout distance between the tree and your robot. Note that this assumes each tree is one single model.

edit flag offensive delete link more

Comments

Thank you for the insight. That's a good start. I also discovered that there is world->getModels() which appears to enumerates all the models. So I don't need to know exactly what the tree models are called ahead of time, as long as I adhere to some naming convention in the world (e.g. making sure that tree models have a name that has "tree" in it). I think I am on my way now, thanks.

Galto2000 gravatar imageGalto2000 ( 2017-09-09 11:06:51 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-09-03 09:58:37 -0500

Seen: 35 times

Last updated: Sep 07