Home | Tutorials | Wiki | Issues
Ask Your Question
0

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)

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

1 Answer

Sort by ยป oldest newest most voted
0

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

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

Comments

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

1 follower

Stats

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

Seen: 115 times

Last updated: May 15