Gazebo | Ignition | Community
Ask Your Question

insert model from a path using c++ api

asked 2020-06-09 00:32:28 -0600

cadbury gravatar image

How to insert model from a path in local computer in gazebo? I have heard solutions like using an EXPORT statement. But what I require is that we must automatically add path from a plugin using some function. I have tried addURIpath function but it is not working and the model is being searched from the online database. Can anyone suggest a solution for this? Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-06-09 03:21:08 -0600

nlamprian gravatar image

You can add a model path with the following

#include <gazebo/common/SystemPaths.hh>
edit flag offensive delete link more


Hi, thanks for your reply. I have tried this, when I print the model paths my custom model path can be seen. However when I try to insert model using insertModelSDF which is in my current directory and which is supposed to import meshes from other directory, it is not working and again tries to search in the model database. Can you suggest a fix for that?

cadbury gravatar imagecadbury ( 2020-06-10 02:13:22 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-06-09 00:32:28 -0600

Seen: 35 times

Last updated: Jun 09