robots¶
robots
¶
Modules:
| Name | Description |
|---|---|
abstract |
|
bimanual_yam |
Bimanual YAM robot implementation for the framework. |
floating_robotiq |
|
floating_rum |
|
franka |
|
i2rt_yam |
i2rt YAM robot implementation for the framework. |
rby1 |
|
robot_views |
|
abstract
¶
Classes:
| Name | Description |
|---|---|
Robot |
|
Attributes:
| Name | Type | Description |
|---|---|---|
log |
|
Robot
¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mj_data
|
MjData
|
The MuJoCo data structure containing the robot definistion and current simulation state |
required |
Methods:
| Name | Description |
|---|---|
action_dim |
sum of the commanded joints, which defines the action space of the robot. |
add_robot_to_scene |
Add a robot to a scene, taking care of any robot-specific considerations. |
apply_action_noise |
Apply action noise to the commanded action. |
apply_control_overrides |
|
compute_control |
Compute and set the control inputs to the robot actuators based on the |
get_arm_move_group_ids |
Get the move group IDs that should have TCP-bounded noise applied. |
last_unnoised_cmd_joint_pos |
Get the last unnoised joint position commands for the robot. |
reset |
Reset the robot to its initial state or a provided state. |
robot_model_root_name |
The name of the root body of the robot model. This is NOT necessarily the root body of the robot after insertion. |
set_joint_pos |
Set all the robot's joint positions to the specified values. |
set_stationary |
Set all controllers of the robot to stationary mode (if not already set), |
set_world_pose |
Set the robot's world pose to the specified location (x-y-yaw) in the world. |
update_control |
Update the control targets to the robot based on the provided action commands. |
Attributes:
| Name | Type | Description |
|---|---|---|
controllers |
dict[str, Controller]
|
One or more controllers for the robot joints / wheels / etc. |
exp_config |
|
|
kinematics |
MlSpacesKinematics
|
kinematic solver for the robot |
mj_data |
|
|
mj_model |
|
|
namespace |
str
|
robot namespace used to differentiate between one or multiple robots and the environment |
parallel_kinematics |
ParallelKinematics
|
parallel kinematic solver for the robot |
robot_view |
RobotView
|
robot view for interfacing with joints / links / actuators |
state_dim |
int
|
sum of all the joints of interest, which defines the state of the robot. |
Source code in molmo_spaces/robots/abstract.py
controllers
abstractmethod
property
¶
controllers: dict[str, Controller]
One or more controllers for the robot joints / wheels / etc.
namespace
abstractmethod
property
¶
robot namespace used to differentiate between one or multiple robots and the environment
parallel_kinematics
abstractmethod
property
¶
parallel kinematic solver for the robot
robot_view
abstractmethod
property
¶
robot_view: RobotView
robot view for interfacing with joints / links / actuators
state_dim
abstractmethod
cached
property
¶
sum of all the joints of interest, which defines the state of the robot.
action_dim
abstractmethod
¶
sum of the commanded joints, which defines the action space of the robot. Args: move_group_ids: list of move group ids to consider for the action space
Source code in molmo_spaces/robots/abstract.py
add_robot_to_scene
classmethod
¶
add_robot_to_scene(robot_config: BaseRobotConfig, spec: MjSpec, robot_spec: MjSpec, prefix: str, pos: list[float], quat: list[float], randomize_textures: bool = False) -> None
Add a robot to a scene, taking care of any robot-specific considerations. Args: robot_config: The robot config, of the corresponding derived class (i.e. FrankaConfig for Franka, etc.) spec: The scene to insert the robot into robot_spec: The robot model prefix: The prefix to use for the robot, i.e. the namespace pos: The position to use for the robot, either 2d or 3d. If 2d, the z-coordinate is assumed to be 0. quat: The quaternion to use for the robot, in [w, x, y, z] format. randomize_textures: Whether to randomize the textures of the robot, if applicable. Not supported by all robots.
Source code in molmo_spaces/robots/abstract.py
apply_action_noise
¶
Apply action noise to the commanded action.
Each robot subclass can override this to customize noise behavior. Default implementation applies TCP-bounded noise to arm move groups returned by get_arm_move_group_ids().
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action
|
dict[str, Any]
|
Action dict with move_group_id -> joint positions |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Modified action dict with noise added |
Source code in molmo_spaces/robots/abstract.py
apply_control_overrides
classmethod
¶
Source code in molmo_spaces/robots/abstract.py
compute_control
abstractmethod
¶
Compute and set the control inputs to the robot actuators based on the current state and the targets set by the user. Must be called after update_control().
Source code in molmo_spaces/robots/abstract.py
get_arm_move_group_ids
¶
Get the move group IDs that should have TCP-bounded noise applied.
Override in subclass to specify which move groups are arms. Default returns empty list (no noise applied).
Source code in molmo_spaces/robots/abstract.py
last_unnoised_cmd_joint_pos
¶
Get the last unnoised joint position commands for the robot.
Even if the commanded action was partial (due to e.g. noop), this will return the completely filled-in action. Done signals are not included. Non-position controlled move groups are not included.
Returns:
| Type | Description |
|---|---|
dict[str, ndarray] | None
|
The last unnoised joint position commands for the robot, or None if no action has been set yet. |
Source code in molmo_spaces/robots/abstract.py
reset
abstractmethod
¶
robot_model_root_name
abstractmethod
staticmethod
¶
The name of the root body of the robot model. This is NOT necessarily the root body of the robot after insertion.
set_joint_pos
abstractmethod
¶
Set all the robot's joint positions to the specified values. Args: robot_joint_pos_dict: Dictionary containing joint positions for the robot based on the move groups ids.
Source code in molmo_spaces/robots/abstract.py
set_stationary
¶
Set all controllers of the robot to stationary mode (if not already set), i.e., hold current positions or zero velocities.
Source code in molmo_spaces/robots/abstract.py
set_world_pose
abstractmethod
¶
Set the robot's world pose to the specified location (x-y-yaw) in the world.
update_control
abstractmethod
¶
Update the control targets to the robot based on the provided action commands. Does not set the control inputs to the robot actuators. See compute_control().
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action_command_dict
|
Dictionary containing action commands for the robot based on the move groups ids to be used. |
required |
Source code in molmo_spaces/robots/abstract.py
bimanual_yam
¶
Bimanual YAM robot implementation for the framework.
Classes:
| Name | Description |
|---|---|
BimanualYamRobot |
Bimanual YAM robot implementation (two 6-DOF arms with parallel grippers). |
BimanualYamRobot
¶
Bases: Robot
Bimanual YAM robot implementation (two 6-DOF arms with parallel grippers).
Methods:
| Name | Description |
|---|---|
action_dim |
|
add_robot_to_scene |
|
apply_action_noise |
Apply action noise to the commanded action. |
apply_control_overrides |
|
compute_control |
|
get_arm_move_group_ids |
Bimanual YAM has two independent arms. |
last_unnoised_cmd_joint_pos |
Get the last unnoised joint position commands for the robot. |
reset |
|
robot_model_root_name |
The root body name in the bimanual_yam.xml. |
set_joint_pos |
|
set_stationary |
Set all controllers of the robot to stationary mode (if not already set), |
set_world_pose |
|
update_control |
|
Attributes:
| Name | Type | Description |
|---|---|---|
controllers |
|
|
exp_config |
|
|
kinematics |
|
|
mj_data |
|
|
mj_model |
|
|
namespace |
|
|
parallel_kinematics |
|
|
robot_view |
|
|
state_dim |
int
|
|
Source code in molmo_spaces/robots/bimanual_yam.py
action_dim
¶
add_robot_to_scene
classmethod
¶
add_robot_to_scene(robot_config: BimanualYamRobotConfig, spec: MjSpec, robot_spec: MjSpec, prefix: str, pos: list[float], quat: list[float], randomize_textures: bool = False) -> None
Source code in molmo_spaces/robots/bimanual_yam.py
apply_action_noise
¶
Apply action noise to the commanded action.
Each robot subclass can override this to customize noise behavior. Default implementation applies TCP-bounded noise to arm move groups returned by get_arm_move_group_ids().
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action
|
dict[str, Any]
|
Action dict with move_group_id -> joint positions |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Modified action dict with noise added |
Source code in molmo_spaces/robots/abstract.py
apply_control_overrides
classmethod
¶
Source code in molmo_spaces/robots/abstract.py
compute_control
¶
get_arm_move_group_ids
¶
last_unnoised_cmd_joint_pos
¶
Get the last unnoised joint position commands for the robot.
Even if the commanded action was partial (due to e.g. noop), this will return the completely filled-in action. Done signals are not included. Non-position controlled move groups are not included.
Returns:
| Type | Description |
|---|---|
dict[str, ndarray] | None
|
The last unnoised joint position commands for the robot, or None if no action has been set yet. |
Source code in molmo_spaces/robots/abstract.py
reset
¶
robot_model_root_name
staticmethod
¶
set_joint_pos
¶
set_stationary
¶
Set all controllers of the robot to stationary mode (if not already set), i.e., hold current positions or zero velocities.
Source code in molmo_spaces/robots/abstract.py
set_world_pose
¶
update_control
¶
Source code in molmo_spaces/robots/bimanual_yam.py
floating_robotiq
¶
Classes:
| Name | Description |
|---|---|
FloatingRobotiqRobot |
|
FloatingRobotiqRobot
¶
Bases: FloatingRUMRobot
Methods:
| Name | Description |
|---|---|
action_dim |
|
add_robot_to_scene |
|
apply_action_noise |
Apply action noise to the commanded action. |
apply_control_overrides |
|
compute_control |
|
get_arm_move_group_ids |
Get the move group IDs that should have TCP-bounded noise applied. |
last_unnoised_cmd_joint_pos |
Get the last unnoised joint position commands for the robot. |
reset |
|
robot_model_root_name |
|
set_joint_pos |
|
set_stationary |
Set all controllers of the robot to stationary mode (if not already set), |
set_world_pose |
|
update_control |
|
Attributes:
| Name | Type | Description |
|---|---|---|
controllers |
|
|
exp_config |
|
|
kinematics |
|
|
mj_data |
|
|
mj_model |
|
|
namespace |
|
|
parallel_kinematics |
|
|
robot_view |
|
|
state_dim |
|
Source code in molmo_spaces/robots/floating_rum.py
action_dim
¶
add_robot_to_scene
classmethod
¶
add_robot_to_scene(robot_config: BaseRobotConfig, spec: MjSpec, robot_spec: MjSpec, prefix: str, pos: list[float], quat: list[float], randomize_textures: bool = False) -> None
Source code in molmo_spaces/robots/floating_robotiq.py
apply_action_noise
¶
Apply action noise to the commanded action.
Each robot subclass can override this to customize noise behavior. Default implementation applies TCP-bounded noise to arm move groups returned by get_arm_move_group_ids().
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action
|
dict[str, Any]
|
Action dict with move_group_id -> joint positions |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Modified action dict with noise added |
Source code in molmo_spaces/robots/abstract.py
apply_control_overrides
classmethod
¶
Source code in molmo_spaces/robots/abstract.py
compute_control
¶
get_arm_move_group_ids
¶
Get the move group IDs that should have TCP-bounded noise applied.
Override in subclass to specify which move groups are arms. Default returns empty list (no noise applied).
Source code in molmo_spaces/robots/abstract.py
last_unnoised_cmd_joint_pos
¶
Get the last unnoised joint position commands for the robot.
Even if the commanded action was partial (due to e.g. noop), this will return the completely filled-in action. Done signals are not included. Non-position controlled move groups are not included.
Returns:
| Type | Description |
|---|---|
dict[str, ndarray] | None
|
The last unnoised joint position commands for the robot, or None if no action has been set yet. |
Source code in molmo_spaces/robots/abstract.py
reset
¶
robot_model_root_name
staticmethod
¶
set_joint_pos
¶
set_stationary
¶
Set all controllers of the robot to stationary mode (if not already set), i.e., hold current positions or zero velocities.
Source code in molmo_spaces/robots/abstract.py
set_world_pose
¶
update_control
¶
floating_rum
¶
Classes:
| Name | Description |
|---|---|
FloatingRUMRobot |
Floating RUM robot implementation for the framework. |
FloatingRUMRobot
¶
Bases: Robot
Floating RUM robot implementation for the framework.
Methods:
| Name | Description |
|---|---|
action_dim |
|
add_robot_to_scene |
|
apply_action_noise |
Apply action noise to the commanded action. |
apply_control_overrides |
|
compute_control |
|
get_arm_move_group_ids |
Get the move group IDs that should have TCP-bounded noise applied. |
last_unnoised_cmd_joint_pos |
Get the last unnoised joint position commands for the robot. |
reset |
|
robot_model_root_name |
|
set_joint_pos |
|
set_stationary |
Set all controllers of the robot to stationary mode (if not already set), |
set_world_pose |
|
update_control |
|
Attributes:
| Name | Type | Description |
|---|---|---|
controllers |
|
|
exp_config |
|
|
kinematics |
|
|
mj_data |
|
|
mj_model |
|
|
namespace |
|
|
parallel_kinematics |
|
|
robot_view |
|
|
state_dim |
|
Source code in molmo_spaces/robots/floating_rum.py
action_dim
¶
add_robot_to_scene
classmethod
¶
add_robot_to_scene(robot_config: BaseRobotConfig, spec: MjSpec, robot_spec: MjSpec, prefix: str, pos: list[float], quat: list[float], randomize_textures: bool = False) -> None
Source code in molmo_spaces/robots/floating_rum.py
apply_action_noise
¶
Apply action noise to the commanded action.
Each robot subclass can override this to customize noise behavior. Default implementation applies TCP-bounded noise to arm move groups returned by get_arm_move_group_ids().
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action
|
dict[str, Any]
|
Action dict with move_group_id -> joint positions |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Modified action dict with noise added |
Source code in molmo_spaces/robots/abstract.py
apply_control_overrides
classmethod
¶
Source code in molmo_spaces/robots/abstract.py
compute_control
¶
get_arm_move_group_ids
¶
Get the move group IDs that should have TCP-bounded noise applied.
Override in subclass to specify which move groups are arms. Default returns empty list (no noise applied).
Source code in molmo_spaces/robots/abstract.py
last_unnoised_cmd_joint_pos
¶
Get the last unnoised joint position commands for the robot.
Even if the commanded action was partial (due to e.g. noop), this will return the completely filled-in action. Done signals are not included. Non-position controlled move groups are not included.
Returns:
| Type | Description |
|---|---|
dict[str, ndarray] | None
|
The last unnoised joint position commands for the robot, or None if no action has been set yet. |
Source code in molmo_spaces/robots/abstract.py
reset
¶
robot_model_root_name
staticmethod
¶
set_joint_pos
¶
set_stationary
¶
Set all controllers of the robot to stationary mode (if not already set), i.e., hold current positions or zero velocities.
Source code in molmo_spaces/robots/abstract.py
set_world_pose
¶
update_control
¶
franka
¶
Classes:
| Name | Description |
|---|---|
FrankaRobot |
Franka robot implementation for the framework. |
Attributes:
| Name | Type | Description |
|---|---|---|
log |
|
FrankaRobot
¶
Bases: Robot
Franka robot implementation for the framework.
Methods:
| Name | Description |
|---|---|
action_dim |
|
add_robot_to_scene |
|
apply_action_noise |
Apply action noise to the commanded action. |
apply_control_overrides |
|
compute_control |
|
create_robot_base_material |
|
get_arm_move_group_ids |
Franka has a single arm move group. |
last_unnoised_cmd_joint_pos |
Get the last unnoised joint position commands for the robot. |
randomize_robot_textures |
|
reset |
|
robot_model_root_name |
|
set_joint_pos |
|
set_stationary |
Set all controllers of the robot to stationary mode (if not already set), |
set_world_pose |
|
update_control |
|
Attributes:
| Name | Type | Description |
|---|---|---|
controllers |
dict[str, Controller]
|
|
exp_config |
|
|
kinematics |
|
|
mj_data |
|
|
mj_model |
|
|
namespace |
|
|
parallel_kinematics |
|
|
robot_view |
|
|
state_dim |
int
|
|
Source code in molmo_spaces/robots/franka.py
action_dim
¶
add_robot_to_scene
classmethod
¶
add_robot_to_scene(robot_config: FrankaRobotConfig, spec: MjSpec, robot_spec: MjSpec, prefix: str, pos: list[float], quat: list[float], randomize_textures: bool = False) -> None
Source code in molmo_spaces/robots/franka.py
apply_action_noise
¶
Apply action noise to the commanded action.
Each robot subclass can override this to customize noise behavior. Default implementation applies TCP-bounded noise to arm move groups returned by get_arm_move_group_ids().
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action
|
dict[str, Any]
|
Action dict with move_group_id -> joint positions |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Modified action dict with noise added |
Source code in molmo_spaces/robots/abstract.py
apply_control_overrides
classmethod
¶
Source code in molmo_spaces/robots/abstract.py
compute_control
¶
create_robot_base_material
classmethod
¶
create_robot_base_material(robot_config: FrankaRobotConfig, spec: MjSpec, prefix: str, randomize_base_texture: bool) -> None
Source code in molmo_spaces/robots/franka.py
get_arm_move_group_ids
¶
last_unnoised_cmd_joint_pos
¶
Get the last unnoised joint position commands for the robot.
Even if the commanded action was partial (due to e.g. noop), this will return the completely filled-in action. Done signals are not included. Non-position controlled move groups are not included.
Returns:
| Type | Description |
|---|---|
dict[str, ndarray] | None
|
The last unnoised joint position commands for the robot, or None if no action has been set yet. |
Source code in molmo_spaces/robots/abstract.py
randomize_robot_textures
classmethod
¶
randomize_robot_textures(robot_config: FrankaRobotConfig, spec: MjSpec, prefix: str, robot_spec: MjSpec)
Source code in molmo_spaces/robots/franka.py
reset
¶
robot_model_root_name
staticmethod
¶
set_joint_pos
¶
set_stationary
¶
Set all controllers of the robot to stationary mode (if not already set), i.e., hold current positions or zero velocities.
Source code in molmo_spaces/robots/abstract.py
set_world_pose
¶
update_control
¶
Source code in molmo_spaces/robots/franka.py
i2rt_yam
¶
i2rt YAM robot implementation for the framework.
Classes:
| Name | Description |
|---|---|
I2rtYamRobot |
i2rt YAM 6-DOF arm robot implementation. |
I2rtYamRobot
¶
Bases: Robot
i2rt YAM 6-DOF arm robot implementation.
Methods:
| Name | Description |
|---|---|
action_dim |
|
add_robot_to_scene |
|
apply_action_noise |
Apply action noise to the commanded action. |
apply_control_overrides |
|
compute_control |
|
get_arm_move_group_ids |
YAM has a single arm move group. |
last_unnoised_cmd_joint_pos |
Get the last unnoised joint position commands for the robot. |
reset |
|
robot_model_root_name |
|
set_joint_pos |
|
set_stationary |
Set all controllers of the robot to stationary mode (if not already set), |
set_world_pose |
|
update_control |
|
Attributes:
| Name | Type | Description |
|---|---|---|
controllers |
|
|
exp_config |
|
|
kinematics |
|
|
mj_data |
|
|
mj_model |
|
|
namespace |
|
|
parallel_kinematics |
|
|
robot_view |
|
|
state_dim |
int
|
|
Source code in molmo_spaces/robots/i2rt_yam.py
action_dim
¶
add_robot_to_scene
classmethod
¶
add_robot_to_scene(robot_config: I2rtYamRobotConfig, spec: MjSpec, robot_spec: MjSpec, prefix: str, pos: list[float], quat: list[float], randomize_textures: bool = False) -> None
Source code in molmo_spaces/robots/i2rt_yam.py
apply_action_noise
¶
Apply action noise to the commanded action.
Each robot subclass can override this to customize noise behavior. Default implementation applies TCP-bounded noise to arm move groups returned by get_arm_move_group_ids().
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action
|
dict[str, Any]
|
Action dict with move_group_id -> joint positions |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Modified action dict with noise added |
Source code in molmo_spaces/robots/abstract.py
apply_control_overrides
classmethod
¶
Source code in molmo_spaces/robots/abstract.py
compute_control
¶
get_arm_move_group_ids
¶
last_unnoised_cmd_joint_pos
¶
Get the last unnoised joint position commands for the robot.
Even if the commanded action was partial (due to e.g. noop), this will return the completely filled-in action. Done signals are not included. Non-position controlled move groups are not included.
Returns:
| Type | Description |
|---|---|
dict[str, ndarray] | None
|
The last unnoised joint position commands for the robot, or None if no action has been set yet. |
Source code in molmo_spaces/robots/abstract.py
reset
¶
robot_model_root_name
staticmethod
¶
set_joint_pos
¶
set_stationary
¶
Set all controllers of the robot to stationary mode (if not already set), i.e., hold current positions or zero velocities.
Source code in molmo_spaces/robots/abstract.py
set_world_pose
¶
update_control
¶
Source code in molmo_spaces/robots/i2rt_yam.py
rby1
¶
Classes:
| Name | Description |
|---|---|
RBY1 |
RBY1 Robot class for the RBY1 robot. |
RBY1
¶
Bases: Robot
RBY1 Robot class for the RBY1 robot. This class extends the Robot class and provides specific implementations for the RBY1 robot including the robot view, controllers, and a kinematic solver.
The mode in which the robot arm, gripper, or base is commanded (Eg. ee position command or joint
position command) can be set using the arm_command_mode, gripper_command_mode, and base_command_mode
parameters in the robot configuration.
The move_group i.e., the set of robot parts that are to be moved can be dynamically changed, e.g., move base for navigation, then move both base and arm for opening doors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
exp_config
|
MlSpacesExpConfig
|
Experiment configuration params |
required |
mj_data
|
MjData
|
MuJoCo data structure containing the current simulation state |
required |
Methods:
| Name | Description |
|---|---|
action_dim |
|
add_robot_to_scene |
|
apply_action_noise |
Apply action noise to the commanded action. |
apply_control_overrides |
|
check_collision |
|
compute_control |
|
get_arm_move_group_ids |
RBY1 has two independent arms - each gets independent noise. |
get_grasped_objs |
Return a set of grasped object body IDs. |
get_joint_position |
Get the current joint positions of the move groups |
get_joint_ranges |
Get the joint ranges of the move groups |
get_world_pose_tf_mat |
Get the robot's world pose transformation matrix. |
last_unnoised_cmd_joint_pos |
Get the last unnoised joint position commands for the robot. |
reset |
Reset the robot to its initial position or a provided set of positions and world pose. |
robot_model_root_name |
|
set_joint_pos |
Set all the robot's joint positions to the specified values. |
set_stationary |
Set all controllers of the robot to stationary mode (if not already set), |
set_world_pose |
Set the robot's world pose to the specified location in the world. |
update_control |
Update the control inputs to the robot based on the provided action commands. |
Attributes:
Source code in molmo_spaces/robots/rby1.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | |
arm_command_mode
instance-attribute
¶
arm_command_modes
instance-attribute
¶
arm_command_modes = ['joint_position', 'joint_rel_position', 'joint_velocity', 'ee_position', 'ee_velocity']
base_command_mode
instance-attribute
¶
base_command_modes
instance-attribute
¶
base_command_modes = ['planar_position', 'planar_velocity', 'wheel_velocity', 'holo_joint_planar_position', 'holo_joint_rel_planar_position']
gripper_command_mode
instance-attribute
¶
gripper_command_modes
instance-attribute
¶
torso_command_mode
instance-attribute
¶
action_dim
¶
Source code in molmo_spaces/robots/rby1.py
add_robot_to_scene
classmethod
¶
add_robot_to_scene(robot_config: RobotConfig, spec: MjSpec, robot_spec: MjSpec, prefix: str, pos: list[float], quat: list[float], randomize_textures: bool = False) -> None
Source code in molmo_spaces/robots/rby1.py
apply_action_noise
¶
Apply action noise to the commanded action.
Extends the base class implementation to also apply base noise for RBY1's holonomic base commands.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action
|
dict[str, Any]
|
Action dict with move_group_id -> joint positions |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Modified action dict with noise added |
Source code in molmo_spaces/robots/rby1.py
apply_control_overrides
classmethod
¶
Source code in molmo_spaces/robots/abstract.py
check_collision
¶
compute_control
¶
get_arm_move_group_ids
¶
get_grasped_objs
¶
get_joint_position
¶
Get the current joint positions of the move groups
Source code in molmo_spaces/robots/rby1.py
get_joint_ranges
¶
Get the joint ranges of the move groups
Source code in molmo_spaces/robots/rby1.py
get_world_pose_tf_mat
¶
Get the robot's world pose transformation matrix. Returns: np.ndarray: 4x4 transformation matrix for the robot base pose in world frame
last_unnoised_cmd_joint_pos
¶
Get the last unnoised joint position commands for the robot.
Even if the commanded action was partial (due to e.g. noop), this will return the completely filled-in action. Done signals are not included. Non-position controlled move groups are not included.
Returns:
| Type | Description |
|---|---|
dict[str, ndarray] | None
|
The last unnoised joint position commands for the robot, or None if no action has been set yet. |
Source code in molmo_spaces/robots/abstract.py
reset
¶
Reset the robot to its initial position or a provided set of positions and world pose.
Source code in molmo_spaces/robots/rby1.py
robot_model_root_name
staticmethod
¶
set_joint_pos
¶
Set all the robot's joint positions to the specified values. Args: robot_joint_pos_dict: Dictionary or SimpleNamespace containing joint positions for the robot based on the move groups ids.
Source code in molmo_spaces/robots/rby1.py
set_stationary
¶
Set all controllers of the robot to stationary mode (if not already set), i.e., hold current positions or zero velocities.
Source code in molmo_spaces/robots/abstract.py
set_world_pose
¶
Set the robot's world pose to the specified location in the world.
Source code in molmo_spaces/robots/rby1.py
update_control
¶
Update the control inputs to the robot based on the provided action commands. Args: action_command_dict: Dictionary containing action commands for the robot based on the move groups ids to be used.
Source code in molmo_spaces/robots/rby1.py
robot_views
¶
Modules:
| Name | Description |
|---|---|
abstract |
This module defines the core abstractions for representing and controlling robots in MuJoCo. |
bimanual_yam_view |
Implementation of the bimanual YAM robot model. |
franka_cap_view |
|
franka_droid_view |
|
franka_fr3_view |
Implementation of the Franka FR3 robot model. |
i2rt_yam_view |
Implementation of the i2rt YAM robot model. |
rby1_view |
Implementation of the RBY1 robot model. |
rum_gripper_view |
|
stretch_dex_view |
|
abstract
¶
This module defines the core abstractions for representing and controlling robots in MuJoCo. The architecture is based on a hierarchical structure where a RobotView contains multiple MoveGroups, each representing an atomic collection of joints and actuators.
The key abstractions are: - MoveGroup: Base class for any collection of joints and actuators - Arm: A MoveGroup with additional gripper functionality - RobotBase: A MoveGroup that controls the overall robot pose - RobotView: Top-level class that contains and manages multiple MoveGroups
Classes:
| Name | Description |
|---|---|
FreeJointRobotBaseGroup |
A RobotBase that uses a free joint to represent its pose. |
GripperGroup |
|
HoloJointsRobotBaseGroup |
A RobotBase that uses virtual holonomic joints to represent its pose. |
ImmobileRobotBaseGroup |
A RobotBase that is immobile and does not have a mocap body. |
MocapRobotBaseGroup |
A RobotBase that uses a mocap body to represent its pose. |
MoveGroup |
Base class for any collection of joints and actuators in a robot. |
RobotBaseGroup |
A MoveGroup that controls the overall pose of the robot. |
RobotView |
Top-level class that contains and manages multiple MoveGroups. |
Attributes:
| Name | Type | Description |
|---|---|---|
RobotViewFactory |
TypeAlias
|
|
RobotViewFactory
module-attribute
¶
RobotViewFactory: TypeAlias = Callable[[MjData, str], RobotView]
FreeJointRobotBaseGroup
¶
FreeJointRobotBaseGroup(mj_data: MjData, base_joint_id: int, joint_ids: list[int], actuator_ids: list[int], floating=False)
Bases: RobotBaseGroup
A RobotBase that uses a free joint to represent its pose.
This implementation uses MuJoCo's free joint type to represent the base pose, which allows for full 6-DOF control of the robot's position and orientation.
Initialize a FreeJointRobotBase.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mj_data
|
MjData
|
The MuJoCo data structure containing the current simulation state |
required |
base_joint_id
|
int
|
The ID of the free joint that represents the base pose |
required |
joint_ids
|
list[int]
|
List of additional joint IDs that belong to this base |
required |
actuator_ids
|
list[int]
|
List of actuator IDs that control the base |
required |
floating
|
Whether the base is floating (concretely, whether IK should not constrain it to be on the ground) |
False
|
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
floating |
Whether the base is floating. |
|
is_mobile |
bool
|
Whether this base is mobile (has actuators). |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
ndarray
|
Get a control signal that maintains the current state. |
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
pose |
ndarray
|
|
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/abstract.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
noop_ctrl
abstractmethod
property
¶
Get a control signal that maintains the current state.
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
GripperGroup
¶
GripperGroup(mj_data: MjData, joint_ids: list[int], actuator_ids: list[int], root_body_id: int, robot_base_group: Optional[RobotBaseGroup] = None)
Bases: MoveGroup
Initialize a MoveGroup.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mj_data
|
MjData
|
The MuJoCo data structure containing the current simulation state |
required |
joint_ids
|
list[int]
|
List of joint IDs that belong to this move group |
required |
actuator_ids
|
list[int]
|
List of actuator IDs that control the joints |
required |
root_body_id
|
int
|
The ID of the root body of this move group |
required |
robot_base_group
|
Optional[RobotBaseGroup]
|
The RobotBaseGroup for the robot. If None, this MoveGroup is assumed to be the base. |
None
|
Methods:
| Name | Description |
|---|---|
get_jacobian |
Returns the (6, model.nv) jacobian of the move group. |
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
set_gripper_ctrl_open |
Set the gripper commanded position to be fully open or closed. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
inter_finger_dist |
float
|
The distance between the two fingers of the gripper. |
inter_finger_dist_range |
tuple[float, float]
|
The (min, max) of the distance between the two fingers of the gripper. |
is_open |
bool
|
Whether the gripper is open. |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
ndarray
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/abstract.py
inter_finger_dist
abstractmethod
property
¶
The distance between the two fingers of the gripper.
inter_finger_dist_range
abstractmethod
property
¶
The (min, max) of the distance between the two fingers of the gripper.
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
abstractmethod
¶
Returns the (6, model.nv) jacobian of the move group.
The jacobian maps joint velocities to the spatial velocity of the leaf frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 6xN numpy array where N is the number of degrees of freedom in the model. |
See: https://mujoco.readthedocs.io/en/stable/APIreference/APIfunctions.html#mj-jac
Source code in molmo_spaces/robots/robot_views/abstract.py
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
set_gripper_ctrl_open
abstractmethod
¶
Set the gripper commanded position to be fully open or closed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
open
|
bool
|
True to open the gripper, False to close it |
required |
Source code in molmo_spaces/robots/robot_views/abstract.py
HoloJointsRobotBaseGroup
¶
HoloJointsRobotBaseGroup(mj_data: MjData, world_site_id: int, holo_base_site_id: int, joint_ids: list[int], actuator_ids: list[int], root_body_id: int)
Bases: RobotBaseGroup
A RobotBase that uses virtual holonomic joints to represent its pose.
Assumes three virtual holonomic joints for x, y, and theta control.
Initialize a HoloJointsRobotBase that has virtual holonomic joints and uses site control.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mj_data
|
MjData
|
The MuJoCo data structure containing the current simulation state |
required |
world_site_id
|
int
|
The ID of the world site |
required |
holo_base_site_id
|
int
|
The ID of the site that represents the holonomic base pose |
required |
joint_ids
|
list[int]
|
List of joint IDs that belong to the virtual holonomic base pose. NOTE: Assumed order is [x, y, theta]. |
required |
actuator_ids
|
list[int]
|
List of actuator IDs that control the base |
required |
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the holonomic base actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
is_mobile |
bool
|
Whether this base is mobile (has actuators). |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
pose |
ndarray
|
|
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/abstract.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
ImmobileRobotBaseGroup
¶
Bases: RobotBaseGroup
A RobotBase that is immobile and does not have a mocap body.
This generally shouldn't be used, and MocapRobotBaseGroup should be preferred. If a scene is badly constructed and the robot base is not a mocap body, this might be necessary.
Initialize a ImmobileRobotBase.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mj_data
|
MjData
|
The MuJoCo data structure containing the simulation state |
required |
robot_base_body_id
|
int
|
The ID of the body that represents the robot base |
required |
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
is_mobile |
bool
|
Whether this base is mobile (has actuators). |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
pose |
ndarray
|
|
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/abstract.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
MocapRobotBaseGroup
¶
Bases: RobotBaseGroup
A RobotBase that uses a mocap body to represent its pose.
Initialize a MocapRobotBase.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mj_data
|
MjData
|
The MuJoCo data structure containing the simulation state |
required |
robot_base_body_id
|
int
|
The ID of the mocap body that represents the robot base. Not the Mocap ID! |
required |
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
is_mobile |
bool
|
Whether this base is mobile (has actuators). |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
pose |
ndarray
|
|
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/abstract.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
MoveGroup
¶
MoveGroup(mj_data: MjData, joint_ids: list[int], actuator_ids: list[int], root_body_id: int, robot_base_group: Optional[RobotBaseGroup] = None)
Bases: ABC
Base class for any collection of joints and actuators in a robot.
A MoveGroup represents an atomic collection of robotic joints and their associated actuators. It maintains a kinematic tree between a root frame and a leaf frame, and provides methods to control and query the state of its joints and actuators.
The class handles the low-level details of interfacing with MuJoCo's state vectors (qpos, qvel) and control signals (ctrl), providing a clean interface for higher-level control.
Initialize a MoveGroup.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mj_data
|
MjData
|
The MuJoCo data structure containing the current simulation state |
required |
joint_ids
|
list[int]
|
List of joint IDs that belong to this move group |
required |
actuator_ids
|
list[int]
|
List of actuator IDs that control the joints |
required |
root_body_id
|
int
|
The ID of the root body of this move group |
required |
robot_base_group
|
Optional[RobotBaseGroup]
|
The RobotBaseGroup for the robot. If None, this MoveGroup is assumed to be the base. |
None
|
Methods:
| Name | Description |
|---|---|
get_jacobian |
Returns the (6, model.nv) jacobian of the move group. |
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
ndarray
|
Get a control signal that maintains the current state. |
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/abstract.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
noop_ctrl
abstractmethod
property
¶
Get a control signal that maintains the current state.
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
abstractmethod
¶
Returns the (6, model.nv) jacobian of the move group.
The jacobian maps joint velocities to the spatial velocity of the leaf frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 6xN numpy array where N is the number of degrees of freedom in the model. |
See: https://mujoco.readthedocs.io/en/stable/APIreference/APIfunctions.html#mj-jac
Source code in molmo_spaces/robots/robot_views/abstract.py
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
RobotBaseGroup
¶
Bases: MoveGroup
A MoveGroup that controls the overall pose of the robot.
A RobotBase represents the base of a robot, which can be either mobile (e.g., wheeled) or immobile (e.g., fixed to a table). It provides methods to control and query the overall pose of the robot in the world frame.
Initialize a RobotBase.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mj_data
|
MjData
|
The MuJoCo data structure containing the current simulation state |
required |
joint_ids
|
list[int]
|
List of joint IDs that belong to this base |
required |
actuator_ids
|
list[int]
|
List of actuator IDs that control the base |
required |
Methods:
| Name | Description |
|---|---|
get_jacobian |
Returns the (6, model.nv) jacobian of the move group. |
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
is_mobile |
bool
|
Whether this base is mobile (has actuators). |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
ndarray
|
Get a control signal that maintains the current state. |
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
pose |
ndarray
|
Get the pose of the robot base relative to the world frame. |
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/abstract.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
noop_ctrl
abstractmethod
property
¶
Get a control signal that maintains the current state.
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
pose
abstractmethod
property
writable
¶
Get the pose of the robot base relative to the world frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from world to base frame. |
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
abstractmethod
¶
Returns the (6, model.nv) jacobian of the move group.
The jacobian maps joint velocities to the spatial velocity of the leaf frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 6xN numpy array where N is the number of degrees of freedom in the model. |
See: https://mujoco.readthedocs.io/en/stable/APIreference/APIfunctions.html#mj-jac
Source code in molmo_spaces/robots/robot_views/abstract.py
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
RobotView
¶
RobotView(mj_data: MjData, move_groups: dict[str, MoveGroup])
Bases: ABC
Top-level class that contains and manages multiple MoveGroups.
A RobotView represents a complete robot, composed of multiple MoveGroups (arms, base, etc.). It provides a unified interface to control and query the state of all move groups, and handles the coordination between different parts of the robot.
Initialize a RobotView.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mj_data
|
MjData
|
The MuJoCo data structure containing the current simulation state |
required |
move_groups
|
dict[str, MoveGroup]
|
Dictionary mapping move group names to their implementations |
required |
Methods:
| Name | Description |
|---|---|
get_ctrl_dict |
|
get_gripper |
Get a gripper by its ID. |
get_gripper_movegroup_ids |
Get the IDs of all gripper move groups in this robot. |
get_jacobian |
Calculate the Jacobian of a move group with respect to specific input move groups. |
get_move_group |
Get a move group by its ID. |
get_noop_ctrl_dict |
|
get_qpos_dict |
Get the joint positions of all move groups. |
get_qvel_dict |
Get the joint velocities of all move groups. |
move_group_ids |
Get the IDs of all move groups in this robot. |
set_qpos_dict |
Set the joint positions of all move groups. |
Attributes:
| Name | Type | Description |
|---|---|---|
base |
RobotBaseGroup
|
The base of the robot. |
mj_data |
|
|
mj_model |
|
|
n_grippers |
int
|
Number of grippers in this robot. |
name |
str
|
The name of this robot model. |
Source code in molmo_spaces/robots/robot_views/abstract.py
get_ctrl_dict
¶
get_gripper
¶
Get a gripper by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gripper_group_id
|
str
|
The ID of the gripper group to get |
required |
Source code in molmo_spaces/robots/robot_views/abstract.py
get_gripper_movegroup_ids
¶
Get the IDs of all gripper move groups in this robot.
Source code in molmo_spaces/robots/robot_views/abstract.py
get_jacobian
¶
Calculate the Jacobian of a move group with respect to specific input move groups.
This allows computing the Jacobian while locking certain joints (by excluding their move groups from input_move_group_ids).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_id
|
str
|
The ID of the move group to get the jacobian of |
required |
input_move_group_ids
|
list[str]
|
The IDs of the move groups to use as input |
required |
Returns: The (6, N) jacobian of the move group, where N is the total number of degrees of freedom of the input move groups.
See: https://mujoco.readthedocs.io/en/stable/APIreference/APIfunctions.html#mj-jac
Source code in molmo_spaces/robots/robot_views/abstract.py
get_move_group
¶
Get a move group by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mg_id
|
str
|
The ID of the move group to get |
required |
get_noop_ctrl_dict
¶
get_qpos_dict
¶
Get the joint positions of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_ids
|
list[str] | None
|
The IDs of the move groups to get the joint positions of. If None, all move groups will be included. |
None
|
Returns: A dictionary mapping move group IDs to their joint positions.
Source code in molmo_spaces/robots/robot_views/abstract.py
get_qvel_dict
¶
Get the joint velocities of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_ids
|
list[str] | None
|
The IDs of the move groups to get the joint velocities of. If None, all move groups will be included. |
None
|
Returns: A dictionary mapping move group IDs to their joint velocities.
Source code in molmo_spaces/robots/robot_views/abstract.py
move_group_ids
¶
set_qpos_dict
¶
Set the joint positions of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qpos_dict
|
dict[str, ndarray]
|
A dictionary mapping move group IDs to their joint positions. |
required |
Source code in molmo_spaces/robots/robot_views/abstract.py
bimanual_yam_view
¶
Implementation of the bimanual YAM robot model.
The bimanual YAM consists of two 6-DOF YAM arms with parallel grippers, positioned side by side (44cm apart), both facing forward.
Each arm component is implemented as a MoveGroup (left_arm, right_arm, left_gripper, right_gripper), with the overall robot structure managed by the BimanualYamRobotView class.
Classes:
| Name | Description |
|---|---|
BimanualYamArmGroup |
6-DOF arm group for one side of the bimanual YAM robot. |
BimanualYamBaseGroup |
Base group for the bimanual YAM robot using mocap body control. |
BimanualYamGripperGroup |
Parallel gripper group for one side of the bimanual YAM robot. |
BimanualYamRobotView |
Robot view for the bimanual YAM (two 6-DOF arms with parallel grippers). |
BimanualYamArmGroup
¶
BimanualYamArmGroup(mj_data: MjData, side: Literal['left', 'right'], base_group: BimanualYamBaseGroup, namespace: str = '', grasp_site_name: str = 'grasp_site')
Bases: MoveGroup
6-DOF arm group for one side of the bimanual YAM robot.
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
ndarray
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
side |
str
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/bimanual_yam_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
BimanualYamBaseGroup
¶
Bases: MocapRobotBaseGroup
Base group for the bimanual YAM robot using mocap body control.
The mocap body is created by add_robot_to_scene and serves as the root for both arms.
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
is_mobile |
bool
|
Whether this base is mobile (has actuators). |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
pose |
ndarray
|
|
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/bimanual_yam_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
BimanualYamGripperGroup
¶
BimanualYamGripperGroup(mj_data: MjData, side: Literal['left', 'right'], base_group: BimanualYamBaseGroup, namespace: str = '')
Bases: GripperGroup
Parallel gripper group for one side of the bimanual YAM robot.
The YAM gripper has two coupled fingers (left_finger and right_finger) controlled by a single actuator. The fingers move in opposite directions due to an equality constraint.
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
set_gripper_ctrl_open |
Set gripper to fully open or closed. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
inter_finger_dist |
float
|
Distance between fingers. |
inter_finger_dist_range |
tuple[float, float]
|
The (min, max) of the distance between the two fingers. |
is_open |
bool
|
Whether the gripper is open. |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
ndarray
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
side |
str
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/bimanual_yam_view.py
inter_finger_dist
property
¶
Distance between fingers.
Since fingers are coupled in opposite directions (right = -left), the total opening is the sum of absolute positions.
inter_finger_dist_range
property
¶
The (min, max) of the distance between the two fingers.
From XML: - left_finger range: -0.00205 to 0.037524 - right_finger range: -0.037524 to 0.00205 (mirrored) - Closed (both at 0): dist = 0 - Open (left at 0.037524, right at -0.037524): dist ~= 0.075
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
set_gripper_ctrl_open
¶
Set gripper to fully open or closed.
From XML: gripper actuator ctrlrange is 0.0 to 0.041 - 0.0 = closed - 0.041 = open
Source code in molmo_spaces/robots/robot_views/bimanual_yam_view.py
BimanualYamRobotView
¶
Bases: RobotView
Robot view for the bimanual YAM (two 6-DOF arms with parallel grippers).
Move groups: - base: Mocap body controlling both arms - left_arm: Left 6-DOF arm - right_arm: Right 6-DOF arm - left_gripper: Left parallel gripper - right_gripper: Right parallel gripper
Methods:
| Name | Description |
|---|---|
get_ctrl_dict |
|
get_gripper |
Get a gripper by its ID. |
get_gripper_movegroup_ids |
Get the IDs of all gripper move groups in this robot. |
get_jacobian |
Calculate the Jacobian of a move group with respect to specific input move groups. |
get_move_group |
Get a move group by its ID. |
get_noop_ctrl_dict |
|
get_qpos_dict |
Get the joint positions of all move groups. |
get_qvel_dict |
Get the joint velocities of all move groups. |
move_group_ids |
Get the IDs of all move groups in this robot. |
set_qpos_dict |
Set the joint positions of all move groups. |
Attributes:
| Name | Type | Description |
|---|---|---|
base |
BimanualYamBaseGroup
|
|
mj_data |
|
|
mj_model |
|
|
n_grippers |
int
|
Number of grippers in this robot. |
name |
str
|
|
Source code in molmo_spaces/robots/robot_views/bimanual_yam_view.py
get_ctrl_dict
¶
get_gripper
¶
Get a gripper by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gripper_group_id
|
str
|
The ID of the gripper group to get |
required |
Source code in molmo_spaces/robots/robot_views/abstract.py
get_gripper_movegroup_ids
¶
Get the IDs of all gripper move groups in this robot.
Source code in molmo_spaces/robots/robot_views/abstract.py
get_jacobian
¶
Calculate the Jacobian of a move group with respect to specific input move groups.
This allows computing the Jacobian while locking certain joints (by excluding their move groups from input_move_group_ids).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_id
|
str
|
The ID of the move group to get the jacobian of |
required |
input_move_group_ids
|
list[str]
|
The IDs of the move groups to use as input |
required |
Returns: The (6, N) jacobian of the move group, where N is the total number of degrees of freedom of the input move groups.
See: https://mujoco.readthedocs.io/en/stable/APIreference/APIfunctions.html#mj-jac
Source code in molmo_spaces/robots/robot_views/abstract.py
get_move_group
¶
Get a move group by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mg_id
|
str
|
The ID of the move group to get |
required |
get_noop_ctrl_dict
¶
get_qpos_dict
¶
Get the joint positions of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_ids
|
list[str] | None
|
The IDs of the move groups to get the joint positions of. If None, all move groups will be included. |
None
|
Returns: A dictionary mapping move group IDs to their joint positions.
Source code in molmo_spaces/robots/robot_views/abstract.py
get_qvel_dict
¶
Get the joint velocities of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_ids
|
list[str] | None
|
The IDs of the move groups to get the joint velocities of. If None, all move groups will be included. |
None
|
Returns: A dictionary mapping move group IDs to their joint velocities.
Source code in molmo_spaces/robots/robot_views/abstract.py
move_group_ids
¶
set_qpos_dict
¶
Set the joint positions of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qpos_dict
|
dict[str, ndarray]
|
A dictionary mapping move group IDs to their joint positions. |
required |
Source code in molmo_spaces/robots/robot_views/abstract.py
franka_cap_view
¶
Classes:
| Name | Description |
|---|---|
CAPGripperGroup |
|
FrankaCAPRobotView |
|
CAPGripperGroup
¶
CAPGripperGroup(mj_data: MjData, base_group: FrankaFR3BaseGroup, namespace: str = '')
Bases: GripperGroup
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
set_gripper_ctrl_open |
|
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
inter_finger_dist |
float
|
|
inter_finger_dist_range |
tuple[float, float]
|
|
is_open |
bool
|
Whether the gripper is open. |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
ndarray
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/franka_cap_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
FrankaCAPRobotView
¶
Bases: RobotView
Methods:
| Name | Description |
|---|---|
get_ctrl_dict |
|
get_gripper |
Get a gripper by its ID. |
get_gripper_movegroup_ids |
Get the IDs of all gripper move groups in this robot. |
get_jacobian |
Calculate the Jacobian of a move group with respect to specific input move groups. |
get_move_group |
Get a move group by its ID. |
get_noop_ctrl_dict |
|
get_qpos_dict |
Get the joint positions of all move groups. |
get_qvel_dict |
Get the joint velocities of all move groups. |
move_group_ids |
Get the IDs of all move groups in this robot. |
set_qpos_dict |
Set the joint positions of all move groups. |
Attributes:
| Name | Type | Description |
|---|---|---|
base |
FrankaFR3BaseGroup
|
|
mj_data |
|
|
mj_model |
|
|
n_grippers |
int
|
Number of grippers in this robot. |
name |
str
|
|
Source code in molmo_spaces/robots/robot_views/franka_cap_view.py
get_ctrl_dict
¶
get_gripper
¶
Get a gripper by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gripper_group_id
|
str
|
The ID of the gripper group to get |
required |
Source code in molmo_spaces/robots/robot_views/abstract.py
get_gripper_movegroup_ids
¶
Get the IDs of all gripper move groups in this robot.
Source code in molmo_spaces/robots/robot_views/abstract.py
get_jacobian
¶
Calculate the Jacobian of a move group with respect to specific input move groups.
This allows computing the Jacobian while locking certain joints (by excluding their move groups from input_move_group_ids).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_id
|
str
|
The ID of the move group to get the jacobian of |
required |
input_move_group_ids
|
list[str]
|
The IDs of the move groups to use as input |
required |
Returns: The (6, N) jacobian of the move group, where N is the total number of degrees of freedom of the input move groups.
See: https://mujoco.readthedocs.io/en/stable/APIreference/APIfunctions.html#mj-jac
Source code in molmo_spaces/robots/robot_views/abstract.py
get_move_group
¶
Get a move group by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mg_id
|
str
|
The ID of the move group to get |
required |
get_noop_ctrl_dict
¶
get_qpos_dict
¶
Get the joint positions of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_ids
|
list[str] | None
|
The IDs of the move groups to get the joint positions of. If None, all move groups will be included. |
None
|
Returns: A dictionary mapping move group IDs to their joint positions.
Source code in molmo_spaces/robots/robot_views/abstract.py
get_qvel_dict
¶
Get the joint velocities of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_ids
|
list[str] | None
|
The IDs of the move groups to get the joint velocities of. If None, all move groups will be included. |
None
|
Returns: A dictionary mapping move group IDs to their joint velocities.
Source code in molmo_spaces/robots/robot_views/abstract.py
move_group_ids
¶
set_qpos_dict
¶
Set the joint positions of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qpos_dict
|
dict[str, ndarray]
|
A dictionary mapping move group IDs to their joint positions. |
required |
Source code in molmo_spaces/robots/robot_views/abstract.py
franka_droid_view
¶
Classes:
| Name | Description |
|---|---|
FloatingRobotiq2f85BaseGroup |
|
FloatingRobotiq2f85RobotView |
|
FloatingRobotiqGripperGroup |
|
FrankaDroidRobotView |
|
RobotIQGripperGroup |
|
FloatingRobotiq2f85BaseGroup
¶
Bases: FreeJointRobotBaseGroup
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
is_mobile |
|
n_actuators |
|
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
|
|
ctrl_limits |
|
|
floating |
Whether the base is floating. |
|
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
pose |
ndarray
|
|
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/franka_droid_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
is_mobile
¶
FloatingRobotiq2f85RobotView
¶
Bases: RobotView
Methods:
| Name | Description |
|---|---|
get_ctrl_dict |
|
get_gripper |
Get a gripper by its ID. |
get_gripper_movegroup_ids |
Get the IDs of all gripper move groups in this robot. |
get_jacobian |
Calculate the Jacobian of a move group with respect to specific input move groups. |
get_move_group |
Get a move group by its ID. |
get_noop_ctrl_dict |
|
get_qpos_dict |
Get the joint positions of all move groups. |
get_qvel_dict |
Get the joint velocities of all move groups. |
move_group_ids |
Get the IDs of all move groups in this robot. |
set_qpos_dict |
Set the joint positions of all move groups. |
Attributes:
| Name | Type | Description |
|---|---|---|
base |
FloatingRobotiq2f85BaseGroup
|
|
mj_data |
|
|
mj_model |
|
|
n_grippers |
int
|
Number of grippers in this robot. |
name |
str
|
|
Source code in molmo_spaces/robots/robot_views/franka_droid_view.py
get_ctrl_dict
¶
get_gripper
¶
Get a gripper by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gripper_group_id
|
str
|
The ID of the gripper group to get |
required |
Source code in molmo_spaces/robots/robot_views/abstract.py
get_gripper_movegroup_ids
¶
Get the IDs of all gripper move groups in this robot.
Source code in molmo_spaces/robots/robot_views/abstract.py
get_jacobian
¶
Calculate the Jacobian of a move group with respect to specific input move groups.
This allows computing the Jacobian while locking certain joints (by excluding their move groups from input_move_group_ids).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_id
|
str
|
The ID of the move group to get the jacobian of |
required |
input_move_group_ids
|
list[str]
|
The IDs of the move groups to use as input |
required |
Returns: The (6, N) jacobian of the move group, where N is the total number of degrees of freedom of the input move groups.
See: https://mujoco.readthedocs.io/en/stable/APIreference/APIfunctions.html#mj-jac
Source code in molmo_spaces/robots/robot_views/abstract.py
get_move_group
¶
Get a move group by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mg_id
|
str
|
The ID of the move group to get |
required |
get_noop_ctrl_dict
¶
get_qpos_dict
¶
Get the joint positions of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_ids
|
list[str] | None
|
The IDs of the move groups to get the joint positions of. If None, all move groups will be included. |
None
|
Returns: A dictionary mapping move group IDs to their joint positions.
Source code in molmo_spaces/robots/robot_views/abstract.py
get_qvel_dict
¶
Get the joint velocities of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_ids
|
list[str] | None
|
The IDs of the move groups to get the joint velocities of. If None, all move groups will be included. |
None
|
Returns: A dictionary mapping move group IDs to their joint velocities.
Source code in molmo_spaces/robots/robot_views/abstract.py
move_group_ids
¶
set_qpos_dict
¶
Set the joint positions of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qpos_dict
|
dict[str, ndarray]
|
A dictionary mapping move group IDs to their joint positions. |
required |
Source code in molmo_spaces/robots/robot_views/abstract.py
FloatingRobotiqGripperGroup
¶
FloatingRobotiqGripperGroup(mj_data: MjData, base_group: FrankaFR3BaseGroup, namespace: str = '')
Bases: RobotIQGripperGroup
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
set_gripper_ctrl_open |
|
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
inter_finger_dist |
float
|
|
inter_finger_dist_range |
tuple[float, float]
|
|
is_open |
bool
|
Whether the gripper is open. |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
ndarray
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/franka_droid_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
FrankaDroidRobotView
¶
Bases: RobotView
Methods:
| Name | Description |
|---|---|
get_ctrl_dict |
|
get_gripper |
Get a gripper by its ID. |
get_gripper_movegroup_ids |
Get the IDs of all gripper move groups in this robot. |
get_jacobian |
Calculate the Jacobian of a move group with respect to specific input move groups. |
get_move_group |
Get a move group by its ID. |
get_noop_ctrl_dict |
|
get_qpos_dict |
Get the joint positions of all move groups. |
get_qvel_dict |
Get the joint velocities of all move groups. |
move_group_ids |
Get the IDs of all move groups in this robot. |
set_qpos_dict |
Set the joint positions of all move groups. |
Attributes:
| Name | Type | Description |
|---|---|---|
base |
FrankaFR3BaseGroup
|
|
mj_data |
|
|
mj_model |
|
|
n_grippers |
int
|
Number of grippers in this robot. |
name |
str
|
|
Source code in molmo_spaces/robots/robot_views/franka_droid_view.py
get_ctrl_dict
¶
get_gripper
¶
Get a gripper by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gripper_group_id
|
str
|
The ID of the gripper group to get |
required |
Source code in molmo_spaces/robots/robot_views/abstract.py
get_gripper_movegroup_ids
¶
Get the IDs of all gripper move groups in this robot.
Source code in molmo_spaces/robots/robot_views/abstract.py
get_jacobian
¶
Calculate the Jacobian of a move group with respect to specific input move groups.
This allows computing the Jacobian while locking certain joints (by excluding their move groups from input_move_group_ids).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_id
|
str
|
The ID of the move group to get the jacobian of |
required |
input_move_group_ids
|
list[str]
|
The IDs of the move groups to use as input |
required |
Returns: The (6, N) jacobian of the move group, where N is the total number of degrees of freedom of the input move groups.
See: https://mujoco.readthedocs.io/en/stable/APIreference/APIfunctions.html#mj-jac
Source code in molmo_spaces/robots/robot_views/abstract.py
get_move_group
¶
Get a move group by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mg_id
|
str
|
The ID of the move group to get |
required |
get_noop_ctrl_dict
¶
get_qpos_dict
¶
Get the joint positions of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_ids
|
list[str] | None
|
The IDs of the move groups to get the joint positions of. If None, all move groups will be included. |
None
|
Returns: A dictionary mapping move group IDs to their joint positions.
Source code in molmo_spaces/robots/robot_views/abstract.py
get_qvel_dict
¶
Get the joint velocities of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_ids
|
list[str] | None
|
The IDs of the move groups to get the joint velocities of. If None, all move groups will be included. |
None
|
Returns: A dictionary mapping move group IDs to their joint velocities.
Source code in molmo_spaces/robots/robot_views/abstract.py
move_group_ids
¶
set_qpos_dict
¶
Set the joint positions of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qpos_dict
|
dict[str, ndarray]
|
A dictionary mapping move group IDs to their joint positions. |
required |
Source code in molmo_spaces/robots/robot_views/abstract.py
RobotIQGripperGroup
¶
RobotIQGripperGroup(mj_data: MjData, base_group: FrankaFR3BaseGroup, namespace: str = '')
Bases: GripperGroup
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
set_gripper_ctrl_open |
|
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
inter_finger_dist |
float
|
|
inter_finger_dist_range |
tuple[float, float]
|
|
is_open |
bool
|
Whether the gripper is open. |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
ndarray
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/franka_droid_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
franka_fr3_view
¶
Implementation of the Franka FR3 robot model.
The Franka FR3 is a single-arm 7-DOF robot with a gripper.
Each component is implemented as a MoveGroup, with the overall robot structure managed by the FrankaFR3RobotView class.
Classes:
| Name | Description |
|---|---|
FrankaFR3ArmGroup |
|
FrankaFR3BaseGroup |
|
FrankaFR3GripperGroup |
|
FrankaFR3RobotView |
|
FrankaFR3ArmGroup
¶
FrankaFR3ArmGroup(mj_data: MjData, base_group: FrankaFR3BaseGroup, namespace: str = '', grasp_site_name: str = 'grasp_site')
Bases: MoveGroup
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
ndarray
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/franka_fr3_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
FrankaFR3BaseGroup
¶
Bases: MocapRobotBaseGroup
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
is_mobile |
bool
|
Whether this base is mobile (has actuators). |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
pose |
ndarray
|
|
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/franka_fr3_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
FrankaFR3GripperGroup
¶
FrankaFR3GripperGroup(mj_data: MjData, base_group: FrankaFR3BaseGroup, namespace: str = '')
Bases: GripperGroup
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
set_gripper_ctrl_open |
|
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
inter_finger_dist |
float
|
|
inter_finger_dist_range |
tuple[float, float]
|
|
is_open |
bool
|
Whether the gripper is open. |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
ndarray
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/franka_fr3_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
FrankaFR3RobotView
¶
Bases: RobotView
Methods:
| Name | Description |
|---|---|
get_ctrl_dict |
|
get_gripper |
Get a gripper by its ID. |
get_gripper_movegroup_ids |
Get the IDs of all gripper move groups in this robot. |
get_jacobian |
Calculate the Jacobian of a move group with respect to specific input move groups. |
get_move_group |
Get a move group by its ID. |
get_noop_ctrl_dict |
|
get_qpos_dict |
Get the joint positions of all move groups. |
get_qvel_dict |
Get the joint velocities of all move groups. |
move_group_ids |
Get the IDs of all move groups in this robot. |
set_qpos_dict |
Set the joint positions of all move groups. |
Attributes:
| Name | Type | Description |
|---|---|---|
base |
FrankaFR3BaseGroup
|
|
mj_data |
|
|
mj_model |
|
|
n_grippers |
int
|
Number of grippers in this robot. |
name |
str
|
|
Source code in molmo_spaces/robots/robot_views/franka_fr3_view.py
get_ctrl_dict
¶
get_gripper
¶
Get a gripper by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gripper_group_id
|
str
|
The ID of the gripper group to get |
required |
Source code in molmo_spaces/robots/robot_views/abstract.py
get_gripper_movegroup_ids
¶
Get the IDs of all gripper move groups in this robot.
Source code in molmo_spaces/robots/robot_views/abstract.py
get_jacobian
¶
Calculate the Jacobian of a move group with respect to specific input move groups.
This allows computing the Jacobian while locking certain joints (by excluding their move groups from input_move_group_ids).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_id
|
str
|
The ID of the move group to get the jacobian of |
required |
input_move_group_ids
|
list[str]
|
The IDs of the move groups to use as input |
required |
Returns: The (6, N) jacobian of the move group, where N is the total number of degrees of freedom of the input move groups.
See: https://mujoco.readthedocs.io/en/stable/APIreference/APIfunctions.html#mj-jac
Source code in molmo_spaces/robots/robot_views/abstract.py
get_move_group
¶
Get a move group by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mg_id
|
str
|
The ID of the move group to get |
required |
get_noop_ctrl_dict
¶
get_qpos_dict
¶
Get the joint positions of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_ids
|
list[str] | None
|
The IDs of the move groups to get the joint positions of. If None, all move groups will be included. |
None
|
Returns: A dictionary mapping move group IDs to their joint positions.
Source code in molmo_spaces/robots/robot_views/abstract.py
get_qvel_dict
¶
Get the joint velocities of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_ids
|
list[str] | None
|
The IDs of the move groups to get the joint velocities of. If None, all move groups will be included. |
None
|
Returns: A dictionary mapping move group IDs to their joint velocities.
Source code in molmo_spaces/robots/robot_views/abstract.py
move_group_ids
¶
set_qpos_dict
¶
Set the joint positions of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qpos_dict
|
dict[str, ndarray]
|
A dictionary mapping move group IDs to their joint positions. |
required |
Source code in molmo_spaces/robots/robot_views/abstract.py
i2rt_yam_view
¶
Implementation of the i2rt YAM robot model.
The YAM is a 6-DOF arm robot with a parallel gripper that has coupled fingers.
Each component is implemented as a MoveGroup, with the overall robot structure managed by the I2rtYamRobotView class.
Classes:
| Name | Description |
|---|---|
I2rtYamArmGroup |
6-DOF arm group for the YAM robot. |
I2rtYamBaseGroup |
Base group for the YAM robot using mocap body control. |
I2rtYamGripperGroup |
Parallel gripper group for the YAM robot. |
I2rtYamRobotView |
Robot view for the i2rt YAM 6-DOF arm with parallel gripper. |
I2rtYamArmGroup
¶
I2rtYamArmGroup(mj_data: MjData, base_group: I2rtYamBaseGroup, namespace: str = '', grasp_site_name: str = 'grasp_site')
Bases: MoveGroup
6-DOF arm group for the YAM robot.
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
ndarray
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/i2rt_yam_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
I2rtYamBaseGroup
¶
Bases: MocapRobotBaseGroup
Base group for the YAM robot using mocap body control.
Note: The mocap body is created by add_robot_to_scene and named 'base', not 'arm'. The 'arm' body from the XML is attached under this mocap body.
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
is_mobile |
bool
|
Whether this base is mobile (has actuators). |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
pose |
ndarray
|
|
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/i2rt_yam_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
I2rtYamGripperGroup
¶
I2rtYamGripperGroup(mj_data: MjData, base_group: I2rtYamBaseGroup, namespace: str = '')
Bases: GripperGroup
Parallel gripper group for the YAM robot.
The YAM gripper has two coupled fingers (left_finger and right_finger) controlled by a single actuator. The fingers move in opposite directions due to an equality constraint: right_finger = -left_finger.
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
set_gripper_ctrl_open |
Set gripper to fully open or closed. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
inter_finger_dist |
float
|
Distance between fingers. |
inter_finger_dist_range |
tuple[float, float]
|
The (min, max) of the distance between the two fingers. |
is_open |
bool
|
Whether the gripper is open. |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
ndarray
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/i2rt_yam_view.py
inter_finger_dist
property
¶
Distance between fingers.
Since fingers are coupled in opposite directions (right = -left), the total opening is the sum of absolute positions.
inter_finger_dist_range
property
¶
The (min, max) of the distance between the two fingers.
From XML: - left_finger range: -0.00205 to 0.037524 - right_finger range: -0.037524 to 0.00205 (mirrored) - Closed (both at 0): dist = 0 - Open (left at 0.037524, right at -0.037524): dist ~= 0.075
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
set_gripper_ctrl_open
¶
Set gripper to fully open or closed.
From XML: gripper actuator ctrlrange is 0.0 to 0.041 - 0.0 = closed - 0.041 = open
Source code in molmo_spaces/robots/robot_views/i2rt_yam_view.py
I2rtYamRobotView
¶
Bases: RobotView
Robot view for the i2rt YAM 6-DOF arm with parallel gripper.
Methods:
| Name | Description |
|---|---|
get_ctrl_dict |
|
get_gripper |
Get a gripper by its ID. |
get_gripper_movegroup_ids |
Get the IDs of all gripper move groups in this robot. |
get_jacobian |
Calculate the Jacobian of a move group with respect to specific input move groups. |
get_move_group |
Get a move group by its ID. |
get_noop_ctrl_dict |
|
get_qpos_dict |
Get the joint positions of all move groups. |
get_qvel_dict |
Get the joint velocities of all move groups. |
move_group_ids |
Get the IDs of all move groups in this robot. |
set_qpos_dict |
Set the joint positions of all move groups. |
Attributes:
| Name | Type | Description |
|---|---|---|
base |
I2rtYamBaseGroup
|
|
mj_data |
|
|
mj_model |
|
|
n_grippers |
int
|
Number of grippers in this robot. |
name |
str
|
|
Source code in molmo_spaces/robots/robot_views/i2rt_yam_view.py
get_ctrl_dict
¶
get_gripper
¶
Get a gripper by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gripper_group_id
|
str
|
The ID of the gripper group to get |
required |
Source code in molmo_spaces/robots/robot_views/abstract.py
get_gripper_movegroup_ids
¶
Get the IDs of all gripper move groups in this robot.
Source code in molmo_spaces/robots/robot_views/abstract.py
get_jacobian
¶
Calculate the Jacobian of a move group with respect to specific input move groups.
This allows computing the Jacobian while locking certain joints (by excluding their move groups from input_move_group_ids).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_id
|
str
|
The ID of the move group to get the jacobian of |
required |
input_move_group_ids
|
list[str]
|
The IDs of the move groups to use as input |
required |
Returns: The (6, N) jacobian of the move group, where N is the total number of degrees of freedom of the input move groups.
See: https://mujoco.readthedocs.io/en/stable/APIreference/APIfunctions.html#mj-jac
Source code in molmo_spaces/robots/robot_views/abstract.py
get_move_group
¶
Get a move group by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mg_id
|
str
|
The ID of the move group to get |
required |
get_noop_ctrl_dict
¶
get_qpos_dict
¶
Get the joint positions of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_ids
|
list[str] | None
|
The IDs of the move groups to get the joint positions of. If None, all move groups will be included. |
None
|
Returns: A dictionary mapping move group IDs to their joint positions.
Source code in molmo_spaces/robots/robot_views/abstract.py
get_qvel_dict
¶
Get the joint velocities of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_ids
|
list[str] | None
|
The IDs of the move groups to get the joint velocities of. If None, all move groups will be included. |
None
|
Returns: A dictionary mapping move group IDs to their joint velocities.
Source code in molmo_spaces/robots/robot_views/abstract.py
move_group_ids
¶
set_qpos_dict
¶
Set the joint positions of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qpos_dict
|
dict[str, ndarray]
|
A dictionary mapping move group IDs to their joint positions. |
required |
Source code in molmo_spaces/robots/robot_views/abstract.py
rby1_view
¶
Implementation of the RBY1 robot model.
The RBY1 is a humanoid robot with: - Two 7-DOF arms with grippers - A 6-DOF torso - A mobile base with two wheels - A 2-DOF head
Each component is implemented as a MoveGroup, with the overall robot structure managed by the RBY1 RobotView class.
Classes:
| Name | Description |
|---|---|
RBY1ArmGroup |
Implementation of the RBY1's 7-DOF arm, excluding the gripper. |
RBY1BaseGroup |
Implementation of the RBY1's mobile base. |
RBY1GripperGroup |
Implementation of the RBY1's gripper. |
RBY1HeadGroup |
Implementation of the RBY1's head. |
RBY1HoloBaseGroup |
Implementation of a RBY1 mobile base with virtual holonomic joints and site control. |
RBY1RobotView |
Implementation of the complete RBY1 robot. |
RBY1TorsoGroup |
Implementation of the RBY1's torso. |
RBY1ArmGroup
¶
RBY1ArmGroup(mj_data: MjData, side: Literal['left', 'right'], base: RobotBaseGroup, namespace: str = '')
Bases: MoveGroup
Implementation of the RBY1's 7-DOF arm, excluding the gripper.
Initialize an RBY1 arm.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mj_data
|
MjData
|
The MuJoCo data structure containing the current simulation state |
required |
side
|
Literal['left', 'right']
|
Which side of the robot this arm is on ("left" or "right") |
required |
namespace
|
str
|
Optional prefix for all joint/body names to support multiple robots |
''
|
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
ndarray
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
side |
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/rby1_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
RBY1BaseGroup
¶
Bases: FreeJointRobotBaseGroup
Implementation of the RBY1's mobile base.
The RBY1 base uses a free joint for its pose and has two wheels for mobility. The wheels are controlled independently, allowing for differential drive motion.
Initialize the RBY1 base.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mj_data
|
MjData
|
The MuJoCo data structure containing the current simulation state |
required |
namespace
|
str
|
Optional prefix for all joint/body names to support multiple robots |
''
|
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
floating |
Whether the base is floating. |
|
is_mobile |
bool
|
Whether this base is mobile (has actuators). |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
ndarray
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
pose |
ndarray
|
|
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/rby1_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
RBY1GripperGroup
¶
RBY1GripperGroup(mj_data: MjData, side: Literal['left', 'right'], base: RobotBaseGroup, namespace: str = '')
Bases: GripperGroup
Implementation of the RBY1's gripper.
The RBY1 gripper has 2 fingers that are mechanically coupled, allowing for open/close motion of the two fingers.
Initialize an RBY1 gripper.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mj_data
|
MjData
|
The MuJoCo data structure containing the current simulation state |
required |
side
|
Literal['left', 'right']
|
Which side of the robot this gripper is on ("left" or "right") |
required |
namespace
|
str
|
Optional prefix for all joint/body names to support multiple robots |
''
|
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
set_gripper_ctrl_open |
|
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the gripper actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
inter_finger_dist |
float
|
|
inter_finger_dist_range |
tuple[float, float]
|
|
is_open |
bool
|
Whether the gripper is open. |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
ndarray
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/rby1_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
RBY1HeadGroup
¶
RBY1HeadGroup(mj_data: MjData, base: RobotBaseGroup, namespace: str = '')
Bases: MoveGroup
Implementation of the RBY1's head.
The RBY1 head has 2 degrees of freedom, allowing for pan and tilt motion to look around the environment.
Initialize the RBY1 head.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mj_data
|
MjData
|
The MuJoCo data structure containing the current simulation state |
required |
namespace
|
str
|
Optional prefix for all joint/body names to support multiple robots |
''
|
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
ndarray
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/rby1_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
RBY1HoloBaseGroup
¶
Bases: HoloJointsRobotBaseGroup
Implementation of a RBY1 mobile base with virtual holonomic joints and site control.
The RBY1 base uses three virtual holonomic joints for x, y and theta control.
Initialize the RBY1 holo base.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mj_data
|
MjData
|
The MuJoCo data structure containing the current simulation state |
required |
namespace
|
str
|
Optional prefix for all joint/body names to support multiple robots |
''
|
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the holonomic base actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
is_mobile |
bool
|
Whether this base is mobile (has actuators). |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
pose |
ndarray
|
|
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/rby1_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
RBY1RobotView
¶
Bases: RobotView
Implementation of the complete RBY1 robot.
The RBY1 is a humanoid robot with: - Two 7-DOF arms with grippers - A 6-DOF torso - A mobile base with two wheels (or three holonomic joints) - A 2-DOF head
Each component is implemented as a MoveGroup, with the overall robot structure managed by this class.
Initialize the RBY1 robot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mj_data
|
MjData
|
The MuJoCo data structure containing the current simulation state |
required |
namespace
|
str
|
Optional prefix for all joint/body names to support multiple robots |
''
|
Methods:
| Name | Description |
|---|---|
distance_to |
Calculate the distance between the current joint positions of the move groups and the target pose |
get_ctrl_dict |
|
get_gripper |
Get a gripper by its ID. |
get_gripper_movegroup_ids |
Get the IDs of all gripper move groups in this robot. |
get_jacobian |
Calculate the Jacobian of a move group with respect to specific input move groups. |
get_joint_position |
Get the current joint positions of the move groups |
get_move_group |
Get a move group by its ID. |
get_noop_ctrl_dict |
|
get_qpos_dict |
Get the joint positions of all move groups. |
get_qvel_dict |
Get the joint velocities of all move groups. |
is_close_to |
Check if the current joint positions of the move groups are close to the target pose |
move_group_ids |
Get the IDs of all move groups in this robot. |
set_qpos_dict |
Set the joint positions of all move groups. |
Attributes:
| Name | Type | Description |
|---|---|---|
base |
|
|
mj_data |
|
|
mj_model |
|
|
n_grippers |
int
|
Number of grippers in this robot. |
name |
str
|
|
Source code in molmo_spaces/robots/robot_views/rby1_view.py
distance_to
¶
Calculate the distance between the current joint positions of the move groups and the target pose
Source code in molmo_spaces/robots/robot_views/rby1_view.py
get_ctrl_dict
¶
get_gripper
¶
Get a gripper by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gripper_group_id
|
str
|
The ID of the gripper group to get |
required |
Source code in molmo_spaces/robots/robot_views/abstract.py
get_gripper_movegroup_ids
¶
Get the IDs of all gripper move groups in this robot.
Source code in molmo_spaces/robots/robot_views/abstract.py
get_jacobian
¶
Calculate the Jacobian of a move group with respect to specific input move groups.
This allows computing the Jacobian while locking certain joints (by excluding their move groups from input_move_group_ids).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_id
|
str
|
The ID of the move group to get the jacobian of |
required |
input_move_group_ids
|
list[str]
|
The IDs of the move groups to use as input |
required |
Returns: The (6, N) jacobian of the move group, where N is the total number of degrees of freedom of the input move groups.
See: https://mujoco.readthedocs.io/en/stable/APIreference/APIfunctions.html#mj-jac
Source code in molmo_spaces/robots/robot_views/abstract.py
get_joint_position
¶
Get the current joint positions of the move groups
Source code in molmo_spaces/robots/robot_views/rby1_view.py
get_move_group
¶
Get a move group by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mg_id
|
str
|
The ID of the move group to get |
required |
get_noop_ctrl_dict
¶
get_qpos_dict
¶
Get the joint positions of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_ids
|
list[str] | None
|
The IDs of the move groups to get the joint positions of. If None, all move groups will be included. |
None
|
Returns: A dictionary mapping move group IDs to their joint positions.
Source code in molmo_spaces/robots/robot_views/abstract.py
get_qvel_dict
¶
Get the joint velocities of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_ids
|
list[str] | None
|
The IDs of the move groups to get the joint velocities of. If None, all move groups will be included. |
None
|
Returns: A dictionary mapping move group IDs to their joint velocities.
Source code in molmo_spaces/robots/robot_views/abstract.py
is_close_to
¶
Check if the current joint positions of the move groups are close to the target pose
Source code in molmo_spaces/robots/robot_views/rby1_view.py
move_group_ids
¶
set_qpos_dict
¶
Set the joint positions of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qpos_dict
|
dict[str, ndarray]
|
A dictionary mapping move group IDs to their joint positions. |
required |
Source code in molmo_spaces/robots/robot_views/abstract.py
RBY1TorsoGroup
¶
RBY1TorsoGroup(mj_data: MjData, base: RobotBaseGroup, namespace: str = '')
Bases: MoveGroup
Implementation of the RBY1's torso.
The RBY1 torso has 6 degrees of freedom, allowing for full control of the upper body's position and orientation relative to the base.
Initialize the RBY1 torso.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mj_data
|
MjData
|
The MuJoCo data structure containing the current simulation state |
required |
namespace
|
str
|
Optional prefix for all joint/body names to support multiple robots |
''
|
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
ndarray
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/rby1_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
rum_gripper_view
¶
Classes:
| Name | Description |
|---|---|
FloatingRUMBaseGroup |
A robot base group for the floating RUM gripper. |
FloatingRUMRobotView |
|
RUMGripperGroup |
|
Functions:
| Name | Description |
|---|---|
main |
|
FloatingRUMBaseGroup
¶
Bases: FreeJointRobotBaseGroup
A robot base group for the floating RUM gripper. The gripper is controlled via a target pose mocap body. Since this doesn't correspond to an actuator, we "fake" the actuators by overriding the appropriate methods and properties.
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
|
|
ctrl_limits |
|
|
floating |
Whether the base is floating. |
|
is_mobile |
|
|
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
|
|
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
pose |
ndarray
|
|
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/rum_gripper_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
FloatingRUMRobotView
¶
Bases: RobotView
Methods:
| Name | Description |
|---|---|
get_ctrl_dict |
|
get_gripper |
Get a gripper by its ID. |
get_gripper_movegroup_ids |
Get the IDs of all gripper move groups in this robot. |
get_jacobian |
Calculate the Jacobian of a move group with respect to specific input move groups. |
get_move_group |
Get a move group by its ID. |
get_noop_ctrl_dict |
|
get_qpos_dict |
Get the joint positions of all move groups. |
get_qvel_dict |
Get the joint velocities of all move groups. |
move_group_ids |
Get the IDs of all move groups in this robot. |
set_qpos_dict |
Set the joint positions of all move groups. |
Attributes:
| Name | Type | Description |
|---|---|---|
base |
FloatingRUMBaseGroup
|
|
mj_data |
|
|
mj_model |
|
|
n_grippers |
int
|
Number of grippers in this robot. |
name |
|
Source code in molmo_spaces/robots/robot_views/rum_gripper_view.py
get_ctrl_dict
¶
get_gripper
¶
Get a gripper by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gripper_group_id
|
str
|
The ID of the gripper group to get |
required |
Source code in molmo_spaces/robots/robot_views/abstract.py
get_gripper_movegroup_ids
¶
Get the IDs of all gripper move groups in this robot.
Source code in molmo_spaces/robots/robot_views/abstract.py
get_jacobian
¶
Calculate the Jacobian of a move group with respect to specific input move groups.
This allows computing the Jacobian while locking certain joints (by excluding their move groups from input_move_group_ids).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_id
|
str
|
The ID of the move group to get the jacobian of |
required |
input_move_group_ids
|
list[str]
|
The IDs of the move groups to use as input |
required |
Returns: The (6, N) jacobian of the move group, where N is the total number of degrees of freedom of the input move groups.
See: https://mujoco.readthedocs.io/en/stable/APIreference/APIfunctions.html#mj-jac
Source code in molmo_spaces/robots/robot_views/abstract.py
get_move_group
¶
Get a move group by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mg_id
|
str
|
The ID of the move group to get |
required |
get_noop_ctrl_dict
¶
get_qpos_dict
¶
Get the joint positions of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_ids
|
list[str] | None
|
The IDs of the move groups to get the joint positions of. If None, all move groups will be included. |
None
|
Returns: A dictionary mapping move group IDs to their joint positions.
Source code in molmo_spaces/robots/robot_views/abstract.py
get_qvel_dict
¶
Get the joint velocities of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_ids
|
list[str] | None
|
The IDs of the move groups to get the joint velocities of. If None, all move groups will be included. |
None
|
Returns: A dictionary mapping move group IDs to their joint velocities.
Source code in molmo_spaces/robots/robot_views/abstract.py
move_group_ids
¶
set_qpos_dict
¶
Set the joint positions of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qpos_dict
|
dict[str, ndarray]
|
A dictionary mapping move group IDs to their joint positions. |
required |
Source code in molmo_spaces/robots/robot_views/abstract.py
RUMGripperGroup
¶
RUMGripperGroup(mj_data: MjData, base_group: RobotBaseGroup, namespace: str = '')
Bases: GripperGroup
Methods:
| Name | Description |
|---|---|
get_jacobian |
|
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
set_gripper_ctrl_open |
|
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
inter_finger_dist |
float
|
|
inter_finger_dist_range |
tuple[float, float]
|
|
is_open |
bool
|
Whether the gripper is open. |
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_vel |
ndarray
|
Current joint velocities. |
leaf_frame_to_robot |
ndarray
|
Returns the pose of the leaf frame relative to the robot frame. |
leaf_frame_to_root |
ndarray
|
Returns the pose of the leaf frame relative to the root frame. |
leaf_frame_to_world |
ndarray
|
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
noop_ctrl |
ndarray
|
|
pos_dim |
int
|
Dimension of the ambient space of the manifold of joint positions. |
root_body_id |
int
|
The ID of the root body of this move group. |
root_frame_to_robot |
ndarray
|
Returns the pose of the root frame relative to the robot frame. |
root_frame_to_world |
ndarray
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/rum_gripper_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_to_robot
property
¶
Returns the pose of the leaf frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to leaf frame. |
leaf_frame_to_root
property
¶
Returns the pose of the leaf frame relative to the root frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from root to leaf frame. |
pos_dim
cached
property
¶
Dimension of the ambient space of the manifold of joint positions. This may be different from the number of joints, in the case of free or ball joints.
root_frame_to_robot
property
¶
Returns the pose of the root frame relative to the robot frame.
Returns:
| Type | Description |
|---|---|
ndarray
|
A 4x4 numpy array representing the rigid transformation from robot to root frame. |
vel_dim
cached
property
¶
Dimension of the space of joint velocities. This may be different from the number of position dimensions, in the case of free or ball joints.
get_jacobian
¶
integrate_joint_vel
¶
Integrate joint velocities by 1 unit time to get joint positions. This does not modify the state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_pos
|
ndarray
|
Joint positions at the start of the integration |
required |
joint_vel
|
ndarray
|
Joint velocities to integrate |
required |
Returns: Joint positions at the end of the integration
Source code in molmo_spaces/robots/robot_views/abstract.py
main
¶
Source code in molmo_spaces/robots/robot_views/rum_gripper_view.py
stretch_dex_view
¶
Classes:
| Name | Description |
|---|---|
NamespaceDictWrapper |
|
StretchDexRobotView |
|
NamespaceDictWrapper
¶
Methods:
| Name | Description |
|---|---|
__contains__ |
|
__getitem__ |
|
__len__ |
|
__setitem__ |
|
keys |
|
Attributes:
| Name | Type | Description |
|---|---|---|
d |
|
|
namespace |
|
Source code in molmo_spaces/robots/robot_views/stretch_dex_view.py
StretchDexRobotView
¶
Bases: RobotView
Methods:
| Name | Description |
|---|---|
__call__ |
|
calculate_head_angles_to_look_at_object |
Calculate the head angles to look at an object |
check_collision |
|
check_target_in_view |
|
ee_jacobian |
|
from_model |
|
get_actuator_joints |
|
get_camera_pose_rel_base |
|
get_ctrl_dict |
|
get_gripper |
Get a gripper by its ID. |
get_gripper_movegroup_ids |
Get the IDs of all gripper move groups in this robot. |
get_jacobian |
Calculate the Jacobian of a move group with respect to specific input move groups. |
get_move_group |
Get a move group by its ID. |
get_noop_ctrl_dict |
|
get_object_picked_up |
|
get_qpos_dict |
Get the joint positions of all move groups. |
get_qvel_dict |
Get the joint velocities of all move groups. |
init_gripper_pos |
|
init_joint_pos |
|
move_group_ids |
Get the IDs of all move groups in this robot. |
reset |
|
set_joint_qpos |
|
set_qpos_dict |
Set the joint positions of all move groups. |
update |
|
update_actuator_ctrl_inputs |
|
update_camera_poses |
|
update_ee_jacobian |
|
update_joints_pos |
|
update_rotation_matrix |
|
Attributes:
| Name | Type | Description |
|---|---|---|
GRIPPER_LEFT_NAME |
|
|
GRIPPER_RIGHT_NAME |
Default rotation matrix for the wrist when in top-down grasping pose. |
|
INIT_JOINT_POS |
|
|
STRETCH_TOPDOWN_WRIST_ROTATION |
Default joint positions for top-down grasping pose. |
|
TOPDOWN_JOINT_POS |
|
|
actuator_ctrl_inputs |
|
|
actuator_to_joints |
|
|
all_joint_pos |
all joints arm, gripper, head |
|
angvel |
|
|
arm_joint_pos |
|
|
base |
RobotBaseGroup
|
The base of the robot. |
base_pose |
|
|
camera_names |
|
|
ee_pose_from_base |
|
|
finger_body_ids |
|
|
grasp_center_from_base |
|
|
gripper_vel |
NoReturn
|
|
has_fallen |
|
|
head_camera_pose |
|
|
in_view_camera_name |
str
|
|
joint_limits |
|
|
joint_pos |
for planner. corresponing to state dim |
|
joint_pos_names |
in the order ctrl but index meant for joint_pos property |
|
joint_pos_names_all |
in the order ctrl but index meant for joint_pos property |
|
joints |
|
|
linvel |
|
|
mj_data |
|
|
mj_model |
|
|
n_grippers |
int
|
Number of grippers in this robot. |
name |
str
|
|
namespace |
|
|
position |
|
|
quaternion |
|
|
root_id |
int
|
|
rotation_matrix |
|
|
state_space_dim |
|
|
wrist_camera_pose |
|
Source code in molmo_spaces/robots/robot_views/stretch_dex_view.py
GRIPPER_RIGHT_NAME
class-attribute
instance-attribute
¶
Default rotation matrix for the wrist when in top-down grasping pose. This 3x3 matrix represents the orientation of the end-effector for a Stretch3 with DexWrist in top-down pose. The wrist is aligned vertically above the target.
INIT_JOINT_POS
class-attribute
instance-attribute
¶
STRETCH_TOPDOWN_WRIST_ROTATION
class-attribute
instance-attribute
¶
STRETCH_TOPDOWN_WRIST_ROTATION = array([[1.0, 0.02266, 0.0], [0.02256, -0.996, -0.0861], [0.0021403, 0.0860793, -1.0]])
Default joint positions for top-down grasping pose. 8-dimensional array corresponding to: [lift, arm_extend, wrist_yaw, wrist_pitch, wrist_roll, gripper, head_pan, head_tilt] The -1.57 (~90 degrees) pitch angle orients the gripper downward. The 0.1 lift position lifts the gripper up so the gripper does not touch the base.
TOPDOWN_JOINT_POS
class-attribute
instance-attribute
¶
joint_pos_names_all
property
¶
in the order ctrl but index meant for joint_pos property
__call__
¶
calculate_head_angles_to_look_at_object
¶
calculate_head_angles_to_look_at_object(object_transform, frame='global', base_transform=None, camera_transform=None, model=None, data=None)
Calculate the head angles to look at an object
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_transform
|
_type_
|
description |
None
|
camera_transform
|
_type_
|
description |
None
|
object_transform
|
_type_
|
description |
required |
frame
|
str
|
description. Defaults to "global". |
'global'
|
Source code in molmo_spaces/robots/robot_views/stretch_dex_view.py
check_collision
¶
Source code in molmo_spaces/robots/robot_views/stretch_dex_view.py
check_target_in_view
¶
check_target_in_view(target_id: int, data: MjData, camera_name: str, visualize: bool = False, device_id: int = None)
Source code in molmo_spaces/robots/robot_views/stretch_dex_view.py
ee_jacobian
¶
from_model
classmethod
¶
get_actuator_joints
¶
Source code in molmo_spaces/robots/robot_views/stretch_dex_view.py
get_camera_pose_rel_base
¶
Source code in molmo_spaces/robots/robot_views/stretch_dex_view.py
get_ctrl_dict
¶
get_gripper
¶
Get a gripper by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gripper_group_id
|
str
|
The ID of the gripper group to get |
required |
Source code in molmo_spaces/robots/robot_views/abstract.py
get_gripper_movegroup_ids
¶
Get the IDs of all gripper move groups in this robot.
Source code in molmo_spaces/robots/robot_views/abstract.py
get_jacobian
¶
Calculate the Jacobian of a move group with respect to specific input move groups.
This allows computing the Jacobian while locking certain joints (by excluding their move groups from input_move_group_ids).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_id
|
str
|
The ID of the move group to get the jacobian of |
required |
input_move_group_ids
|
list[str]
|
The IDs of the move groups to use as input |
required |
Returns: The (6, N) jacobian of the move group, where N is the total number of degrees of freedom of the input move groups.
See: https://mujoco.readthedocs.io/en/stable/APIreference/APIfunctions.html#mj-jac
Source code in molmo_spaces/robots/robot_views/abstract.py
get_move_group
¶
Get a move group by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mg_id
|
str
|
The ID of the move group to get |
required |
get_noop_ctrl_dict
¶
get_object_picked_up
¶
get_object_picked_up(model: MjModelBindings, data: MjData)
Source code in molmo_spaces/robots/robot_views/stretch_dex_view.py
get_qpos_dict
¶
Get the joint positions of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_ids
|
list[str] | None
|
The IDs of the move groups to get the joint positions of. If None, all move groups will be included. |
None
|
Returns: A dictionary mapping move group IDs to their joint positions.
Source code in molmo_spaces/robots/robot_views/abstract.py
get_qvel_dict
¶
Get the joint velocities of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
move_group_ids
|
list[str] | None
|
The IDs of the move groups to get the joint velocities of. If None, all move groups will be included. |
None
|
Returns: A dictionary mapping move group IDs to their joint velocities.
Source code in molmo_spaces/robots/robot_views/abstract.py
init_gripper_pos
¶
init_joint_pos
¶
move_group_ids
¶
reset
¶
Source code in molmo_spaces/robots/robot_views/stretch_dex_view.py
set_joint_qpos
¶
Source code in molmo_spaces/robots/robot_views/stretch_dex_view.py
set_qpos_dict
¶
Set the joint positions of all move groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qpos_dict
|
dict[str, ndarray]
|
A dictionary mapping move group IDs to their joint positions. |
required |