concepts.simulator.mplib.client.MPLibClient#
- class MPLibClient[source]#
Bases:
object
Methods
add_object
(fcl_object)adds an object to the world
check_for_collision
(collision_function[, states])Helper function to check for collision
check_for_env_collision
([state])Check if the robot is in collision with the environment
check_for_general_collision
(name[, state])Check if the robot is in collision with the environment
check_for_general_pair_collision
(a, b[, state])Check if the robot is in collision with the environment
check_for_self_collision
([state])Check if the robot is in self-collision.
get_articulation
(name)get_object
(name)get_robot
(name)has_articulation
(name)has_object
(name[, allow_articulation])remove_object
(name)returns true if the object was removed, false if it was not found
remove_point_cloud
([name])Removes the point cloud collision object with given name
set_object_pose
(name, pos, quat)set_qpos_context
(qposes)sync_object_states
(pb_client)update_point_cloud
(points[, pos, quat, ...])Adds a point cloud as a collision object with given name to world.
- __init__(robots, objects=tuple(), verbose=False)[source]#
- Parameters:
robots (Sequence[MPLibRobot])
objects (Sequence[mplib.collision_detection.fcl.FCLObject])
verbose (bool)
- __new__(**kwargs)#
- check_for_collision(collision_function, states=None)[source]#
Helper function to check for collision
- check_for_env_collision(state=None)[source]#
Check if the robot is in collision with the environment
- check_for_general_collision(name, state=None)[source]#
Check if the robot is in collision with the environment
- check_for_general_pair_collision(a, b, state=None)[source]#
Check if the robot is in collision with the environment
- get_object(name)[source]#
- Parameters:
name (str)
- Return type:
mplib.collision_detection.fcl.FCLObject
- remove_object(name)[source]#
returns true if the object was removed, false if it was not found
- Return type:
- remove_point_cloud(name='scene_pcd')[source]#
Removes the point cloud collision object with given name
- Parameters:
name – name of the point cloud collision object
- Returns:
True
if success,False
if the non-articulation object with given name does not exist- Return type:
- update_point_cloud(points, pos=(0, 0, 0), quat=(0, 0, 0, 1), resolution=1e-3, name='scene_pcd')[source]#
Adds a point cloud as a collision object with given name to world. If the
name
is the same, the point cloud is simply updated.- Parameters:
points – points, numpy array of shape (n, 3)
resolution – resolution of the point OcTree
name – name of the point cloud collision object