Robotics StackExchange | Archived questions

Spawning Model Editor Model in Terminal

Hello!

is there a way to spawn a model in Gazebo created in the Gazebo Model Editor in the Terminal? Like with a Rosrun/Rosservice etc. command?

Path to the models: /home/user/modeleditormodels/RACETRACK_xxx

Two Files in these folders:

model.config

model.sdf

Context / The reason I need this: I am using Matlab to control ROS & Gazebo and I have 17 different Racetracks, all built in the Model Editor. I have a predefined trajectory that my car follows and I'm subscribing to the image topic with Matlab to process the camera images. I already wrote a Matlab script that does everything other than spawning the racetracks by itself. I'd like to make an additional for-loop for spawning the racetracks so that I have a fully automated script, which I can run overnight. Right now I have to change the Racetracks manually.

I am using Gazebo 11.6

Asked by amoo29 on 2021-07-14 03:05:40 UTC

Comments

Answers

I asked the same question in the ROS ANSWERS forum, since it's a ROS problem aswell. However I found the answer. Here's the ROS answer:

Here's the ROS answer

Asked by amoo29 on 2021-07-30 08:45:01 UTC

Comments