pycram.world_concepts.constraints
Module Contents
Classes
Represents an abstract constraint concept, this could be used to create joints for example or any kind of constraint |
|
Represents a constraint between two links in the World. |
|
Represents an abstract constraint concept, this could be used to create joints for example or any kind of constraint |
- class pycram.world_concepts.constraints.AbstractConstraint(parent_link: pycram.description.Link, child_link: pycram.description.Link, _type: pycram.datastructures.enums.JointType, parent_to_constraint: pycram.datastructures.pose.Transform, child_to_constraint: pycram.datastructures.pose.Transform)
Represents an abstract constraint concept, this could be used to create joints for example or any kind of constraint between two links in the world.
- property parent_to_child_transform: typing_extensions.Union[pycram.datastructures.pose.Transform, None]
- property parent_object_id: int
Returns the id of the parent object of the constraint.
- Returns:
The id of the parent object of the constraint
- property child_object_id: int
Returns the id of the child object of the constraint.
- Returns:
The id of the child object of the constraint
- property parent_link_id: int
Returns the id of the parent link of the constraint.
- Returns:
The id of the parent link of the constraint
- property child_link_id: int
Returns the id of the child link of the constraint.
- Returns:
The id of the child link of the constraint
- property position_wrt_parent_as_list: typing_extensions.List[float]
Returns the constraint frame pose with respect to the parent origin as a list.
- Returns:
The constraint frame pose with respect to the parent origin as a list
- property orientation_wrt_parent_as_list: typing_extensions.List[float]
Returns the constraint frame orientation with respect to the parent origin as a list.
- Returns:
The constraint frame orientation with respect to the parent origin as a list
- property pose_wrt_parent: pycram.datastructures.pose.Pose
Returns the joint frame pose with respect to the parent origin.
- Returns:
The joint frame pose with respect to the parent origin
- property position_wrt_child_as_list: typing_extensions.List[float]
Returns the constraint frame pose with respect to the child origin as a list.
- Returns:
The constraint frame pose with respect to the child origin as a list
- property orientation_wrt_child_as_list: typing_extensions.List[float]
Returns the constraint frame orientation with respect to the child origin as a list.
- Returns:
The constraint frame orientation with respect to the child origin as a list
- property pose_wrt_child: pycram.datastructures.pose.Pose
Returns the joint frame pose with respect to the child origin.
- Returns:
The joint frame pose with respect to the child origin
- class pycram.world_concepts.constraints.Constraint(parent_link: pycram.description.Link, child_link: pycram.description.Link, _type: pycram.datastructures.enums.JointType, axis_in_child_frame: geometry_msgs.msg.Point, constraint_to_parent: pycram.datastructures.pose.Transform, child_to_constraint: pycram.datastructures.pose.Transform)
Bases:
AbstractConstraint
Represents a constraint between two links in the World.
- property axis_as_list: typing_extensions.List[float]
Returns the axis of this constraint as a list.
- Returns:
The axis of this constraint as a list of xyz
- class pycram.world_concepts.constraints.Attachment(parent_link: pycram.description.Link, child_link: pycram.description.Link, bidirectional: typing_extensions.Optional[bool] = False, parent_to_child_transform: typing_extensions.Optional[pycram.datastructures.pose.Transform] = None, constraint_id: typing_extensions.Optional[int] = None)
Bases:
AbstractConstraint
Represents an abstract constraint concept, this could be used to create joints for example or any kind of constraint between two links in the world.
Creates an attachment between the parent object link and the child object link. This could be a bidirectional attachment, meaning that both objects will move when one moves.
- Parameters:
parent_link – The parent object link.
child_link – The child object link.
bidirectional – If true, both objects will move when one moves.
parent_to_child_transform – The transform from the parent link to the child object link.
constraint_id – The id of the constraint in the simulator.
- property loose: bool
If true, then the child object will not move when parent moves.
- property is_reversed: bool
True if the parent and child links are swapped.
- Type:
return
- update_transform_and_constraint() None
Updates the transform and constraint of this attachment.
- update_transform() None
Updates the transform of this attachment by calculating the transform from the parent link to the child link.
- update_constraint() None
Updates the constraint of this attachment by removing the old constraint if one exists and adding a new one.
- add_fixed_constraint() None
Adds a fixed constraint between the parent link and the child link.
- calculate_transform() pycram.datastructures.pose.Transform
Calculates the transform from the parent link to the child link.
- remove_constraint_if_exists() None
Removes the constraint between the parent and the child links if one exists.
- get_inverse() Attachment
- Returns:
A new Attachment object with the parent and child links swapped.
- __del__() None
Removes the constraint between the parent and the child links if one exists when the attachment is deleted.
- __copy__()
- __eq__(other)
Return self==value.
- __hash__()
Return hash(self).