robits.core.abc package
Submodules
robits.core.abc.audio module
- class robits.core.abc.audio.AudioBase
Bases:
ABCA general class that models audio interaction
- process() str | None
Transcribes the recorded audio
- recorder: RecorderBase
robits.core.abc.camera module
- class robits.core.abc.camera.CameraBase
Bases:
ABCA general class that models a camera
- property calibration: CameraCalibration
Loads the camera calibration. The camera calibration file must be available in the config folder. A custom config folder can be specified with the environment variable ROBITS_CONFIG_DIR.
- Returns:
the camera calibration
- abstract property camera_name: str
Name of the camera
- Returns:
The camera name
- property extrinsics: ndarray
Extrinsics parameters
- Returns:
the extrinsic parameters of the camera as 4x4 matrix
- abstractmethod get_camera_data() Tuple[CameraData, Dict[str, Any]]
Gets the camera images
- Returns:
the camera images and metadata
- get_info() Dict[str, Any]
General information about the camera
- property intrinsics: ndarray
Intrinsic parameters
- Returns:
the intrinsic parameters of the camera as 3x3 matrix
- is_wrist_camera() bool
- Returns:
True if the camera is mounted to a robot
- save_calibration(config_folder) None
Stores the camera calibration
- Parameters:
config_folder – Path to the top-level config folder
robits.core.abc.control module
- class robits.core.abc.control.BimanualControlManager(control_right: ControlManager, control_left: ControlManager)
Bases:
ControlManagerManages two control managers for bimanual control. The control is delegated to the both arms by spawning a thread.
- move_home() None
Convenience function to move the robot to default joint position
- class robits.core.abc.control.ControlManager
Bases:
objectManages multiple controllers and monitors their activation. Only one controller should be active at the same time
- move_home() None
Convenience function to move the robot to default joint position
- register_controller(controller: ControllerBase) None
Register a controller.
- Parameters:
controller – Controller instance to register.
- stop() None
Stop the active controller.
- class robits.core.abc.control.ControlTypes(value)
Bases:
StrEnumClass representing different types of control methods.
- cartesian = 'cartesian'
- motion_planning = 'motion_planning'
- position = 'position'
- class robits.core.abc.control.ControllerBase(controller_type: ControlTypes, asynchronous: bool = False)
Bases:
objectBase class for control methods.
- configure(asynchronous: bool, **kwargs) None
Configure the controller
- Parameters:
asynchronous – whether the controller should be in asynchronous mode
- previous_config: Dict[str, Any]
- reset_configuration() None
Restores a previous configuration
- save_current_config() None
Save the current configuration
- set_asynchronous() None
Set the controller to asynchronous mode.
- set_synchronous() None
Set the controller to synchronous mode.
- start_controller() None
Start the controller.
- stop_controller() None
Stop the controller.
- update(*args, **kwargs)
Abstract method to update the controller’s command target. Concrete subclasses must implement this.
- robits.core.abc.control.control_types
alias of
ControlTypes
robits.core.abc.gripper module
- class robits.core.abc.gripper.GripperBase
Bases:
ABCA general class that models a gripper/hand
- abstractmethod close() None
Closes the gripper / hand
- abstractmethod get_info() Dict[str, Any]
Returns general information about the gripper.
- Returns:
Dictionary containing gripper information
- abstractmethod get_obs() Dict[str, Any]
Gets the normalized position of the gripper / finger joints
- Returns:
A dictionary with joint positions and other observations
- abstract property gripper_name: str
Returns the name of the gripper.
- Returns:
The gripper name
- abstractmethod is_open() bool
Returns whether the hand / gripper is open
- Returns:
True if the gripper is open
- abstractmethod open() None
Opens the gripper / hand
- set_pos(pos)
Set the open amount the gripper / hand
- Parameters:
pos – the normalized position
robits.core.abc.robot module
- class robits.core.abc.robot.BimanualRobot(right_robot: RobotBase, left_robot: RobotBase, **kwargs)
Bases:
Perception- get_obs() Dict[str, Any]
Returns the observation from the robot
See also
Perception.get_vision_data()
See also
RobotBase.get_proprioception_data()
- class robits.core.abc.robot.DummyRobot(gripper: GripperBase | None, cameras: List[CameraBase], audio=None, speech=None, **kwargs)
Bases:
UnimanualRobotMock class with dummy data
- property eef_matrix
The 4x4 matrix of the current end-effector pose
- Returns:
The pose of the robot as matrix
- property eef_pose
The pose of the end-effector as (position, quaternion). Quaternion format is xyzw
- Returns:
The pose of the robot as tuple
- get_proprioception_data(include_eef: bool = True, include_gripper_obs: bool = True) Dict[str, Any]
Gets the proprioception data from a robot. This includes
joint position
joint velocities
gripper joint position (optional)
gripper pose (optional)
- Parameters:
include_eef – include pose of the end-effector
include_gripper_obs – include joint positions and other proprioception of the gripper
- Returns:
The proprioception data
- property robot_name: str
Returns the name of the robot.
- Returns:
The robot name
- class robits.core.abc.robot.Perception(cameras: List[CameraBase])
Bases:
objectBase class for handling multiple cameras
- get_vision_data(include_point_cloud: bool = False, swap_channels: bool = False) Dict[str, ndarray]
Returns all the vision data
- class robits.core.abc.robot.RobotBase(transform_robot_to_world: Sequence[Sequence[float]], gripper: GripperBase | None = None)
Bases:
ABCBase class for robot arms with common functionality.
Provides an interface for robot control and state access.
- abstract property eef_matrix: ndarray
The 4x4 matrix of the current end-effector pose
- Returns:
The pose of the robot as matrix
- abstract property eef_pose: Tuple[ndarray, ndarray]
The pose of the end-effector as (position, quaternion). Quaternion format is xyzw
- Returns:
The pose of the robot as tuple
- get_info() Dict[str, str]
- abstractmethod get_proprioception_data(include_eef: bool = True, include_gripper_obs: bool = True) Dict[str, Any]
Gets the proprioception data from a robot. This includes
joint position
joint velocities
gripper joint position (optional)
gripper pose (optional)
- Parameters:
include_eef – include pose of the end-effector
include_gripper_obs – include joint positions and other proprioception of the gripper
- Returns:
The proprioception data
- abstract property robot_name: str
Returns the name of the robot.
- Returns:
The robot name
- property transform_world_to_robot
returns the transformation from the world to the robot
- class robits.core.abc.robot.UnimanualRobot(cameras: List[CameraBase])
Bases:
Perception,RobotBase- get_obs() Dict[str, Any]
Returns the observation from the robot
See also
Perception.get_vision_data()
See also
RobotBase.get_proprioception_data()
Also updates extrinsics parameters for wrist cameras
- update_wrist_camera_extrinsics(proprioception: Dict[str, Any], perception: Dict[str, Any])