Genesis icon indicating copy to clipboard operation
Genesis copied to clipboard

How to ignore collision between specific robot link pairs?

Open Riften opened this issue 10 months ago • 4 comments
trafficstars

For now I'm using RigidEntity.detect_collision to do collision checking for motion planning. I wonder if I can disable collision between specific links?

Some robot may have srdf file together with its description which contains disable_collisions elements to disable collision checking between a specified pair of links. How can I do this in genesis?

It seems that I can always do that by filtering the detected collision between corresponding geom indices. But is there any other way that can allow me to indicate this during scene initialization?

Riften avatar Jan 12 '25 08:01 Riften

It seems like there is not info provided related to disabling some collision pairs in the official docs.

A temporary solution could be manually adding disabled collision pairs in RigidEntitiy._is_ompl_state_valid(state), but of course pairs will be only ignored for planning

    def _is_ompl_state_valid(self, state):
        self.set_qpos(self._ompl_state_to_tensor(state))
        collision_pairs = self.detect_collision()
+      # disable some collision_pair here
        if len(collision_pairs) > 0:
            return False
        else:
            return True

bxtbold avatar Jan 14 '25 01:01 bxtbold

Are you referring to actually disable collision across links in physics simulation (like some links can actually penetrates into each other) or just ways to filter those out?

zswang666 avatar Feb 12 '25 02:02 zswang666

Are you referring to actually disable collision across links in physics simulation (like some links can actually penetrates into each other) or just ways to filter those out?

Actually disable them.

Riften avatar Feb 12 '25 09:02 Riften

Have a look to mujoco documentation regarding collision detection. You can specify 'contype' & 'conaffinity', or an explicit list of excluded collision pairs in MJCF files. There is no such support on URDF files though. Could be relevant to access this option for URDF too. Do you think this feature would be useful for your application?

duburcqa avatar May 24 '25 08:05 duburcqa