robots¶
robots
¶
Modules:
| Name | Description |
|---|---|
abstract |
|
bimanual_yam |
|
find_gripper_finger_range |
Script to find the inter finger distance range for all gripper move groups in a robot. |
floating_robotiq |
|
floating_rum |
|
franka |
|
g1 |
The G1 humanoid robot: g1_molmo's components/robot.py on molmo_spaces' |
i2rt_yam |
|
mobile_franka |
|
rby1 |
|
robot_views |
|
utils |
|
abstract
¶
Classes:
| Name | Description |
|---|---|
Robot |
|
Attributes:
| Name | Type | Description |
|---|---|---|
log |
|
Robot
¶
Robot(mj_data: MjData, robot_config: BaseRobotConfig)
Methods:
| Name | Description |
|---|---|
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 |
create_robot_sensors |
Get robot-specific sensors that should be registerd with a Task's sensor suite. |
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 pose in the world frame. |
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. |
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_config |
|
|
robot_view |
RobotView
|
robot view for interfacing with joints / links / actuators |
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_kinematics: ParallelKinematics
parallel kinematic solver for the robot
robot_view
abstractmethod
property
¶
robot_view: RobotView
robot view for interfacing with joints / links / actuators
add_robot_to_scene
classmethod
¶
add_robot_to_scene(robot_config: BaseRobotConfig, spec: MjSpec, prefix: str, pos: list[float], quat: list[float], randomize_textures: bool = False, strip_meshes: bool = False) -> None
Add a robot to a scene, taking care of any robot-specific considerations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_config
|
BaseRobotConfig
|
The robot config, of the corresponding derived class (i.e. FrankaConfig for Franka, etc.) |
required |
spec
|
MjSpec
|
The scene to insert the robot into |
required |
prefix
|
str
|
The prefix to use for the robot, i.e. the namespace |
required |
pos
|
list[float]
|
The position to use for the robot, either 2d or 3d. If 2d, the z-coordinate is assumed to be 0. |
required |
quat
|
list[float]
|
The quaternion to use for the robot, in [w, x, y, z] format. |
required |
randomize_textures
|
bool
|
Whether to randomize the textures of the robot, if applicable. Not supported by all robots. |
False
|
strip_meshes
|
bool
|
If True, remove all mesh geometries before insertion (for kinematics-only models). |
False
|
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
¶
apply_control_overrides(spec: MjSpec, robot_config: BaseRobotConfig)
Source code in molmo_spaces/robots/abstract.py
compute_control
¶
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
¶
Set all the robot's joint positions to the specified values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_joint_pos_dict
|
dict[str, ndarray]
|
Dictionary containing joint positions for the robot based on the move groups ids. |
required |
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
¶
Set the robot's world pose to the specified pose in the world frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_world_pose
|
ndarray | list[float]
|
The pose of the robot in the world frame. If (4, 4) numpy array, it is assumed to be a transformation matrix. If (3,) list or numpy array, it is assumed to be (x, y, yaw). If (7,) list or numpy array, it is assumed to be (xyz + wxyz). |
required |
Source code in molmo_spaces/robots/abstract.py
update_control
¶
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
|
dict[str, ndarray]
|
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
¶
Classes:
| Name | Description |
|---|---|
BimanualYamRobot |
|
BimanualYamRobot
¶
BimanualYamRobot(mj_data: MjData, config: BaseRobotConfig)
Bases: Robot
Methods:
| Name | Description |
|---|---|
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 |
create_robot_sensors |
Get robot-specific sensors that should be registerd with a Task's sensor suite. |
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 |
Reset the robot to its initial state or a provided state. |
robot_model_root_name |
The root body name in the bimanual_yam.xml. |
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 pose in the world frame. |
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. |
kinematics |
kinematic solver for the robot |
|
mj_data |
|
|
mj_model |
|
|
namespace |
robot namespace used to differentiate between one or multiple robots and the environment |
|
parallel_kinematics |
parallel kinematic solver for the robot |
|
robot_config |
|
|
robot_view |
robot view for interfacing with joints / links / actuators |
Source code in molmo_spaces/robots/bimanual_yam.py
controllers
property
¶
controllers: dict[str, Controller]
One or more controllers for the robot joints / wheels / etc.
namespace
property
¶
robot namespace used to differentiate between one or multiple robots and the environment
add_robot_to_scene
classmethod
¶
add_robot_to_scene(robot_config: BimanualYamRobotConfig, spec: MjSpec, prefix: str, pos: list[float], quat: list[float], randomize_textures: bool = False, strip_meshes: bool = False) -> None
Add a robot to a scene, taking care of any robot-specific considerations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_config
|
BaseRobotConfig
|
The robot config, of the corresponding derived class (i.e. FrankaConfig for Franka, etc.) |
required |
spec
|
MjSpec
|
The scene to insert the robot into |
required |
prefix
|
str
|
The prefix to use for the robot, i.e. the namespace |
required |
pos
|
list[float]
|
The position to use for the robot, either 2d or 3d. If 2d, the z-coordinate is assumed to be 0. |
required |
quat
|
list[float]
|
The quaternion to use for the robot, in [w, x, y, z] format. |
required |
randomize_textures
|
bool
|
Whether to randomize the textures of the robot, if applicable. Not supported by all robots. |
False
|
strip_meshes
|
bool
|
If True, remove all mesh geometries before insertion (for kinematics-only models). |
False
|
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
¶
apply_control_overrides(spec: MjSpec, robot_config: BaseRobotConfig)
Source code in molmo_spaces/robots/abstract.py
compute_control
¶
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
create_robot_sensors
¶
Get robot-specific sensors that should be registerd with a Task's sensor suite.
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
¶
Reset the robot to its initial state or a provided state.
robot_model_root_name
staticmethod
¶
set_joint_pos
¶
Set all the robot's joint positions to the specified values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_joint_pos_dict
|
dict[str, ndarray]
|
Dictionary containing joint positions for the robot based on the move groups ids. |
required |
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
¶
Set the robot's world pose to the specified pose in the world frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_world_pose
|
ndarray | list[float]
|
The pose of the robot in the world frame. If (4, 4) numpy array, it is assumed to be a transformation matrix. If (3,) list or numpy array, it is assumed to be (x, y, yaw). If (7,) list or numpy array, it is assumed to be (xyz + wxyz). |
required |
Source code in molmo_spaces/robots/abstract.py
update_control
¶
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
|
dict[str, ndarray]
|
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
find_gripper_finger_range
¶
Script to find the inter finger distance range for all gripper move groups in a robot. This is useful for adding new robots to MolmoSpaces.
Functions:
| Name | Description |
|---|---|
get_args |
|
main |
|
get_args
¶
Source code in molmo_spaces/robots/find_gripper_finger_range.py
main
¶
Source code in molmo_spaces/robots/find_gripper_finger_range.py
floating_robotiq
¶
Classes:
| Name | Description |
|---|---|
FloatingRobotiqRobot |
|
FloatingRobotiqRobot
¶
FloatingRobotiqRobot(mj_data: MjData, config: BaseRobotConfig)
Bases: FloatingRUMRobot
Methods:
| Name | Description |
|---|---|
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 |
create_robot_sensors |
Get robot-specific sensors that should be registerd with a Task's sensor suite. |
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 pose in the world frame. |
update_control |
Update the control targets to the robot based on the provided action commands. |
Attributes:
| Name | Type | Description |
|---|---|---|
controllers |
One or more controllers for the robot joints / wheels / etc. |
|
kinematics |
kinematic solver for the robot |
|
mj_data |
|
|
mj_model |
|
|
namespace |
robot namespace used to differentiate between one or multiple robots and the environment |
|
parallel_kinematics |
parallel kinematic solver for the robot |
|
robot_config |
|
|
robot_view |
robot view for interfacing with joints / links / actuators |
Source code in molmo_spaces/robots/floating_rum.py
namespace
property
¶
robot namespace used to differentiate between one or multiple robots and the environment
add_robot_to_scene
classmethod
¶
add_robot_to_scene(robot_config: BaseRobotConfig, spec: MjSpec, prefix: str, pos: list[float], quat: list[float], randomize_textures: bool = False, strip_meshes: bool = False) -> None
Add a robot to a scene, taking care of any robot-specific considerations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_config
|
BaseRobotConfig
|
The robot config, of the corresponding derived class (i.e. FrankaConfig for Franka, etc.) |
required |
spec
|
MjSpec
|
The scene to insert the robot into |
required |
prefix
|
str
|
The prefix to use for the robot, i.e. the namespace |
required |
pos
|
list[float]
|
The position to use for the robot, either 2d or 3d. If 2d, the z-coordinate is assumed to be 0. |
required |
quat
|
list[float]
|
The quaternion to use for the robot, in [w, x, y, z] format. |
required |
randomize_textures
|
bool
|
Whether to randomize the textures of the robot, if applicable. Not supported by all robots. |
False
|
strip_meshes
|
bool
|
If True, remove all mesh geometries before insertion (for kinematics-only models). |
False
|
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
¶
apply_control_overrides(spec: MjSpec, robot_config: BaseRobotConfig)
Source code in molmo_spaces/robots/abstract.py
compute_control
¶
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/floating_rum.py
create_robot_sensors
¶
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
¶
Reset the robot to its initial state or a provided state.
robot_model_root_name
staticmethod
¶
set_joint_pos
¶
Set all the robot's joint positions to the specified values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_joint_pos_dict
|
dict[str, ndarray]
|
Dictionary containing joint positions for the robot based on the move groups ids. |
required |
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
¶
Set the robot's world pose to the specified pose in the world frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_world_pose
|
ndarray | list[float]
|
The pose of the robot in the world frame. If (4, 4) numpy array, it is assumed to be a transformation matrix. If (3,) list or numpy array, it is assumed to be (x, y, yaw). If (7,) list or numpy array, it is assumed to be (xyz + wxyz). |
required |
Source code in molmo_spaces/robots/abstract.py
update_control
¶
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
|
dict[str, ndarray]
|
Dictionary containing action commands for the robot based on the move groups ids to be used. |
required |
floating_rum
¶
Classes:
| Name | Description |
|---|---|
FloatingRUMRobot |
|
FloatingRUMRobot
¶
FloatingRUMRobot(mj_data: MjData, config: BaseRobotConfig)
Bases: Robot
Methods:
| Name | Description |
|---|---|
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 |
create_robot_sensors |
Get robot-specific sensors that should be registerd with a Task's sensor suite. |
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 pose in the world frame. |
update_control |
Update the control targets to the robot based on the provided action commands. |
Attributes:
| Name | Type | Description |
|---|---|---|
controllers |
One or more controllers for the robot joints / wheels / etc. |
|
kinematics |
kinematic solver for the robot |
|
mj_data |
|
|
mj_model |
|
|
namespace |
robot namespace used to differentiate between one or multiple robots and the environment |
|
parallel_kinematics |
parallel kinematic solver for the robot |
|
robot_config |
|
|
robot_view |
robot view for interfacing with joints / links / actuators |
Source code in molmo_spaces/robots/floating_rum.py
namespace
property
¶
robot namespace used to differentiate between one or multiple robots and the environment
add_robot_to_scene
classmethod
¶
add_robot_to_scene(robot_config: BaseRobotConfig, spec: MjSpec, prefix: str, pos: list[float], quat: list[float], randomize_textures: bool = False, strip_meshes: bool = False) -> None
Add a robot to a scene, taking care of any robot-specific considerations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_config
|
BaseRobotConfig
|
The robot config, of the corresponding derived class (i.e. FrankaConfig for Franka, etc.) |
required |
spec
|
MjSpec
|
The scene to insert the robot into |
required |
prefix
|
str
|
The prefix to use for the robot, i.e. the namespace |
required |
pos
|
list[float]
|
The position to use for the robot, either 2d or 3d. If 2d, the z-coordinate is assumed to be 0. |
required |
quat
|
list[float]
|
The quaternion to use for the robot, in [w, x, y, z] format. |
required |
randomize_textures
|
bool
|
Whether to randomize the textures of the robot, if applicable. Not supported by all robots. |
False
|
strip_meshes
|
bool
|
If True, remove all mesh geometries before insertion (for kinematics-only models). |
False
|
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
¶
apply_control_overrides(spec: MjSpec, robot_config: BaseRobotConfig)
Source code in molmo_spaces/robots/abstract.py
compute_control
¶
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/floating_rum.py
create_robot_sensors
¶
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
¶
Reset the robot to its initial state or a provided state.
robot_model_root_name
staticmethod
¶
set_joint_pos
¶
Set all the robot's joint positions to the specified values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_joint_pos_dict
|
dict[str, ndarray]
|
Dictionary containing joint positions for the robot based on the move groups ids. |
required |
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
¶
Set the robot's world pose to the specified pose in the world frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_world_pose
|
ndarray | list[float]
|
The pose of the robot in the world frame. If (4, 4) numpy array, it is assumed to be a transformation matrix. If (3,) list or numpy array, it is assumed to be (x, y, yaw). If (7,) list or numpy array, it is assumed to be (xyz + wxyz). |
required |
Source code in molmo_spaces/robots/abstract.py
update_control
¶
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
|
dict[str, ndarray]
|
Dictionary containing action commands for the robot based on the move groups ids to be used. |
required |
franka
¶
Classes:
| Name | Description |
|---|---|
FrankaRobot |
|
Attributes:
| Name | Type | Description |
|---|---|---|
log |
|
FrankaRobot
¶
FrankaRobot(mj_data: MjData, config: BaseRobotConfig)
Bases: Robot
Methods:
| Name | Description |
|---|---|
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 |
create_robot_base_material |
|
create_robot_sensors |
Get robot-specific sensors that should be registerd with a Task's sensor suite. |
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. |
merge_gripper_pads |
Fuse each finger's two pad boxes into one, so they share no seam. |
randomize_robot_textures |
|
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 pose in the world frame. |
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. |
kinematics |
kinematic solver for the robot |
|
mj_data |
|
|
mj_model |
|
|
namespace |
robot namespace used to differentiate between one or multiple robots and the environment |
|
parallel_kinematics |
parallel kinematic solver for the robot |
|
robot_config |
|
|
robot_view |
robot view for interfacing with joints / links / actuators |
Source code in molmo_spaces/robots/franka.py
controllers
property
¶
controllers: dict[str, Controller]
One or more controllers for the robot joints / wheels / etc.
namespace
property
¶
robot namespace used to differentiate between one or multiple robots and the environment
add_robot_to_scene
classmethod
¶
add_robot_to_scene(robot_config: FrankaRobotConfig, spec: MjSpec, prefix: str, pos: list[float], quat: list[float], randomize_textures: bool = False, strip_meshes: bool = False) -> None
Add a robot to a scene, taking care of any robot-specific considerations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_config
|
BaseRobotConfig
|
The robot config, of the corresponding derived class (i.e. FrankaConfig for Franka, etc.) |
required |
spec
|
MjSpec
|
The scene to insert the robot into |
required |
prefix
|
str
|
The prefix to use for the robot, i.e. the namespace |
required |
pos
|
list[float]
|
The position to use for the robot, either 2d or 3d. If 2d, the z-coordinate is assumed to be 0. |
required |
quat
|
list[float]
|
The quaternion to use for the robot, in [w, x, y, z] format. |
required |
randomize_textures
|
bool
|
Whether to randomize the textures of the robot, if applicable. Not supported by all robots. |
False
|
strip_meshes
|
bool
|
If True, remove all mesh geometries before insertion (for kinematics-only models). |
False
|
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
¶
apply_control_overrides(spec: MjSpec, robot_config: BaseRobotConfig)
Source code in molmo_spaces/robots/abstract.py
compute_control
¶
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
create_robot_base_material
classmethod
¶
create_robot_base_material(robot_config: FrankaRobotConfig, spec: MjSpec, prefix: str, randomize_base_texture: bool) -> str
Source code in molmo_spaces/robots/franka.py
create_robot_sensors
¶
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
merge_gripper_pads
classmethod
¶
Fuse each finger's two pad boxes into one, so they share no seam.
Each Robotiq finger carries its pad as two stacked boxes on one body,
pad1 and pad2. An object thin enough to penetrate that boundary ends up
inside both boxes at once, and each pushes it out of itself and therefore
into the other. The surviving collider is pad2, which is the geom the
robot views identify each finger by. Returns how many fingers were merged.
Source code in molmo_spaces/robots/franka.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
¶
Reset the robot to its initial state or a provided state.
robot_model_root_name
staticmethod
¶
set_joint_pos
¶
Set all the robot's joint positions to the specified values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_joint_pos_dict
|
dict[str, ndarray]
|
Dictionary containing joint positions for the robot based on the move groups ids. |
required |
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
¶
Set the robot's world pose to the specified pose in the world frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_world_pose
|
ndarray | list[float]
|
The pose of the robot in the world frame. If (4, 4) numpy array, it is assumed to be a transformation matrix. If (3,) list or numpy array, it is assumed to be (x, y, yaw). If (7,) list or numpy array, it is assumed to be (xyz + wxyz). |
required |
Source code in molmo_spaces/robots/abstract.py
update_control
¶
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
|
dict[str, ndarray]
|
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
g1
¶
The G1 humanoid robot: g1_molmo's components/robot.py on molmo_spaces'
Robot interface, verified byte-identical against the gold pick rollout
(projects/fetchman/scripts/). G1Config constructs it through
from_mj_data; its whole-body controller is controllers/g1_wbc.py.
Classes:
| Name | Description |
|---|---|
G1Robot |
|
G1RobotView |
Pose/contact/visibility helpers for the G1 (the reference stack's |
Attributes:
HAND_ARM_JOINTS
module-attribute
¶
JOINT_NAMES
module-attribute
¶
JOINT_NAMES = ['left_hip_pitch_joint', 'left_hip_roll_joint', 'left_hip_yaw_joint', 'left_knee_joint', 'left_ankle_pitch_joint', 'left_ankle_roll_joint', 'right_hip_pitch_joint', 'right_hip_roll_joint', 'right_hip_yaw_joint', 'right_knee_joint', 'right_ankle_pitch_joint', 'right_ankle_roll_joint', 'waist_yaw_joint', 'waist_roll_joint', 'waist_pitch_joint', 'left_shoulder_pitch_joint', 'left_shoulder_roll_joint', 'left_shoulder_yaw_joint', 'left_elbow_joint', 'left_wrist_roll_joint', 'left_wrist_pitch_joint', 'left_wrist_yaw_joint', 'right_shoulder_pitch_joint', 'right_shoulder_roll_joint', 'right_shoulder_yaw_joint', 'right_elbow_joint', 'right_wrist_roll_joint', 'right_wrist_pitch_joint', 'right_wrist_yaw_joint', 'right_Joint1_1']
WAIST_JOINTS
module-attribute
¶
G1Robot
¶
G1Robot(data: MjData, robot_config: G1Config, env=None, low_level=None, namespace: str = PREFIX, xml_path: str = XML_PATH, gripper_friction: tuple[float, float, float] | None = None)
Bases: Robot
Methods:
| Name | Description |
|---|---|
add_robot_to_scene |
Add a robot to a scene, taking care of any robot-specific considerations. |
advance_control_clock |
Advance the WBC's decimation clock by one tick. The reference policy |
apply_action_noise |
Apply action noise to the commanded action. |
apply_arm_pose |
Apply a {joint_name: qpos_value} dict produced by IK to the scene qpos. |
apply_control_overrides |
Actuator/gain configuration is done at runtime by |
apply_upper_pose |
|
check_object_visibility |
|
close |
Free the lazily-created visibility renderer (and its GL/EGL context). |
compute_control |
Robot.compute_control, dispatching in G1WholeBodyController.execute_action's |
create_robot_sensors |
Robot.create_robot_sensors: this robot's own state sensors, which |
execute_action |
|
from_mj_data |
molmo_spaces' |
get_arm_move_group_ids |
Get the move group IDs that should have TCP-bounded noise applied. |
get_xy |
|
get_yaw |
|
has_bad_contacts |
|
kinematics_wbc |
gold's G1Controller._solve_ik_wbc: mink IK on a standalone robot-only |
last_unnoised_cmd_joint_pos |
Get the last unnoised joint position commands for the robot. |
nav_action |
A full flat-15 action that walks toward |
pelvis_height |
|
place |
|
reset |
Robot ABC reset: DEFAULT_QPOS (the reference stack's settled standing |
robot_model_root_name |
Robot ABC hook used by the scene builder to find the robot's root |
sample_upper_pose |
|
set_defaults |
|
set_env |
Wires the low-level controller to |
set_joint_pos |
Set all the robot's joint positions to the specified values. |
set_pose |
|
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 pose in the world frame. |
solve_scene_ik |
Full-scene mink IK (gold's GraspPolicy._solve_ik) on the live scene |
state_is_finite |
|
update_control |
Robot.update_control: a move-group dict, whose "legs_waist" entry is |
waypoint_to_velocity_target |
Absolute [x, y, yaw] waypoint -> the WBC's [vx, vy, yaw_rate] base |
zero_velocities |
|
Attributes:
| Name | Type | Description |
|---|---|---|
act_ids |
|
|
controllers |
{move_group_name: Controller}, matching molmo_spaces/robots/ |
|
data |
|
|
kinematics |
Robot ABC's kinematics solver. Built lazily: the reference stack |
|
left_gripper_aid |
|
|
mj_data |
|
|
mj_model |
|
|
model |
|
|
n_substeps |
|
|
namespace |
robot namespace used to differentiate between one or multiple robots and the environment |
|
parallel_kinematics |
Robot ABC's parallel kinematics. DummyParallelKinematics matches |
|
right_gripper_aid |
|
|
robot_config |
|
|
robot_view |
Robot ABC's RobotView: the MoveGroup view of robot_views/g1_view.py |
Source code in molmo_spaces/robots/g1.py
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | |
controllers
property
¶
{move_group_name: Controller}, matching molmo_spaces/robots/ abstract.py's Robot.controllers.
kinematics
property
¶
Robot ABC's kinematics solver. Built lazily: the reference stack constructs this robot with no robot_config at all (it drives the arm through solve_scene_ik/kinematics_wbc, never through MlSpacesKinematics), so requiring one up front would break that path. Native callers that do pass a robot_config get the same solver every other molmo_spaces Robot exposes.
left_gripper_aid
instance-attribute
¶
left_gripper_aid = mj.mj_name2id(self.model, mj.mjtObj.mjOBJ_ACTUATOR, f'{self._namespace}left_grip')
namespace
property
¶
robot namespace used to differentiate between one or multiple robots and the environment
parallel_kinematics
property
¶
Robot ABC's parallel kinematics. DummyParallelKinematics matches what native G1Robot uses -- G1 has no batched-IK backend.
right_gripper_aid
instance-attribute
¶
right_gripper_aid = mj.mj_name2id(self.model, mj.mjtObj.mjOBJ_ACTUATOR, f'{self._namespace}right_grip')
robot_view
property
¶
Robot ABC's RobotView: the MoveGroup view of robot_views/g1_view.py when constructed with a robot_config (molmo_spaces' factory), else the reference stack's pose helper view. The pass-through methods always use the pose view, whichever is published here.
add_robot_to_scene
classmethod
¶
add_robot_to_scene(robot_config: BaseRobotConfig, spec: MjSpec, prefix: str, pos: list[float], quat: list[float], randomize_textures: bool = False, strip_meshes: bool = False) -> None
Add a robot to a scene, taking care of any robot-specific considerations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_config
|
BaseRobotConfig
|
The robot config, of the corresponding derived class (i.e. FrankaConfig for Franka, etc.) |
required |
spec
|
MjSpec
|
The scene to insert the robot into |
required |
prefix
|
str
|
The prefix to use for the robot, i.e. the namespace |
required |
pos
|
list[float]
|
The position to use for the robot, either 2d or 3d. If 2d, the z-coordinate is assumed to be 0. |
required |
quat
|
list[float]
|
The quaternion to use for the robot, in [w, x, y, z] format. |
required |
randomize_textures
|
bool
|
Whether to randomize the textures of the robot, if applicable. Not supported by all robots. |
False
|
strip_meshes
|
bool
|
If True, remove all mesh geometries before insertion (for kinematics-only models). |
False
|
Source code in molmo_spaces/robots/abstract.py
advance_control_clock
¶
Advance the WBC's decimation clock by one tick. The reference policy owns the control loop and does this itself; anything else driving the robot has to, or the gait clock never ticks.
Source code in molmo_spaces/robots/g1.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_arm_pose
¶
Apply a {joint_name: qpos_value} dict produced by IK to the scene qpos. Only writes joints in JOINT_NAMES (skips legs/freejoint). Also mirrors right_Joint2_1 to right_Joint1_1.
Source code in molmo_spaces/robots/g1.py
apply_control_overrides
classmethod
¶
Actuator/gain configuration is done at runtime by G1WholeBodyController.setup() on the compiled MjModel, so this only carries the spec-time fix that cannot be done later: the MJCF puts the head/mount/ logo visual geoms on group 5, which no renderer in this codebase enables, so the G1 renders headless. Move them to group 2 like the rest of the robot.
Source code in molmo_spaces/robots/g1.py
apply_upper_pose
¶
Source code in molmo_spaces/robots/g1.py
check_object_visibility
¶
close
¶
Free the lazily-created visibility renderer (and its GL/EGL context). Must be called before dropping the robot on scene reload — otherwise the renderer's framebuffer leaks on the render GPU because del-based EGL teardown is unreliable, so VRAM creeps to OOM across reloads.
Source code in molmo_spaces/robots/g1.py
compute_control
¶
Robot.compute_control, dispatching in G1WholeBodyController.execute_action's controller order (load-bearing: legs_waist torque uses the previous tick's _target_lower before the WBC updates it).
Source code in molmo_spaces/robots/g1.py
create_robot_sensors
¶
Robot.create_robot_sensors: this robot's own state sensors, which BaseMujocoTask (and fetchman's G1Task) append to the task's suite.
Source code in molmo_spaces/robots/g1.py
execute_action
¶
from_mj_data
classmethod
¶
from_mj_data(mj_data, robot_config) -> G1Robot
molmo_spaces' (mj_data, robot_config) robot-factory constructor;
__init__ keeps the reference stack's explicit (model, data) pair.
Source code in molmo_spaces/robots/g1.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
get_xy
¶
get_yaw
¶
has_bad_contacts
¶
kinematics_wbc
¶
kinematics_wbc(target_pos, target_rot=None, hand='right', avoid_self_collision=False, precision=False)
gold's G1Controller._solve_ik_wbc: mink IK on a standalone robot-only
model synced from the live scene qpos. precision selects the tighter
iteration/convergence settings gold used from PHASE_DESCEND on.
Returns (arm, waist, ik_h, err).
Source code in molmo_spaces/robots/g1.py
884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 | |
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
nav_action
¶
A full flat-15 action that walks toward waypoint while holding the
current arm/gripper pose -- the navigation counterpart to the grasp
policy's own action assembly (see g1_wbc.ACTION_DIM's layout:
[vx, vy, yaw_rate, height, waist(3), right_arm(7), gripper]).
Source code in molmo_spaces/robots/g1.py
pelvis_height
¶
place
¶
reset
¶
Robot ABC reset: DEFAULT_QPOS (the reference stack's settled standing pose, not G1Config.init_qpos) plus the WBC's internal state.
Source code in molmo_spaces/robots/g1.py
robot_model_root_name
staticmethod
¶
Robot ABC hook used by the scene builder to find the robot's root body in its MJCF. Same body the deleted g1_old_reference used -- both wrapped the same g1_dex.xml.
Source code in molmo_spaces/robots/g1.py
sample_upper_pose
¶
Source code in molmo_spaces/robots/g1.py
set_defaults
¶
Source code in molmo_spaces/robots/g1.py
set_env
¶
Wires the low-level controller to env (mj model opt overrides,
n_substeps, floor friction -- see g1_wbc.G1WholeBodyController.
set_env). Called by env_g1ms.py's _load_scene once self is
assigned to env.robot (set_env reads env.robot.n_substeps, so it
can't run from inside init, before that assignment exists).
Source code in molmo_spaces/robots/g1.py
set_joint_pos
¶
Set all the robot's joint positions to the specified values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_joint_pos_dict
|
dict[str, ndarray]
|
Dictionary containing joint positions for the robot based on the move groups ids. |
required |
Source code in molmo_spaces/robots/abstract.py
set_pose
¶
set_pose(xy, yaw, z=STANDING_HEIGHT)
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 pose in the world frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_world_pose
|
ndarray | list[float]
|
The pose of the robot in the world frame. If (4, 4) numpy array, it is assumed to be a transformation matrix. If (3,) list or numpy array, it is assumed to be (x, y, yaw). If (7,) list or numpy array, it is assumed to be (xyz + wxyz). |
required |
Source code in molmo_spaces/robots/abstract.py
solve_scene_ik
¶
Full-scene mink IK (gold's GraspPolicy._solve_ik) on the live scene
model. ik_joints and col_limit are the caller's, being
grasp-specific. Returns {unprefixed_joint_name: qpos} for every joint.
Source code in molmo_spaces/robots/g1.py
667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 | |
state_is_finite
¶
update_control
¶
Robot.update_control: a move-group dict, whose "legs_waist" entry is
[vx, vy, yaw_rate, height, waist(3)], translated to the reference
controller's (cmd3, height, waist3). execute_action is the reference
stack's own flat-15 path and is untouched.
Source code in molmo_spaces/robots/g1.py
waypoint_to_velocity_target
¶
Absolute [x, y, yaw] waypoint -> the WBC's [vx, vy, yaw_rate] base command, in the robot's own body frame. Same bridge (and same constants) as native molmo_spaces/robots/g1.py, which is what lets a molmo_spaces navigation policy drive this robot: the reference stack has no such bridge because its policy emits base velocities directly.
Source code in molmo_spaces/robots/g1.py
G1RobotView
¶
G1RobotView(model, data, body_id, freejoint_id, cam_ids, dof_ids, namespace: str = PREFIX)
Pose/contact/visibility helpers for the G1 (the reference stack's view); G1Robot keeps same-named pass-throughs.
Methods:
| Name | Description |
|---|---|
check_object_visibility |
|
close |
Free the lazily-created visibility renderer (and its GL/EGL context). |
get_xy |
|
get_yaw |
|
has_bad_contacts |
|
pelvis_height |
|
set_pose |
|
zero_velocities |
|
Attributes:
| Name | Type | Description |
|---|---|---|
data |
|
|
model |
|
Source code in molmo_spaces/robots/g1.py
check_object_visibility
¶
Source code in molmo_spaces/robots/g1.py
close
¶
Free the lazily-created visibility renderer (and its GL/EGL context). Must be called before dropping the robot on scene reload — otherwise the renderer's framebuffer leaks on the render GPU because del-based EGL teardown is unreliable, so VRAM creeps to OOM across reloads.
Source code in molmo_spaces/robots/g1.py
get_xy
¶
get_yaw
¶
has_bad_contacts
¶
Source code in molmo_spaces/robots/g1.py
pelvis_height
¶
set_pose
¶
set_pose(xy, yaw, z=STANDING_HEIGHT)
Source code in molmo_spaces/robots/g1.py
i2rt_yam
¶
Classes:
| Name | Description |
|---|---|
I2rtYamRobot |
|
I2rtYamRobot
¶
I2rtYamRobot(mj_data: MjData, config: BaseRobotConfig)
Bases: Robot
Methods:
| Name | Description |
|---|---|
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 |
create_robot_sensors |
Get robot-specific sensors that should be registerd with a Task's sensor suite. |
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 |
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 pose in the world frame. |
update_control |
Update the control targets to the robot based on the provided action commands. |
Attributes:
| Name | Type | Description |
|---|---|---|
controllers |
One or more controllers for the robot joints / wheels / etc. |
|
kinematics |
kinematic solver for the robot |
|
mj_data |
|
|
mj_model |
|
|
namespace |
robot namespace used to differentiate between one or multiple robots and the environment |
|
parallel_kinematics |
parallel kinematic solver for the robot |
|
robot_config |
|
|
robot_view |
robot view for interfacing with joints / links / actuators |
Source code in molmo_spaces/robots/i2rt_yam.py
namespace
property
¶
robot namespace used to differentiate between one or multiple robots and the environment
add_robot_to_scene
classmethod
¶
add_robot_to_scene(robot_config: I2rtYamRobotConfig, spec: MjSpec, prefix: str, pos: list[float], quat: list[float], randomize_textures: bool = False, strip_meshes: bool = False) -> None
Add a robot to a scene, taking care of any robot-specific considerations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_config
|
BaseRobotConfig
|
The robot config, of the corresponding derived class (i.e. FrankaConfig for Franka, etc.) |
required |
spec
|
MjSpec
|
The scene to insert the robot into |
required |
prefix
|
str
|
The prefix to use for the robot, i.e. the namespace |
required |
pos
|
list[float]
|
The position to use for the robot, either 2d or 3d. If 2d, the z-coordinate is assumed to be 0. |
required |
quat
|
list[float]
|
The quaternion to use for the robot, in [w, x, y, z] format. |
required |
randomize_textures
|
bool
|
Whether to randomize the textures of the robot, if applicable. Not supported by all robots. |
False
|
strip_meshes
|
bool
|
If True, remove all mesh geometries before insertion (for kinematics-only models). |
False
|
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
¶
apply_control_overrides(spec: MjSpec, robot_config: BaseRobotConfig)
Source code in molmo_spaces/robots/abstract.py
compute_control
¶
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
create_robot_sensors
¶
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
¶
Reset the robot to its initial state or a provided state.
robot_model_root_name
staticmethod
¶
set_joint_pos
¶
Set all the robot's joint positions to the specified values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_joint_pos_dict
|
dict[str, ndarray]
|
Dictionary containing joint positions for the robot based on the move groups ids. |
required |
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
¶
Set the robot's world pose to the specified pose in the world frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_world_pose
|
ndarray | list[float]
|
The pose of the robot in the world frame. If (4, 4) numpy array, it is assumed to be a transformation matrix. If (3,) list or numpy array, it is assumed to be (x, y, yaw). If (7,) list or numpy array, it is assumed to be (xyz + wxyz). |
required |
Source code in molmo_spaces/robots/abstract.py
update_control
¶
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
|
dict[str, ndarray]
|
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
mobile_franka
¶
Classes:
| Name | Description |
|---|---|
MobileFrankaRobot |
|
Attributes:
| Name | Type | Description |
|---|---|---|
data |
|
|
house_xml_path |
|
|
houses |
|
|
init_qpos |
|
|
log |
|
|
mg |
|
|
model |
|
|
robot_config |
|
|
spec |
|
|
view |
|
init_qpos
module-attribute
¶
init_qpos = {key: np.array(val) for key, val in robot_config.init_qpos.items()}
MobileFrankaRobot
¶
MobileFrankaRobot(mj_data: MjData, config: BaseRobotConfig)
Bases: Robot
Methods:
| Name | Description |
|---|---|
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 |
create_robot_base_material |
|
create_robot_sensors |
Get robot-specific sensors that should be registerd with a Task's sensor suite. |
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 pose in the world frame. |
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. |
kinematics |
kinematic solver for the robot |
|
mj_data |
|
|
mj_model |
|
|
namespace |
robot namespace used to differentiate between one or multiple robots and the environment |
|
parallel_kinematics |
parallel kinematic solver for the robot |
|
robot_config |
|
|
robot_view |
robot view for interfacing with joints / links / actuators |
Source code in molmo_spaces/robots/mobile_franka.py
controllers
property
¶
controllers: dict[str, Controller]
One or more controllers for the robot joints / wheels / etc.
namespace
property
¶
robot namespace used to differentiate between one or multiple robots and the environment
add_robot_to_scene
classmethod
¶
add_robot_to_scene(robot_config: MobileFrankaRobotConfig, spec: MjSpec, prefix: str, pos: list[float], quat: list[float], randomize_textures: bool = False, strip_meshes: bool = False) -> None
Add a robot to a scene, taking care of any robot-specific considerations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_config
|
BaseRobotConfig
|
The robot config, of the corresponding derived class (i.e. FrankaConfig for Franka, etc.) |
required |
spec
|
MjSpec
|
The scene to insert the robot into |
required |
prefix
|
str
|
The prefix to use for the robot, i.e. the namespace |
required |
pos
|
list[float]
|
The position to use for the robot, either 2d or 3d. If 2d, the z-coordinate is assumed to be 0. |
required |
quat
|
list[float]
|
The quaternion to use for the robot, in [w, x, y, z] format. |
required |
randomize_textures
|
bool
|
Whether to randomize the textures of the robot, if applicable. Not supported by all robots. |
False
|
strip_meshes
|
bool
|
If True, remove all mesh geometries before insertion (for kinematics-only models). |
False
|
Source code in molmo_spaces/robots/mobile_franka.py
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 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | |
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
¶
apply_control_overrides(spec: MjSpec, robot_config: BaseRobotConfig)
Source code in molmo_spaces/robots/abstract.py
compute_control
¶
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
create_robot_base_material
classmethod
¶
create_robot_base_material(robot_config: MobileFrankaRobotConfig, spec: MjSpec, prefix: str, randomize_base_texture: bool) -> str
Source code in molmo_spaces/robots/mobile_franka.py
create_robot_sensors
¶
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
¶
Reset the robot to its initial state or a provided state.
robot_model_root_name
staticmethod
¶
set_joint_pos
¶
Set all the robot's joint positions to the specified values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_joint_pos_dict
|
dict[str, ndarray]
|
Dictionary containing joint positions for the robot based on the move groups ids. |
required |
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
¶
Set the robot's world pose to the specified pose in the world frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_world_pose
|
ndarray | list[float]
|
The pose of the robot in the world frame. If (4, 4) numpy array, it is assumed to be a transformation matrix. If (3,) list or numpy array, it is assumed to be (x, y, yaw). If (7,) list or numpy array, it is assumed to be (xyz + wxyz). |
required |
Source code in molmo_spaces/robots/abstract.py
update_control
¶
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
|
dict[str, ndarray]
|
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
rby1
¶
Classes:
| Name | Description |
|---|---|
RBY1 |
RBY1 Robot class for the RBY1 robot. |
RBY1
¶
RBY1(mj_data: MjData, config: BaseRobotConfig)
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.
Methods:
| Name | Description |
|---|---|
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 |
create_robot_sensors |
Get robot-specific sensors that should be registerd with a Task's sensor suite. |
get_arm_move_group_ids |
RBY1 has two independent arms - each gets independent noise. |
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 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 pose in the world frame. |
update_control |
Update the control targets to the robot based on the provided action commands. |
Attributes:
| Name | Type | Description |
|---|---|---|
arm_command_mode |
|
|
arm_command_modes |
|
|
base_command_mode |
|
|
base_command_modes |
|
|
controllers |
dict[str, Controller]
|
One or more controllers for the robot joints / wheels / etc. |
gripper_command_mode |
|
|
gripper_command_modes |
|
|
head_command_mode |
|
|
kinematics |
kinematic solver for the robot |
|
mj_data |
|
|
mj_model |
|
|
namespace |
robot namespace used to differentiate between one or multiple robots and the environment |
|
parallel_kinematics |
parallel kinematic solver for the robot |
|
robot_config |
|
|
robot_view |
robot view for interfacing with joints / links / actuators |
|
torso_command_mode |
|
|
torso_command_modes |
|
Source code in molmo_spaces/robots/rby1.py
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 192 193 194 195 | |
arm_command_mode
instance-attribute
¶
arm_command_mode = 'joint_position' if not self.robot_config.command_mode['arm'] else self.robot_config.command_mode['arm']
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_mode = 'planar_position' if not self.robot_config.command_mode['base'] else self.robot_config.command_mode['base']
base_command_modes
instance-attribute
¶
base_command_modes = ['planar_position', 'planar_velocity', 'wheel_velocity', 'holo_joint_planar_position', 'holo_joint_rel_planar_position']
controllers
property
¶
controllers: dict[str, Controller]
One or more controllers for the robot joints / wheels / etc.
gripper_command_mode
instance-attribute
¶
gripper_command_mode = 'joint_position' if not self.robot_config.command_mode['gripper'] else self.robot_config.command_mode['gripper']
gripper_command_modes
instance-attribute
¶
head_command_mode
instance-attribute
¶
namespace
property
¶
robot namespace used to differentiate between one or multiple robots and the environment
torso_command_mode
instance-attribute
¶
torso_command_mode = self.robot_config.command_mode.get('torso', 'joint_position') or 'joint_position'
add_robot_to_scene
classmethod
¶
add_robot_to_scene(robot_config: BaseRobotConfig, spec: MjSpec, prefix: str, pos: list[float], quat: list[float], randomize_textures: bool = False, strip_meshes: bool = False) -> None
Add a robot to a scene, taking care of any robot-specific considerations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_config
|
BaseRobotConfig
|
The robot config, of the corresponding derived class (i.e. FrankaConfig for Franka, etc.) |
required |
spec
|
MjSpec
|
The scene to insert the robot into |
required |
prefix
|
str
|
The prefix to use for the robot, i.e. the namespace |
required |
pos
|
list[float]
|
The position to use for the robot, either 2d or 3d. If 2d, the z-coordinate is assumed to be 0. |
required |
quat
|
list[float]
|
The quaternion to use for the robot, in [w, x, y, z] format. |
required |
randomize_textures
|
bool
|
Whether to randomize the textures of the robot, if applicable. Not supported by all robots. |
False
|
strip_meshes
|
bool
|
If True, remove all mesh geometries before insertion (for kinematics-only models). |
False
|
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
¶
apply_control_overrides(spec: MjSpec, robot_config: BaseRobotConfig)
Source code in molmo_spaces/robots/rby1.py
compute_control
¶
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
create_robot_sensors
¶
Get robot-specific sensors that should be registerd with a Task's sensor suite.
get_arm_move_group_ids
¶
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:
| Type | Description |
|---|---|
|
np.ndarray: 4x4 transformation matrix for the robot base pose in world frame |
Source code in molmo_spaces/robots/rby1.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
¶
Reset the robot to its initial state.
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.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_joint_pos_dict
|
dict[str, ndarray]
|
Dictionary containing joint positions for the robot based on the move groups ids. |
required |
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
¶
Set the robot's world pose to the specified pose in the world frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_world_pose
|
ndarray | list[float]
|
The pose of the robot in the world frame. If (4, 4) numpy array, it is assumed to be a transformation matrix. If (3,) list or numpy array, it is assumed to be (x, y, yaw). If (7,) list or numpy array, it is assumed to be (xyz + wxyz). |
required |
Source code in molmo_spaces/robots/abstract.py
update_control
¶
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
|
dict[str, ndarray]
|
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
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. |
g1_view |
Implementation of the Unitree G1 robot model. |
i2rt_yam_view |
Implementation of the i2rt YAM robot model. |
mobile_franka_droid_view |
|
rby1_view |
Implementation of the RBY1 robot model. |
rum_gripper_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.
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. |
MJCFFrameMixin |
Mixin for move groups that represent the leaf frame as a body or site in the MJCF model. |
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. |
SimplyActuatedMoveGroup |
A SimplyActuatedMoveGroup is a move group with a 1:1 mapping between joints, actuators, and position/velocity addresses. |
Attributes:
| Name | Type | Description |
|---|---|---|
RobotViewFactory |
TypeAlias
|
Factory function that creates a RobotView from a MjData and a robot namespace |
RobotViewFactory
module-attribute
¶
RobotViewFactory: TypeAlias = Callable[[mj.MjData, str], RobotView]
Factory function that creates a RobotView from a MjData and a robot namespace
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 |
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. |
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. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
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
¶
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
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:
| Type | Description |
|---|---|
ndarray
|
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: RobotBaseGroup | None = 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
|
RobotBaseGroup | None
|
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. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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:
| Type | Description |
|---|---|
ndarray
|
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, SimplyActuatedMoveGroup
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 |
root_body_id
|
int
|
The ID of the body that represents the robot 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 |
|---|---|---|
actuator_ids |
|
|
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_ids |
|
|
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_posadr |
|
|
joint_vel |
ndarray
|
Current joint velocities. |
joint_veladr |
|
|
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. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
noop_ctrl |
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
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
¶
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
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:
| Type | Description |
|---|---|
ndarray
|
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 |
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. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
noop_ctrl |
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
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
¶
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
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:
| Type | Description |
|---|---|
ndarray
|
Joint positions at the end of the integration |
Source code in molmo_spaces/robots/robot_views/abstract.py
MJCFFrameMixin
¶
Bases: ABC
Mixin for move groups that represent the leaf frame as a body or site in the MJCF model.
Since this mixin provides a get_jacobian() implementation, inheriting classes must
put this mixin first in the inheritance chain to satisfy the MRO.
Methods:
| Name | Description |
|---|---|
get_jacobian |
Returns the (6, model.nv) jacobian of the move group's leaf frame. |
Attributes:
| Name | Type | Description |
|---|---|---|
leaf_frame_id |
int
|
The ID of the leaf frame, either a body ID or a site ID. |
leaf_frame_to_world |
ndarray
|
|
leaf_frame_type |
Literal['site', 'body']
|
The type of the leaf frame. |
leaf_frame_id
abstractmethod
property
¶
The ID of the leaf frame, either a body ID or a site ID.
leaf_frame_type
abstractmethod
property
¶
The type of the leaf frame.
get_jacobian
¶
Returns the (6, model.nv) jacobian of the move group's leaf frame.
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
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 |
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. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
noop_ctrl |
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
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
¶
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
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:
| Type | Description |
|---|---|
ndarray
|
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: RobotBaseGroup | None = 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
|
RobotBaseGroup | None
|
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. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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:
| Type | Description |
|---|---|
ndarray
|
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. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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:
| Type | Description |
|---|---|
ndarray
|
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_ik_excluded_movegroup_ids |
Move groups that generic IK-based manipulation policies should never |
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. |
root_body_id |
int
|
The ID of the root body of the robot's kinematic tree. |
Source code in molmo_spaces/robots/robot_views/abstract.py
root_body_id
cached
property
¶
The ID of the root body of the robot's kinematic tree.
This is not necessarily base.root_body_id: the base move group's root body
is the base itself, which may be nested under an outer wrapper body (RBY1's MJCF
nests robot_0/base under robot_0/). Contacts identify a body's tree via
model.body_rootid, so comparisons against contact bodies must use this.
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_ik_excluded_movegroup_ids
¶
Move groups that generic IK-based manipulation policies should never unlock or overwrite, on top of grippers (see get_gripper_movegroup_ids()).
Default empty: existing robots (RBY1's holonomic base, Franka's fixed mount, etc.) have few enough non-arm DOF that letting a manipulation policy's IK solver treat "every non-gripper move group" as free to help reach a target (see base_object_manipulation_planner_policy._tcp_to_jp_fn) is reasonable. Override for robots where that assumption breaks down -- e.g. a bipedal humanoid's legs, which have no business being moved by an arm-reach IK solve.
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:
| Type | Description |
|---|---|
ndarray
|
The (6, N) jacobian of the move group, where N is the total number of degrees |
ndarray
|
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:
| Type | Description |
|---|---|
|
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:
| Type | Description |
|---|---|
|
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
SimplyActuatedMoveGroup
¶
SimplyActuatedMoveGroup(mj_data: MjData, joint_ids: list[int], actuator_ids: list[int], root_body_id: int, robot_base_group: RobotBaseGroup | None = None)
Bases: MoveGroup
A SimplyActuatedMoveGroup is a move group with a 1:1 mapping between joints, actuators, and position/velocity addresses.
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
|
RobotBaseGroup | None
|
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 |
|---|---|---|
actuator_ids |
|
|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
joint_ids |
|
|
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_posadr |
|
|
joint_vel |
ndarray
|
Current joint velocities. |
joint_veladr |
|
|
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. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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:
| Type | Description |
|---|---|
ndarray
|
Joint positions at the end of the integration |
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: MJCFFrameMixin, SimplyActuatedMoveGroup
6-DOF arm group for one side of the bimanual YAM robot.
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
|
RobotBaseGroup | None
|
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's leaf frame. |
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
actuator_ids |
|
|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
joint_ids |
|
|
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_posadr |
|
|
joint_vel |
ndarray
|
Current joint velocities. |
joint_veladr |
|
|
leaf_frame_id |
int
|
The ID of the leaf frame, either a body ID or a site ID. |
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
|
|
leaf_frame_type |
The type of the leaf frame. |
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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
|
|
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_id
property
¶
The ID of the leaf frame, either a body ID or a site ID.
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
¶
Returns the (6, model.nv) jacobian of the move group's leaf frame.
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:
| Type | Description |
|---|---|
ndarray
|
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.
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 |
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. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
noop_ctrl |
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/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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
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
¶
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
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:
| Type | Description |
|---|---|
ndarray
|
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: MJCFFrameMixin, 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.
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
|
RobotBaseGroup | None
|
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's leaf frame. |
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_id |
int
|
The ID of the leaf frame, either a body ID or a site ID. |
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
|
|
leaf_frame_type |
The type of the leaf frame. |
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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
|
|
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_id
property
¶
The ID of the leaf frame, either a body ID or a site ID.
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
¶
Returns the (6, model.nv) jacobian of the move group's leaf frame.
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:
| Type | Description |
|---|---|
ndarray
|
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
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_ik_excluded_movegroup_ids |
Move groups that generic IK-based manipulation policies should never |
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
|
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. |
root_body_id |
int
|
The ID of the root body of the robot's kinematic tree. |
Source code in molmo_spaces/robots/robot_views/bimanual_yam_view.py
root_body_id
cached
property
¶
The ID of the root body of the robot's kinematic tree.
This is not necessarily base.root_body_id: the base move group's root body
is the base itself, which may be nested under an outer wrapper body (RBY1's MJCF
nests robot_0/base under robot_0/). Contacts identify a body's tree via
model.body_rootid, so comparisons against contact bodies must use this.
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_ik_excluded_movegroup_ids
¶
Move groups that generic IK-based manipulation policies should never unlock or overwrite, on top of grippers (see get_gripper_movegroup_ids()).
Default empty: existing robots (RBY1's holonomic base, Franka's fixed mount, etc.) have few enough non-arm DOF that letting a manipulation policy's IK solver treat "every non-gripper move group" as free to help reach a target (see base_object_manipulation_planner_policy._tcp_to_jp_fn) is reasonable. Override for robots where that assumption breaks down -- e.g. a bipedal humanoid's legs, which have no business being moved by an arm-reach IK solve.
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:
| Type | Description |
|---|---|
ndarray
|
The (6, N) jacobian of the move group, where N is the total number of degrees |
ndarray
|
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:
| Type | Description |
|---|---|
|
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:
| Type | Description |
|---|---|
|
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: MJCFFrameMixin, GripperGroup
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
|
RobotBaseGroup | None
|
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's leaf frame. |
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_id |
int
|
The ID of the leaf frame, either a body ID or a site ID. |
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
|
|
leaf_frame_type |
The type of the leaf frame. |
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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/franka_cap_view.py
inter_finger_dist
property
¶
The distance between the two fingers of the gripper.
inter_finger_dist_range
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_id
property
¶
The ID of the leaf frame, either a body ID or a site ID.
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
¶
Returns the (6, model.nv) jacobian of the move group's leaf frame.
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:
| Type | Description |
|---|---|
ndarray
|
Joint positions at the end of the integration |
Source code in molmo_spaces/robots/robot_views/abstract.py
set_gripper_ctrl_open
¶
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 |
FrankaCAPRobotView
¶
Bases: RobotView
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_ik_excluded_movegroup_ids |
Move groups that generic IK-based manipulation policies should never |
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
|
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. |
root_body_id |
int
|
The ID of the root body of the robot's kinematic tree. |
Source code in molmo_spaces/robots/robot_views/franka_cap_view.py
root_body_id
cached
property
¶
The ID of the root body of the robot's kinematic tree.
This is not necessarily base.root_body_id: the base move group's root body
is the base itself, which may be nested under an outer wrapper body (RBY1's MJCF
nests robot_0/base under robot_0/). Contacts identify a body's tree via
model.body_rootid, so comparisons against contact bodies must use this.
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_ik_excluded_movegroup_ids
¶
Move groups that generic IK-based manipulation policies should never unlock or overwrite, on top of grippers (see get_gripper_movegroup_ids()).
Default empty: existing robots (RBY1's holonomic base, Franka's fixed mount, etc.) have few enough non-arm DOF that letting a manipulation policy's IK solver treat "every non-gripper move group" as free to help reach a target (see base_object_manipulation_planner_policy._tcp_to_jp_fn) is reasonable. Override for robots where that assumption breaks down -- e.g. a bipedal humanoid's legs, which have no business being moved by an arm-reach IK solve.
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:
| Type | Description |
|---|---|
ndarray
|
The (6, N) jacobian of the move group, where N is the total number of degrees |
ndarray
|
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:
| Type | Description |
|---|---|
|
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:
| Type | Description |
|---|---|
|
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
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 |
Returns the (6, model.nv) jacobian of the move group. |
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
is_mobile |
Whether this base is mobile (has actuators). |
n_actuators |
Number of actuators in this move group. |
Attributes:
| Name | Type | Description |
|---|---|---|
ctrl |
Current control signals for the actuators. |
|
ctrl_limits |
Control limits (min, max) for each actuator. |
|
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. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
noop_ctrl |
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/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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
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
¶
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
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:
| Type | Description |
|---|---|
ndarray
|
Joint positions at the end of the integration |
Source code in molmo_spaces/robots/robot_views/abstract.py
is_mobile
¶
FloatingRobotiq2f85RobotView
¶
Bases: RobotView
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_ik_excluded_movegroup_ids |
Move groups that generic IK-based manipulation policies should never |
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
|
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. |
root_body_id |
int
|
The ID of the root body of the robot's kinematic tree. |
Source code in molmo_spaces/robots/robot_views/franka_droid_view.py
root_body_id
cached
property
¶
The ID of the root body of the robot's kinematic tree.
This is not necessarily base.root_body_id: the base move group's root body
is the base itself, which may be nested under an outer wrapper body (RBY1's MJCF
nests robot_0/base under robot_0/). Contacts identify a body's tree via
model.body_rootid, so comparisons against contact bodies must use this.
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_ik_excluded_movegroup_ids
¶
Move groups that generic IK-based manipulation policies should never unlock or overwrite, on top of grippers (see get_gripper_movegroup_ids()).
Default empty: existing robots (RBY1's holonomic base, Franka's fixed mount, etc.) have few enough non-arm DOF that letting a manipulation policy's IK solver treat "every non-gripper move group" as free to help reach a target (see base_object_manipulation_planner_policy._tcp_to_jp_fn) is reasonable. Override for robots where that assumption breaks down -- e.g. a bipedal humanoid's legs, which have no business being moved by an arm-reach IK solve.
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:
| Type | Description |
|---|---|
ndarray
|
The (6, N) jacobian of the move group, where N is the total number of degrees |
ndarray
|
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:
| Type | Description |
|---|---|
|
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:
| Type | Description |
|---|---|
|
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
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
|
RobotBaseGroup | None
|
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's leaf frame. |
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_id |
int
|
The ID of the leaf frame, either a body ID or a site ID. |
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
|
|
leaf_frame_type |
The type of the leaf frame. |
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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/franka_droid_view.py
inter_finger_dist
property
¶
The distance between the two fingers of the gripper.
inter_finger_dist_range
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_id
property
¶
The ID of the leaf frame, either a body ID or a site ID.
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
¶
Returns the (6, model.nv) jacobian of the move group's leaf frame.
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:
| Type | Description |
|---|---|
ndarray
|
Joint positions at the end of the integration |
Source code in molmo_spaces/robots/robot_views/abstract.py
set_gripper_ctrl_open
¶
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 |
FrankaDroidRobotView
¶
Bases: RobotView
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_ik_excluded_movegroup_ids |
Move groups that generic IK-based manipulation policies should never |
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
|
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. |
root_body_id |
int
|
The ID of the root body of the robot's kinematic tree. |
Source code in molmo_spaces/robots/robot_views/franka_droid_view.py
root_body_id
cached
property
¶
The ID of the root body of the robot's kinematic tree.
This is not necessarily base.root_body_id: the base move group's root body
is the base itself, which may be nested under an outer wrapper body (RBY1's MJCF
nests robot_0/base under robot_0/). Contacts identify a body's tree via
model.body_rootid, so comparisons against contact bodies must use this.
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_ik_excluded_movegroup_ids
¶
Move groups that generic IK-based manipulation policies should never unlock or overwrite, on top of grippers (see get_gripper_movegroup_ids()).
Default empty: existing robots (RBY1's holonomic base, Franka's fixed mount, etc.) have few enough non-arm DOF that letting a manipulation policy's IK solver treat "every non-gripper move group" as free to help reach a target (see base_object_manipulation_planner_policy._tcp_to_jp_fn) is reasonable. Override for robots where that assumption breaks down -- e.g. a bipedal humanoid's legs, which have no business being moved by an arm-reach IK solve.
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:
| Type | Description |
|---|---|
ndarray
|
The (6, N) jacobian of the move group, where N is the total number of degrees |
ndarray
|
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:
| Type | Description |
|---|---|
|
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:
| Type | Description |
|---|---|
|
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: MJCFFrameMixin, GripperGroup
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
|
RobotBaseGroup | None
|
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's leaf frame. |
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_id |
int
|
The ID of the leaf frame, either a body ID or a site ID. |
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
|
|
leaf_frame_type |
The type of the leaf frame. |
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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/franka_droid_view.py
inter_finger_dist
property
¶
The distance between the two fingers of the gripper.
inter_finger_dist_range
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_id
property
¶
The ID of the leaf frame, either a body ID or a site ID.
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
¶
Returns the (6, model.nv) jacobian of the move group's leaf frame.
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:
| Type | Description |
|---|---|
ndarray
|
Joint positions at the end of the integration |
Source code in molmo_spaces/robots/robot_views/abstract.py
set_gripper_ctrl_open
¶
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 |
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: MJCFFrameMixin, SimplyActuatedMoveGroup
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
|
RobotBaseGroup | None
|
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's leaf frame. |
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
actuator_ids |
|
|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
joint_ids |
|
|
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_posadr |
|
|
joint_vel |
ndarray
|
Current joint velocities. |
joint_veladr |
|
|
leaf_frame_id |
int
|
The ID of the leaf frame, either a body ID or a site ID. |
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
|
|
leaf_frame_type |
The type of the leaf frame. |
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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/franka_fr3_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_id
property
¶
The ID of the leaf frame, either a body ID or a site ID.
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
¶
Returns the (6, model.nv) jacobian of the move group's leaf frame.
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:
| Type | Description |
|---|---|
ndarray
|
Joint positions at the end of the integration |
Source code in molmo_spaces/robots/robot_views/abstract.py
FrankaFR3BaseGroup
¶
Bases: MocapRobotBaseGroup
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 |
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. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
noop_ctrl |
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/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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
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
¶
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
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:
| Type | Description |
|---|---|
ndarray
|
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: MJCFFrameMixin, GripperGroup
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
|
RobotBaseGroup | None
|
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's leaf frame. |
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_id |
int
|
The ID of the leaf frame, either a body ID or a site ID. |
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
|
|
leaf_frame_type |
The type of the leaf frame. |
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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/franka_fr3_view.py
inter_finger_dist
property
¶
The distance between the two fingers of the gripper.
inter_finger_dist_range
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_id
property
¶
The ID of the leaf frame, either a body ID or a site ID.
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
¶
Returns the (6, model.nv) jacobian of the move group's leaf frame.
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:
| Type | Description |
|---|---|
ndarray
|
Joint positions at the end of the integration |
Source code in molmo_spaces/robots/robot_views/abstract.py
set_gripper_ctrl_open
¶
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 |
FrankaFR3RobotView
¶
Bases: RobotView
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_ik_excluded_movegroup_ids |
Move groups that generic IK-based manipulation policies should never |
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
|
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. |
root_body_id |
int
|
The ID of the root body of the robot's kinematic tree. |
Source code in molmo_spaces/robots/robot_views/franka_fr3_view.py
root_body_id
cached
property
¶
The ID of the root body of the robot's kinematic tree.
This is not necessarily base.root_body_id: the base move group's root body
is the base itself, which may be nested under an outer wrapper body (RBY1's MJCF
nests robot_0/base under robot_0/). Contacts identify a body's tree via
model.body_rootid, so comparisons against contact bodies must use this.
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_ik_excluded_movegroup_ids
¶
Move groups that generic IK-based manipulation policies should never unlock or overwrite, on top of grippers (see get_gripper_movegroup_ids()).
Default empty: existing robots (RBY1's holonomic base, Franka's fixed mount, etc.) have few enough non-arm DOF that letting a manipulation policy's IK solver treat "every non-gripper move group" as free to help reach a target (see base_object_manipulation_planner_policy._tcp_to_jp_fn) is reasonable. Override for robots where that assumption breaks down -- e.g. a bipedal humanoid's legs, which have no business being moved by an arm-reach IK solve.
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:
| Type | Description |
|---|---|
ndarray
|
The (6, N) jacobian of the move group, where N is the total number of degrees |
ndarray
|
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:
| Type | Description |
|---|---|
|
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:
| Type | Description |
|---|---|
|
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
g1_view
¶
Implementation of the Unitree G1 robot model.
The G1 (as configured here) is a bipedal humanoid with:
- A free-floating pelvis (real 6-DOF dynamics, not a kinematic/wheeled base)
- 12 leg joints + a 3-DOF waist/torso, combined into one 15-DOF move group
driven by a whole-body walking controller (see LegsWaistController)
- Two 7-DOF arms (left arm has no gripper and is commanded to its natural
hanging pose; right arm has a dexterous gripper)
- A single right-hand gripper, tendon-actuated, with two mechanically coupled
finger joints (joint2 = joint1, enforced by an MJCF
Each component is implemented as a MoveGroup, with the overall robot structure managed by the G1RobotView class. There is no independent head MoveGroup (the head/cameras are rigidly mounted to the torso) and no left-hand gripper (no hardware exists for it).
Classes:
| Name | Description |
|---|---|
G1ArmGroup |
One of the G1's 7-DOF arms, excluding the gripper. |
G1BaseGroup |
The G1's free-floating pelvis. No wheels, no holonomic joints -- true |
G1GripperGroup |
The G1's right-hand dexterous gripper. |
G1LegsWaistGroup |
The 12 leg joints + 3-DOF waist as one 15-DOF group: the whole-body |
G1RobotView |
Implementation of the complete G1 robot (whole-body walking, see LegsWaistController). |
Attributes:
| Name | Type | Description |
|---|---|---|
ARM_JOINT_SUFFIXES |
|
|
GRIPPER_CLOSED |
|
|
GRIPPER_OPEN |
|
|
LEGS_WAIST_JOINT_SUFFIXES |
|
LEGS_WAIST_JOINT_SUFFIXES
module-attribute
¶
G1ArmGroup
¶
G1ArmGroup(mj_data: MjData, side: str, base: RobotBaseGroup, namespace: str = '')
Bases: MJCFFrameMixin, SimplyActuatedMoveGroup
One of the G1's 7-DOF arms, excluding the gripper.
The left arm has no gripper hardware and is normally commanded to its natural hanging pose; the right arm carries the dexterous gripper.
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
|
RobotBaseGroup | None
|
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's leaf frame. |
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
actuator_ids |
|
|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
joint_ids |
|
|
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_posadr |
|
|
joint_vel |
ndarray
|
Current joint velocities. |
joint_veladr |
|
|
leaf_frame_id |
int
|
The ID of the leaf frame, either a body ID or a site ID. |
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
|
|
leaf_frame_type |
The type of the leaf frame. |
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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
|
|
side |
|
|
vel_dim |
int
|
Dimension of the space of joint velocities. |
Source code in molmo_spaces/robots/robot_views/g1_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_id
property
¶
The ID of the leaf frame, either a body ID or a site ID.
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
¶
Returns the (6, model.nv) jacobian of the move group's leaf frame.
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:
| Type | Description |
|---|---|
ndarray
|
Joint positions at the end of the integration |
Source code in molmo_spaces/robots/robot_views/abstract.py
G1BaseGroup
¶
Bases: FreeJointRobotBaseGroup
The G1's free-floating pelvis. No wheels, no holonomic joints -- true 6-DOF rigid-body dynamics, integrated directly by MuJoCo's physics.
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 |
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. |
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. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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/g1_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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
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
¶
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
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:
| Type | Description |
|---|---|
ndarray
|
Joint positions at the end of the integration |
Source code in molmo_spaces/robots/robot_views/abstract.py
G1GripperGroup
¶
G1GripperGroup(mj_data: MjData, base: RobotBaseGroup, namespace: str = '')
Bases: MJCFFrameMixin, GripperGroup
The G1's right-hand dexterous gripper.
Two finger joints (right_Joint1_1, right_Joint2_1) are mechanically
coupled by an MJCF
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
|
RobotBaseGroup | None
|
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's leaf frame. |
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_id |
int
|
The ID of the leaf frame, either a body ID or a site ID. |
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
|
|
leaf_frame_type |
The type of the leaf frame. |
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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/g1_view.py
inter_finger_dist
property
¶
The distance between the two fingers of the gripper.
inter_finger_dist_range
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_id
property
¶
The ID of the leaf frame, either a body ID or a site ID.
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
¶
Returns the (6, model.nv) jacobian of the move group's leaf frame.
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:
| Type | Description |
|---|---|
ndarray
|
Joint positions at the end of the integration |
Source code in molmo_spaces/robots/robot_views/abstract.py
set_gripper_ctrl_open
¶
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 |
G1LegsWaistGroup
¶
G1LegsWaistGroup(mj_data: MjData, base: RobotBaseGroup, namespace: str = '')
Bases: MJCFFrameMixin, SimplyActuatedMoveGroup
The 12 leg joints + 3-DOF waist as one 15-DOF group: the whole-body controller computes one coupled law across both. Joint order must match the walking policy's training-time order (legs first, then waist).
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
|
RobotBaseGroup | None
|
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's leaf frame. |
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
actuator_ids |
|
|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
joint_ids |
|
|
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_posadr |
|
|
joint_vel |
ndarray
|
Current joint velocities. |
joint_veladr |
|
|
leaf_frame_id |
int
|
The ID of the leaf frame, either a body ID or a site ID. |
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
|
|
leaf_frame_type |
The type of the leaf frame. |
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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/g1_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_id
property
¶
The ID of the leaf frame, either a body ID or a site ID.
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
¶
Returns the (6, model.nv) jacobian of the move group's leaf frame.
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:
| Type | Description |
|---|---|
ndarray
|
Joint positions at the end of the integration |
Source code in molmo_spaces/robots/robot_views/abstract.py
G1RobotView
¶
Bases: RobotView
Implementation of the complete G1 robot (whole-body walking, see LegsWaistController).
No head move group (head/cameras are rigidly mounted to the torso) and
no left_gripper move group (no hardware exists for it).
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 |
|---|---|
distance_to |
Calculate the planar (x, y, theta) distance from the base's current pose to a 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_ik_excluded_movegroup_ids |
Exclude legs/waist, but not the pelvis, from generic arm-reach IK. |
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. |
is_close_to |
Is the planar base pose within |
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 |
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. |
root_body_id |
int
|
The ID of the root body of the robot's kinematic tree. |
Source code in molmo_spaces/robots/robot_views/g1_view.py
root_body_id
cached
property
¶
The ID of the root body of the robot's kinematic tree.
This is not necessarily base.root_body_id: the base move group's root body
is the base itself, which may be nested under an outer wrapper body (RBY1's MJCF
nests robot_0/base under robot_0/). Contacts identify a body's tree via
model.body_rootid, so comparisons against contact bodies must use this.
distance_to
¶
Calculate the planar (x, y, theta) distance from the base's current pose to a target pose.
The pelvis's pose is a full 6-DOF transform (see FreeJointRobotBaseGroup.pose), unlike a holonomic base's native [x, y, theta] joints, so we project it down to the world-frame yaw for comparison against the [x, y, theta] waypoints the A* nav planner uses.
Source code in molmo_spaces/robots/robot_views/g1_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_ik_excluded_movegroup_ids
¶
Exclude legs/waist, but not the pelvis, from generic arm-reach IK. With both unlocked as redundant DOF the solver wandered the leg joints and failed every grasp; a small pelvis shift is a sensible way to extend reach, bipedal leg motion is not.
Source code in molmo_spaces/robots/robot_views/g1_view.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:
| Type | Description |
|---|---|
ndarray
|
The (6, N) jacobian of the move group, where N is the total number of degrees |
ndarray
|
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:
| Type | Description |
|---|---|
|
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:
| Type | Description |
|---|---|
|
A dictionary mapping move group IDs to their joint velocities. |
Source code in molmo_spaces/robots/robot_views/abstract.py
is_close_to
¶
Is the planar base pose within threshold of the target. The default
governs "waypoint reached" for G1 nav; 0.1 because the WBC's tracking
plateaus around 0.07, so 0.05 was never reached.
Source code in molmo_spaces/robots/robot_views/g1_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
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: MJCFFrameMixin, SimplyActuatedMoveGroup
6-DOF arm group for the YAM robot.
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
|
RobotBaseGroup | None
|
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's leaf frame. |
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
actuator_ids |
|
|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
joint_ids |
|
|
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_posadr |
|
|
joint_vel |
ndarray
|
Current joint velocities. |
joint_veladr |
|
|
leaf_frame_id |
int
|
The ID of the leaf frame, either a body ID or a site ID. |
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
|
|
leaf_frame_type |
The type of the leaf frame. |
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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/i2rt_yam_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_id
property
¶
The ID of the leaf frame, either a body ID or a site ID.
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
¶
Returns the (6, model.nv) jacobian of the move group's leaf frame.
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:
| Type | Description |
|---|---|
ndarray
|
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.
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 |
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. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
noop_ctrl |
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/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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
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
¶
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
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:
| Type | Description |
|---|---|
ndarray
|
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: MJCFFrameMixin, 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.
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
|
RobotBaseGroup | None
|
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's leaf frame. |
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_id |
int
|
The ID of the leaf frame, either a body ID or a site ID. |
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
|
|
leaf_frame_type |
The type of the leaf frame. |
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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/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_id
property
¶
The ID of the leaf frame, either a body ID or a site ID.
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
¶
Returns the (6, model.nv) jacobian of the move group's leaf frame.
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:
| Type | Description |
|---|---|
ndarray
|
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.
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_ik_excluded_movegroup_ids |
Move groups that generic IK-based manipulation policies should never |
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
|
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. |
root_body_id |
int
|
The ID of the root body of the robot's kinematic tree. |
Source code in molmo_spaces/robots/robot_views/i2rt_yam_view.py
root_body_id
cached
property
¶
The ID of the root body of the robot's kinematic tree.
This is not necessarily base.root_body_id: the base move group's root body
is the base itself, which may be nested under an outer wrapper body (RBY1's MJCF
nests robot_0/base under robot_0/). Contacts identify a body's tree via
model.body_rootid, so comparisons against contact bodies must use this.
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_ik_excluded_movegroup_ids
¶
Move groups that generic IK-based manipulation policies should never unlock or overwrite, on top of grippers (see get_gripper_movegroup_ids()).
Default empty: existing robots (RBY1's holonomic base, Franka's fixed mount, etc.) have few enough non-arm DOF that letting a manipulation policy's IK solver treat "every non-gripper move group" as free to help reach a target (see base_object_manipulation_planner_policy._tcp_to_jp_fn) is reasonable. Override for robots where that assumption breaks down -- e.g. a bipedal humanoid's legs, which have no business being moved by an arm-reach IK solve.
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:
| Type | Description |
|---|---|
ndarray
|
The (6, N) jacobian of the move group, where N is the total number of degrees |
ndarray
|
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:
| Type | Description |
|---|---|
|
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:
| Type | Description |
|---|---|
|
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
mobile_franka_droid_view
¶
Classes:
| Name | Description |
|---|---|
MobileFrankaDroidBaseGroup |
|
MobileFrankaDroidRobotView |
|
MobileFrankaDroidBaseGroup
¶
Bases: HoloJointsRobotBaseGroup
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 |
root_body_id
|
int
|
The ID of the body that represents the robot 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 |
|---|---|---|
actuator_ids |
|
|
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_ids |
|
|
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_posadr |
|
|
joint_vel |
ndarray
|
Current joint velocities. |
joint_veladr |
|
|
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. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
noop_ctrl |
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/mobile_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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
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
¶
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
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:
| Type | Description |
|---|---|
ndarray
|
Joint positions at the end of the integration |
Source code in molmo_spaces/robots/robot_views/abstract.py
MobileFrankaDroidRobotView
¶
Bases: RobotView
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_ik_excluded_movegroup_ids |
Move groups that generic IK-based manipulation policies should never |
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 |
MobileFrankaDroidBaseGroup
|
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. |
root_body_id |
int
|
The ID of the root body of the robot's kinematic tree. |
Source code in molmo_spaces/robots/robot_views/mobile_franka_droid_view.py
root_body_id
cached
property
¶
The ID of the root body of the robot's kinematic tree.
This is not necessarily base.root_body_id: the base move group's root body
is the base itself, which may be nested under an outer wrapper body (RBY1's MJCF
nests robot_0/base under robot_0/). Contacts identify a body's tree via
model.body_rootid, so comparisons against contact bodies must use this.
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_ik_excluded_movegroup_ids
¶
Move groups that generic IK-based manipulation policies should never unlock or overwrite, on top of grippers (see get_gripper_movegroup_ids()).
Default empty: existing robots (RBY1's holonomic base, Franka's fixed mount, etc.) have few enough non-arm DOF that letting a manipulation policy's IK solver treat "every non-gripper move group" as free to help reach a target (see base_object_manipulation_planner_policy._tcp_to_jp_fn) is reasonable. Override for robots where that assumption breaks down -- e.g. a bipedal humanoid's legs, which have no business being moved by an arm-reach IK solve.
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:
| Type | Description |
|---|---|
ndarray
|
The (6, N) jacobian of the move group, where N is the total number of degrees |
ndarray
|
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:
| Type | Description |
|---|---|
|
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:
| Type | Description |
|---|---|
|
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: MJCFFrameMixin, SimplyActuatedMoveGroup
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 |
Returns the (6, model.nv) jacobian of the move group's leaf frame. |
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
actuator_ids |
|
|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
joint_ids |
|
|
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_posadr |
|
|
joint_vel |
ndarray
|
Current joint velocities. |
joint_veladr |
|
|
leaf_frame_id |
int
|
The ID of the leaf frame, either a body ID or a site ID. |
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
|
|
leaf_frame_type |
The type of the leaf frame. |
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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
|
|
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_id
property
¶
The ID of the leaf frame, either a body ID or a site ID.
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
¶
Returns the (6, model.nv) jacobian of the move group's leaf frame.
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:
| Type | Description |
|---|---|
ndarray
|
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 |
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. |
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. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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/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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
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
¶
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
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:
| Type | Description |
|---|---|
ndarray
|
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: MJCFFrameMixin, 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 |
Returns the (6, model.nv) jacobian of the move group's leaf frame. |
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 gripper 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_id |
int
|
The ID of the leaf frame, either a body ID or a site ID. |
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
|
|
leaf_frame_type |
The type of the leaf frame. |
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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/rby1_view.py
inter_finger_dist
property
¶
The distance between the two fingers of the gripper.
inter_finger_dist_range
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_id
property
¶
The ID of the leaf frame, either a body ID or a site ID.
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
¶
Returns the (6, model.nv) jacobian of the move group's leaf frame.
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:
| Type | Description |
|---|---|
ndarray
|
Joint positions at the end of the integration |
Source code in molmo_spaces/robots/robot_views/abstract.py
set_gripper_ctrl_open
¶
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 |
RBY1HeadGroup
¶
RBY1HeadGroup(mj_data: MjData, base: RobotBaseGroup, namespace: str = '')
Bases: MJCFFrameMixin, SimplyActuatedMoveGroup
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 |
Returns the (6, model.nv) jacobian of the move group's leaf frame. |
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
actuator_ids |
|
|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
joint_ids |
|
|
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_posadr |
|
|
joint_vel |
ndarray
|
Current joint velocities. |
joint_veladr |
|
|
leaf_frame_id |
int
|
The ID of the leaf frame, either a body ID or a site ID. |
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
|
|
leaf_frame_type |
The type of the leaf frame. |
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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/rby1_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_id
property
¶
The ID of the leaf frame, either a body ID or a site ID.
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
¶
Returns the (6, model.nv) jacobian of the move group's leaf frame.
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:
| Type | Description |
|---|---|
ndarray
|
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 |
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 |
|---|---|---|
actuator_ids |
|
|
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_ids |
|
|
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_posadr |
|
|
joint_vel |
ndarray
|
Current joint velocities. |
joint_veladr |
|
|
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. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
noop_ctrl |
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/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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
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
¶
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
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:
| Type | Description |
|---|---|
ndarray
|
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_ik_excluded_movegroup_ids |
Move groups that generic IK-based manipulation policies should never |
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 |
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. |
root_body_id |
int
|
The ID of the root body of the robot's kinematic tree. |
Source code in molmo_spaces/robots/robot_views/rby1_view.py
root_body_id
cached
property
¶
The ID of the root body of the robot's kinematic tree.
This is not necessarily base.root_body_id: the base move group's root body
is the base itself, which may be nested under an outer wrapper body (RBY1's MJCF
nests robot_0/base under robot_0/). Contacts identify a body's tree via
model.body_rootid, so comparisons against contact bodies must use this.
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_ik_excluded_movegroup_ids
¶
Move groups that generic IK-based manipulation policies should never unlock or overwrite, on top of grippers (see get_gripper_movegroup_ids()).
Default empty: existing robots (RBY1's holonomic base, Franka's fixed mount, etc.) have few enough non-arm DOF that letting a manipulation policy's IK solver treat "every non-gripper move group" as free to help reach a target (see base_object_manipulation_planner_policy._tcp_to_jp_fn) is reasonable. Override for robots where that assumption breaks down -- e.g. a bipedal humanoid's legs, which have no business being moved by an arm-reach IK solve.
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:
| Type | Description |
|---|---|
ndarray
|
The (6, N) jacobian of the move group, where N is the total number of degrees |
ndarray
|
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:
| Type | Description |
|---|---|
|
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:
| Type | Description |
|---|---|
|
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: MJCFFrameMixin, SimplyActuatedMoveGroup
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 |
Returns the (6, model.nv) jacobian of the move group's leaf frame. |
integrate_joint_vel |
Integrate joint velocities by 1 unit time to get joint positions. |
Attributes:
| Name | Type | Description |
|---|---|---|
actuator_ids |
|
|
ctrl |
ndarray
|
Current control signals for the actuators. |
ctrl_limits |
ndarray
|
Control limits (min, max) for each actuator. |
joint_ids |
|
|
joint_pos |
ndarray
|
Current joint positions. |
joint_pos_limits |
ndarray
|
Joint position limits (min, max) for each joint. |
joint_posadr |
|
|
joint_vel |
ndarray
|
Current joint velocities. |
joint_veladr |
|
|
leaf_frame_id |
int
|
The ID of the leaf frame, either a body ID or a site ID. |
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
|
|
leaf_frame_type |
The type of the leaf frame. |
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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/rby1_view.py
joint_pos_limits
property
¶
Joint position limits (min, max) for each joint.
leaf_frame_id
property
¶
The ID of the leaf frame, either a body ID or a site ID.
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
¶
Returns the (6, model.nv) jacobian of the move group's leaf frame.
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:
| Type | Description |
|---|---|
ndarray
|
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.
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 |
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 |
Current control signals for the actuators. |
|
ctrl_limits |
Control limits (min, max) for each actuator. |
|
floating |
Whether the base is floating. |
|
is_mobile |
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 |
Number of actuators in this move group. |
|
n_joints |
int
|
Number of joints in this move group. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
noop_ctrl |
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/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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
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
¶
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
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:
| Type | Description |
|---|---|
ndarray
|
Joint positions at the end of the integration |
Source code in molmo_spaces/robots/robot_views/abstract.py
FloatingRUMRobotView
¶
Bases: RobotView
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 |
|---|---|
distance_to |
Calculate the planar (x, y, theta) distance from the base's current pose to a 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_ik_excluded_movegroup_ids |
Move groups that generic IK-based manipulation policies should never |
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. |
is_close_to |
Check if the current planar base pose is 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 |
FloatingRUMBaseGroup
|
The base of the robot. |
mj_data |
|
|
mj_model |
|
|
n_grippers |
int
|
Number of grippers in this robot. |
name |
The name of this robot model. |
|
root_body_id |
int
|
The ID of the root body of the robot's kinematic tree. |
Source code in molmo_spaces/robots/robot_views/rum_gripper_view.py
root_body_id
cached
property
¶
The ID of the root body of the robot's kinematic tree.
This is not necessarily base.root_body_id: the base move group's root body
is the base itself, which may be nested under an outer wrapper body (RBY1's MJCF
nests robot_0/base under robot_0/). Contacts identify a body's tree via
model.body_rootid, so comparisons against contact bodies must use this.
distance_to
¶
Calculate the planar (x, y, theta) distance from the base's current pose to a target pose.
The floating base's pose is a full 6-DOF transform (see FreeJointRobotBaseGroup.pose), unlike a holonomic base's native [x, y, theta] joints, so we project it down to the world-frame yaw for comparison against the [x, y, theta] waypoints the A* nav planner uses.
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_ik_excluded_movegroup_ids
¶
Move groups that generic IK-based manipulation policies should never unlock or overwrite, on top of grippers (see get_gripper_movegroup_ids()).
Default empty: existing robots (RBY1's holonomic base, Franka's fixed mount, etc.) have few enough non-arm DOF that letting a manipulation policy's IK solver treat "every non-gripper move group" as free to help reach a target (see base_object_manipulation_planner_policy._tcp_to_jp_fn) is reasonable. Override for robots where that assumption breaks down -- e.g. a bipedal humanoid's legs, which have no business being moved by an arm-reach IK solve.
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:
| Type | Description |
|---|---|
ndarray
|
The (6, N) jacobian of the move group, where N is the total number of degrees |
ndarray
|
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:
| Type | Description |
|---|---|
|
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:
| Type | Description |
|---|---|
|
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 planar base pose is close to the target pose
Source code in molmo_spaces/robots/robot_views/rum_gripper_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
RUMGripperGroup
¶
RUMGripperGroup(mj_data: MjData, base_group: RobotBaseGroup, namespace: str = '')
Bases: MJCFFrameMixin, GripperGroup
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
|
RobotBaseGroup | None
|
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's leaf frame. |
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_id |
int
|
The ID of the leaf frame, either a body ID or a site ID. |
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
|
|
leaf_frame_type |
The type of the leaf frame. |
|
mj_data |
|
|
mj_model |
|
|
n_actuators |
int
|
Number of actuators in this move group. |
n_joints |
int
|
Number of joints in this move group. |
name |
str
|
The name of this move group, which matches the move group ID in the containing robot view. |
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/rum_gripper_view.py
inter_finger_dist
property
¶
The distance between the two fingers of the gripper.
inter_finger_dist_range
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_id
property
¶
The ID of the leaf frame, either a body ID or a site ID.
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. |
name
property
¶
The name of this move group, which matches the move group ID in the containing robot view. Not safe to call before the move group is added to a robot view.
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
¶
Returns the (6, model.nv) jacobian of the move group's leaf frame.
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:
| Type | Description |
|---|---|
ndarray
|
Joint positions at the end of the integration |
Source code in molmo_spaces/robots/robot_views/abstract.py
set_gripper_ctrl_open
¶
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 |
main
¶
Source code in molmo_spaces/robots/robot_views/rum_gripper_view.py
utils
¶
Modules:
| Name | Description |
|---|---|
randomization |
|
randomization
¶
Functions:
| Name | Description |
|---|---|
speckle_texture |
|
speckle_texture
¶
speckle_texture(base_color, size=256, noise_strength=0.1, num_blobs=80, blob_size_range=(5, 25), blob_variation=0.1) -> Image