Stretch Simulation

Is it possible to set up Stretch in simulation without the actual robot having arrived?
I tried to follow the Run the new robot installation script but it asks for serial number, and I don’t have that yet.

Hi @pappbo, welcome to the Stretch community forum! Yes, there are a few simulators available. Check out this thread for more details:

If you’re looking for an easy simulator to get started with, I’d recommend the Mujoco simulation:

I am currently trying to get stretch 3 working in mujoco. What is the best way to achieve this? As stretch 3 is not on mujoco_menagerie…

Hi @kkatodus ,
The best way to use Stretch 3 in Mujoco is to re-create the URDF XML and object assets specific to Stretch 3 for Mujoco. We plan to release Stretch 3 assests to Mujoco soon and I can share an update on it when it is available for use.

1 Like

Hey @kkatodus, FYI, Mujoco support for Stretch 3 was released in this repo a few weeks ago: Stretch Mujoco. There’s sample code as well.

It’s also in the process of being merged into the Mujoco Menagerie (the PR is in-review as of July 8th).

1 Like

Hey @bshah thank you for the great suggestions! I recently also placed an order for a Stretch 3. We want to use the robot for a demo of identifying arbitrary objects on a shelf, navigating to them, grabbing them, and putting them in a bin. We also have several weeks before we can actually receive the robot. Considering these are the tasks we hope to accomplish, would you recommend going with ROS1+Gazebo+Stretch2 or Mujoco+Stretch3? Is there a way to use ROS2 with the Mujoco simulated environment?

Hey @TheMichaelChen, good question. My recommendation depends on a few factors:

  • Both simulators allow for velocity control of the mobile base via SE2 twist commands. But while Gazebo takes it one step further with NavStack to provide point-to-point navigation, Mujoco currently doesn’t. If you’re bringing your own navigation planner, I recommend Mujoco. Otherwise, I’d use Gazebo with the NavStack.
  • Gazebo cannot stably simulate grasps with the gripper, and uses a hack where the object is teleported into the gripper. Mujoco can stably simulate grasps, and no special hack is needed. If you wish to accurately simulate grasping, I recommend Mujoco.
  • Neither simulator generates photorealistic imagery. If the performance of your perception algorithm is adversely impacted by simulated imagery, I recommend looking into a photorealistic simulator, like Habitat or IsaacSim.
  • Both simulators come with 3D assets you can use to build an artificial environment. The biggest repository of assets is found here, and you can search on Github to find more.

We’re planning on supporting the Mujoco simulator with ROS2 in the future. In the short term, you’d need to write your own driver to use it Mujoco + ROS2 together.

1 Like