concepts.simulator.sapien2.manipulation_utils.contact_samplers.collision_free_qpos#

collision_free_qpos(table_scene, object_id, qpos, exclude=None, verbose=False)[source]#

Check whether the given qpos is collision free. The function also accepts a list of object ids to exclude (e.g., the object in hand).

Parameters:
  • robot – the robot.

  • qpos (ndarray) – the qpos to check.

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

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

  • table_scene (magic.tasks.table_scene.TableScene)

  • object_id (int)

Returns:

True if the qpos is collision free.

Return type:

bool