We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff9ba7e commit d6d60b7Copy full SHA for d6d60b7
pyrep/robots/arms/arm.py
@@ -467,3 +467,14 @@ def get_jacobian(self):
467
jacobian, (rows, cols) = sim.simGetIkGroupMatrix(self._ik_group, 0)
468
jacobian = np.array(jacobian).reshape((rows, cols), order='F')
469
return jacobian
470
+
471
+ def check_arm_collision(self, obj: 'Object' = None) -> bool:
472
+ """Checks whether two entities are colliding.
473
474
+ :param obj: The other collidable object to check collision against,
475
+ or None to check against all collidable objects. Note that objects
476
+ must be marked as collidable!
477
+ :return: If the object is colliding.
478
+ """
479
+ handle = sim.sim_handle_all if obj is None else obj.get_handle()
480
+ return sim.simCheckCollision(self._collision_collection, handle) == 1
0 commit comments