Spawning objects taken from real robot

asked 2021-08-09 10:08:02 -0600

omer91 gravatar image

Hello, I am new here (: In my project I am trying to add objects from the real world to Gazebo, so let's say the real robot sees a table in XYZ: (1,3,5) it will add a table in those coordinates in the gazebo world, in this way I can create a copy of my room in the Gazebo world. So first I want to try doing it in simulation, I.E: run a Gazebo world with the robot inside and some objects and another empty Gazebo world so that after running my script it will 'copy' items from the first world to the second.

  • I am using the service 'gazebo/spawn_sdf_model' to spawn my objects.
  • I am using tf2 to transform the coordinates from the robot frame to the world(map) frame.

My issue is: How can I run 2 Gazebo worlds on the same ROS instance? The script should identify the object + location from the first world and spawn the object in the second, so one service will use object identification in the first gazebo world and will deliver the coordinates to a second service that will spawn the object in the second world.

And second is: What is the best way to do it from the robot? Should I run an empty gazebo instance in another system and send the cordinates to it?

Thanks a lot! Let me know if it's not clear enough!

edit retag flag offensive close merge delete