ArticulatedModel#
- class mplib.pymp.ArticulatedModel#
Bases:
pybind11_objectSupports initialization from URDF and SRDF files, and provides access to underlying Pinocchio and FCL models.
- get_base_pose(self: mplib.pymp.ArticulatedModel) numpy.ndarray[numpy.float64[7, 1]]#
Get the base pose of the robot.
- Returns:
base pose of the robot in [x, y, z, qw, qx, qy, qz] format
- get_fcl_model(self: mplib.pymp.ArticulatedModel) mplib.pymp.collision_detection.fcl.FCLModel#
Get the underlying FCL model.
- Returns:
FCL model used for collision checking
- get_move_group_end_effectors(self: mplib.pymp.ArticulatedModel) list[str]#
Get the end effectors of the move group.
- Returns:
list of end effectors of the move group
- get_move_group_joint_indices(self: mplib.pymp.ArticulatedModel) list[int]#
Get the joint indices of the move group.
- Returns:
list of user joint indices of the move group
- get_move_group_joint_names(self: mplib.pymp.ArticulatedModel) list[str]#
Get the joint names of the move group.
- Returns:
list of joint names of the move group
- get_move_group_qpos_dim(self: mplib.pymp.ArticulatedModel) int#
Get the dimension of the move group qpos.
- Returns:
dimension of the move group qpos
- get_pinocchio_model(self: mplib.pymp.ArticulatedModel) mplib.pymp.kinematics.pinocchio.PinocchioModel#
Get the underlying Pinocchio model.
- Returns:
Pinocchio model used for kinematics and dynamics computations
- get_qpos(self: mplib.pymp.ArticulatedModel) numpy.ndarray[numpy.float64[m, 1]]#
Get the current joint position of all active joints inside the URDF.
- Returns:
current qpos of all active joints
- get_user_joint_names(self: mplib.pymp.ArticulatedModel) list[str]#
Get the joint names that the user has provided for planning.
- Returns:
list of joint names of the user
- get_user_link_names(self: mplib.pymp.ArticulatedModel) list[str]#
Get the link names that the user has provided for planning.
- Returns:
list of link names of the user
- set_base_pose(self: mplib.pymp.ArticulatedModel, pose: numpy.ndarray[numpy.float64[7, 1]]) None#
Set the base pose of the robot.
- Parameters:
pose – base pose of the robot in [x, y, z, qw, qx, qy, qz] format
- set_move_group(*args, **kwargs)#
Overloaded function.
set_move_group(self: mplib.pymp.ArticulatedModel, end_effector: str) -> None
Set the move group, i.e. the chain ending in end effector for which to compute the forward kinematics for all subsequent queries.
- Parameters:
chain – list of links extending to the end effector
set_move_group(self: mplib.pymp.ArticulatedModel, end_effectors: list[str]) -> None
Set the move group but we have multiple end effectors in a chain. I.e., Base –> EE1 –> EE2 –> … –> EEn
- Parameters:
end_effectors – names of the end effector link
- set_qpos(self: mplib.pymp.ArticulatedModel, qpos: numpy.ndarray[numpy.float64[m, 1]], full: bool = False) None#
Let the planner know the current joint positions.
- Parameters:
qpos – current qpos of all active joints or just the move group joints
full – whether to set the full qpos or just the move group qpos. If full is
False, we will pad the missing joints with current known qpos. The default isFalse
- update_SRDF(self: mplib.pymp.ArticulatedModel, SRDF: str) None#
Update the SRDF file to disable self-collisions.
- Parameters:
srdf – path to SRDF file, can be relative to the current working directory