concepts.simulator.pybullet.manipulation_utils.contact_samplers.collision_free_pos#

collision_free_pos(robot, pos, quat=None, exclude=None, verbose=False)[source]#

Check whether there is a qpos at the givne pose that is collision free. The function also accepts a list of object ids to exclude (e.g., the object in hand). This function is not recommended to use, since it is not fully reproducible (there will be multiple qpos that can achieve the same pose).

Parameters:
  • robot (BulletRobotBase) – the robot.

  • pos (ndarray) – the position to check.

  • quat (ndarray | None) – the quaternion to check. If not specified, the home quaternion will be used.

  • exclude (List[int] | None) – the object ids to exclude.

  • verbose (bool) – whether to print the collision information.

Returns:

True if there is a collision free qpos.

Return type:

bool