pycram.joint_state#
Classes#
Represents a named joint state of a robot. For example, the park position of the arms. |
|
Represents a named joint state of a robot. For example, the park position of the arms. |
|
Represents the state of a gripper, such as open or closed. |
|
Manages joint states for different robot arms and their configurations. |
Module Contents#
- class pycram.joint_state.JointState#
Represents a named joint state of a robot. For example, the park position of the arms.
- name: semantic_digital_twin.datastructures.prefixed_name.PrefixedName#
Name of the joint state
- joint_names: List[str]#
Names of the joints in this state
- joint_positions: List[float]#
position of the joints in this state, must correspond to the joint_names
- state_type: enum.Enum = None#
Enum type of the joints tate (e.g., Park, Open)
- apply_to_world(world: semantic_digital_twin.world.World)#
Applies the joint state to the robot in the given world. :param world: The world in which the robot is located.
- class pycram.joint_state.ArmState#
Bases:
JointStateRepresents a named joint state of a robot. For example, the park position of the arms.
- arm: pycram.datastructures.enums.Arms = None#
- class pycram.joint_state.GripperState#
Bases:
JointStateRepresents the state of a gripper, such as open or closed.
- gripper: pycram.datastructures.enums.Arms = None#
- class pycram.joint_state.JointStateManager#
Manages joint states for different robot arms and their configurations.
- joint_states: Dict[Type[semantic_digital_twin.robots.abstract_robot.AbstractRobot], List[JointState]]#
A list of joint states that can be applied to the robot.
- get_arm_state(arm: pycram.datastructures.enums.Arms, state_type: pycram.datastructures.enums.StaticJointState, robot_view: semantic_digital_twin.robots.abstract_robot.AbstractRobot) ArmState | None#
Retrieves the joint state for a specific arm and state type.
- Parameters:
arm – The arm for which the state is requested.
state_type – The type of state (e.g., Park).
robot_view – The robot view to which the arm belongs.
- Returns:
The corresponding ArmState or None if not found.
- get_gripper_state(gripper: pycram.datastructures.enums.Arms, state_type: pycram.datastructures.enums.StaticJointState, robot_view: semantic_digital_twin.robots.abstract_robot.AbstractRobot) GripperState | None#
Retrieves the joint state for a specific gripper and state type.
- Parameters:
gripper – The gripper for which the state is requested.
state_type – The type of state (e.g., Open, Close).
robot_view – The robot view to which the gripper belongs.
- Returns:
The corresponding GripperState or None if not found.
- get_joint_state(state: enum.Enum, robot_view: semantic_digital_twin.robots.abstract_robot.AbstractRobot) List[JointState]#
Retrieves all joint states of a specific type for a given robot.
- Parameters:
state – The type of joint state to retrieve (e.g., Park, Open).
robot_view – The robot class for which the joint states are requested.
- Returns:
A list of JointState objects matching the specified type.
- add_joint_states(robot: Type[semantic_digital_twin.robots.abstract_robot.AbstractRobot], joint_states: List[JointState])#
Adds joint states for a specific robot type.
- Parameters:
robot – The robot class for which the joint states are added.
joint_states – A list of joint states to be added.