AttachedBody#
- class mplib.AttachedBody#
Bases:
pybind11_objectObject defining bodies that can be attached to robot links. This is useful when handling objects picked up by the robot.
Mimicking MoveIt2’s
moveit::core::AttachedBodyhttps://moveit.picknik.ai/main/api/html/classmoveit_1_1core_1_1AttachedBody.html
- __init__(
- self: mplib.pymp.AttachedBody,
- name: str,
- object: mplib.pymp.collision_detection.fcl.FCLObject,
- attached_articulation: mplib.pymp.ArticulatedModel,
- attached_link_id: int,
- pose: mplib.pymp.Pose,
- touch_links: list[str] = [],
Construct an attached body for a specified link.
- Parameters:
name – name of the attached body
object – collision object of the attached body
attached_articulation – robot articulated model to attach to
attached_link_id – id of the articulation link to attach to
pose – attached pose (relative pose from attached link to object)
touch_links – the link names that the attached body touches
- get_attached_articulation(
- self: mplib.pymp.AttachedBody,
Gets the articulation that this body is attached to
- get_attached_link_global_pose(
- self: mplib.pymp.AttachedBody,
Gets the global pose of the articulation link that this body is attached to
- get_attached_link_id(self: mplib.pymp.AttachedBody) int#
Gets the articulation link id that this body is attached to
- get_global_pose(self: mplib.pymp.AttachedBody) mplib.pymp.Pose#
Gets the global pose of the attached object
- get_name(self: mplib.pymp.AttachedBody) str#
Gets the attached object name
- get_object(
- self: mplib.pymp.AttachedBody,
Gets the attached object (
FCLObjectPtr)
- get_pose(self: mplib.pymp.AttachedBody) mplib.pymp.Pose#
Gets the attached pose (relative pose from attached link to object)
- get_touch_links(self: mplib.pymp.AttachedBody) list[str]#
Gets the link names that the attached body touches
- property pose#
The attached pose (relative pose from attached link to object)
- set_pose(self: mplib.pymp.AttachedBody, pose: mplib.pymp.Pose) None#
Sets the attached pose (relative pose from attached link to object)
- set_touch_links(
- self: mplib.pymp.AttachedBody,
- touch_links: list[str],
Sets the link names that the attached body touches
- update_pose(self: mplib.pymp.AttachedBody) None#
Updates the global pose of the attached object using current state