ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

The best way to spawn objects in both rviz and gazebo

asked 2022-12-19 15:55:40 -0500

kidpaul gravatar image

updated 2023-01-09 16:43:02 -0500

Hi all,

I'm trying to generate a simulation that automatically executes grasping multiple times to collect success/fail of the specific grasp configuration. Currently, I have robot moveit package (rviz&gazebo), STL files of objects, and goal end-effector poses with respect to the objects' coordinate systems.

At the moment, my primary goal is to spawn an object and a robot simultaneously to use tf (from robot base to object) to define the goal pose of an end-effector for gazebo simulation.

My initial idea of how to setup the simulation is to convert the object STL file to the URDF and load it as part of the robot in both rviz and gazebo. Is there any better idea to achieve the primary goal? I appreciate any comment, suggestion, and information.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2023-01-09 16:46:24 -0500

kidpaul gravatar image

updated 2023-01-10 22:40:41 -0500

I will answer my own question here:

I decided to spawn objects only in gazebo to simulate automated object pick up. To do this, I defined a SDF file using STL and import necessary classes from gazebo_msgs.srv to spawn and delete objects in the gazebo world. Whoever needs to do the same thing can refer my repository:

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2022-12-19 15:55:40 -0500

Seen: 306 times

Last updated: Jan 10 '23