concepts.dm.crowhat.world.planning_world_interface.PlanningWorldInterface#
- class PlanningWorldInterface[source]#
Bases:
object
Methods
add_attachment
(a, a_link, b, b_link[, a_to_b])Set the attachment between object a and object b.
check_collision
([a, b, ...])Check if there is a collision between the object with the given identifiers.
check_collision_pairs
(pairs[, ...])Check if there is a collision between the pairs of objects.
check_collision_with_other_objects
(object_id)Check if there is a collision between the object with the given identifier and other objects.
get_contact_points
([a, b, max_distance, ...])Get the contact points of the object between a and b, which are the identifiers of two objects.
get_link_pose
(body_id, link_id)Get the pose of the link with the given body and link identifiers.
get_object_mesh
(identifier[, mode])Get the mesh of the object with the given identifier.
get_object_name
(identifier)Get the name of the object with the given identifier.
get_object_point_cloud
(identifier, **kwargs)Get the point cloud of the object with the given identifier.
get_object_pose
(identifier)Get the pose of the object with the given identifier.
Get a list of objects in the world.
get_single_contact_normal
(object_id, ...[, ...])remove_attachment
(a, a_link, b, b_link)Remove the attachment between object a and object b.
restore_world
(world)Restore the world state from the given world state.
Save the current world state.
set_object_pose
(identifier, pose)Set the pose of the object with the given identifier.
- __init__()#
- __new__(**kwargs)#
- add_attachment(a, a_link, b, b_link, a_to_b=None)[source]#
Set the attachment between object a and object b. This is an optional functionality that can be implemented in subclasses
- check_collision(a=None, b=None, ignored_collision_bodies=None, max_distance=None)[source]#
Check if there is a collision between the object with the given identifiers.
- Parameters:
- Returns:
True if there is a collision, False otherwise.
- Return type:
- check_collision_pairs(pairs, ignored_collision_bodies=None)[source]#
Check if there is a collision between the pairs of objects.
- check_collision_with_other_objects(object_id, ignore_self_collision=True, ignored_collision_bodies=None, max_distance=None, return_list=False, verbose=False)[source]#
Check if there is a collision between the object with the given identifier and other objects.
- Parameters:
ignore_self_collision (bool) – whether to ignore the collision between the object and itself.
ignored_collision_bodies (List[str | int] | None) – a list of identifiers of the bodies to ignore.
max_distance (float | None) – the maximum distance to consider a collision.
return_list (bool) – whether to return the list of identifiers of the colliding objects.
verbose (bool)
- Returns:
True if there is a collision, False otherwise. If return_list is True, it will return the list of identifiers of the colliding objects.
- Return type:
- get_contact_points(a=None, b=None, max_distance=None, ignored_collision_bodies=None)[source]#
Get the contact points of the object between a and b, which are the identifiers of two objects. If either a or b is None, it will return the contact points of the object with the given identifier. When both a and b are None, it will return all the contact points in the world.
- Parameters:
- Returns:
a list of contact points.
- Return type:
- get_link_pose(body_id, link_id)[source]#
Get the pose of the link with the given body and link identifiers.
- get_object_mesh(identifier, mode='open3d', **kwargs)[source]#
Get the mesh of the object with the given identifier.
- get_object_point_cloud(identifier, **kwargs)[source]#
Get the point cloud of the object with the given identifier.
- get_single_contact_normal(object_id, support_object_id, deviation_tol=0.05, return_center=False)[source]#
- remove_attachment(a, a_link, b, b_link)[source]#
Remove the attachment between object a and object b. This is an optional functionality that can be implemented in subclasses.
- restore_world(world)[source]#
Restore the world state from the given world state.
- Parameters:
world (Any)