Reset Objects Random Locations Isaac Sim

Isaac Sim Version

4.5.0

Operating System

Ubuntu 22.04

GPU Information

  • Model: RTX 5000 Ada
  • Driver Version: 535

I am attempting to reset a world with multiple carter robots, but each reset I want them in a randomized location in the world that is not in a collision. When I tried randomizing by having their position have a large normal distribution area via position=rep.distribution.normal, they would randomize in or on walls, and the collisions would break the simulation.
As a fix, I then would take the robots current location, check the occupancy grid to find free space, and randomly select my own new robot location from the free gridcells. I would then set the robots new randomized location via prim.GetAttribute("xformOp:translate").Set(random_location). However, this caused issues with the transforms whenever I sent a robot to a location via Nav2Goal after changing the location. I have the same Nav2Goal issue as the following post Rviz error with Isaac Sim.
Is there any recommended way to ensure randomized locations in Isaac Sim won’t have collisions?

1 Like

Please check if Avoid collisions with replicator is helpful.

Unfortunately it is not helping me solve our problem, as our robot (/World/Nova_Carter_ROS_1) is not a replicator item. It seems like most people are replicating, sphere, plane, etc, which are all defined rep.create types, whereas we want to ensure our robot prims which we are randomizing do not collide with other objects.

We also need to reset the environment when a specific event has occurred, but I am unable to find examples of omni.replicator.core.trigger.register. We are running with ROS2 too.