Home | Tutorials | Wiki | Issues
Ask Your Question

How to include uri relatively?

asked 2017-05-15 05:01:12 -0500

medmuf gravatar image

I have built a model to be placed within my project, other than placing it in ~/.gazebo/models (then later be used like model://my_model) in my .world file, could I include like the following or similar: (p.s. the following one seems doesn't work)

  <uri>model://$(find my_package)/models/my_model.sdf</uri>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-05-15 09:25:06 -0500

chapulina gravatar image

Your .world files are in SDF, and unfortunately SDF doesn't support the kind of substitution you're trying to do. I believe the syntax you're using is supported on ROS launch files.

Gazebo will find your model as long as its parent path is listed on the environment variable GAZEBO_MODEL_PATH. So you can place it on a directory other than ~/.gazebo/models and append that path to the environment variable.

edit flag offensive delete link more


Hooray! After setting `GAZEBO_MODEL_PATH` as my model path within `/etc/environment`, Gazebo did find customized models. Although I expect relative uri's are supported built-in. :-P

medmuf gravatar imagemedmuf ( 2017-05-15 23:52:41 -0500 )edit
Login/Signup to Answer

Question Tools



Asked: 2017-05-15 05:01:12 -0500

Seen: 5,225 times

Last updated: May 15 '17