Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Facebookresearch Habitat lab MobileManipulator

From Leeroopedia
Knowledge Sources
Domains Embodied_AI, Robot_Control
Last Updated 2026-02-15 00:00 GMT

Overview

MobileManipulator combines a controllable mobile base with an articulated arm, inheriting from both Manipulator and ArticulatedAgentBase through multiple inheritance to provide a complete robot with navigation and manipulation capabilities.

Description

MobileManipulator uses multiple inheritance to combine two major capabilities:

  • Manipulator -- Provides arm joint control, gripper management, end-effector tracking, and sensor transform updates.
  • ArticulatedAgentBase -- Provides base position/rotation control, wheel/leg motor management, and URDF loading.

The class delegates to both parent classes in its lifecycle methods:

  • reconfigure() calls both Manipulator.reconfigure() and ArticulatedAgentBase.reconfigure() to load the URDF and configure all motors.
  • update() delegates to both parents for camera transforms, joint limit checks, and sleep state management.
  • reset() delegates to both parents to reset arm, gripper, and base joint motors.

The module also defines two important data classes:

  • ArticulatedAgentCameraParams -- An @attr.s data class configuring camera placement on the robot with properties for the attached link ID, camera offset position, look-at position, orientation, and relative transform.
  • MobileManipulatorParams -- An @attr.s data class containing the full robot configuration including arm joints, gripper joints, end-effector offsets/links/constraints, camera configurations, motor gains, base offset, wheel/leg parameters, and optional navmesh collision offsets.

Usage

Use MobileManipulator for robots that need both navigation (mobile base) and manipulation (arm + gripper) capabilities, such as the Spot robot or Fetch robot in Habitat simulations. Configure it with a MobileManipulatorParams instance and an agent config containing the URDF path.

Code Reference

Source Location

Signature

@attr.s(auto_attribs=True, slots=True)
class ArticulatedAgentCameraParams:
    attached_link_id: int
    cam_offset_pos: mn.Vector3 = mn.Vector3.zero_init()
    cam_look_at_pos: mn.Vector3 = mn.Vector3.zero_init()
    cam_orientation: mn.Vector3 = mn.Vector3.zero_init()
    relative_transform: mn.Matrix4 = mn.Matrix4.identity_init()

@attr.s(auto_attribs=True, slots=True)
class MobileManipulatorParams:
    arm_joints: List[int]
    gripper_joints: List[int]
    ee_offset: List[mn.Vector3]
    ee_links: List[int]
    ee_constraint: np.ndarray
    cameras: Dict[str, ArticulatedAgentCameraParams]
    gripper_closed_state: np.ndarray
    gripper_open_state: np.ndarray
    gripper_state_eps: float
    arm_mtr_pos_gain: float
    arm_mtr_vel_gain: float
    arm_mtr_max_impulse: float
    base_offset: mn.Vector3
    base_link_names: Set[str]
    # ... additional optional parameters

class MobileManipulator(Manipulator, ArticulatedAgentBase):
    def __init__(
        self,
        params: MobileManipulatorParams,
        agent_cfg,
        sim: Simulator,
        limit_robo_joints: bool = True,
        fixed_base: bool = True,
        maintain_link_order: bool = False,
        auto_update_sensor_transform=True,
        base_type="mobile",
    ):

Import

from habitat.articulated_agents.mobile_manipulator import (
    MobileManipulator,
    MobileManipulatorParams,
    ArticulatedAgentCameraParams,
)

I/O Contract

Inputs

Name Type Required Description
params MobileManipulatorParams Yes Full robot configuration parameters
agent_cfg object Yes Agent config containing articulated_agent_urdf path
sim Simulator Yes The Habitat-Sim simulator instance
limit_robo_joints bool No (default=True) Whether to enforce joint limits
fixed_base bool No (default=True) Whether the robot's base is fixed
maintain_link_order bool No (default=False) Whether to preserve URDF link order
auto_update_sensor_transform bool No (default=True) Whether to automatically update sensor transforms
base_type str No (default="mobile") Base type, "mobile" or "leg"

Outputs

Name Type Description
base_pos mn.Vector3 Robot base ground position (inherited from ArticulatedAgentBase)
base_rot float Y-axis rotation in radians (inherited from ArticulatedAgentBase)
sim_obj ManagedBulletArticulatedObject The underlying simulation object

Usage Examples

Basic Usage

import magnum as mn
import numpy as np
from habitat.articulated_agents.mobile_manipulator import (
    MobileManipulator,
    MobileManipulatorParams,
    ArticulatedAgentCameraParams,
)

# Define robot parameters
params = MobileManipulatorParams(
    arm_joints=[0, 1, 2, 3, 4, 5, 6],
    gripper_joints=[7, 8],
    ee_offset=[mn.Vector3(0.08, 0, 0)],
    ee_links=[6],
    ee_constraint=np.zeros((1, 2, 7)),
    cameras={"head": ArticulatedAgentCameraParams(attached_link_id=0)},
    gripper_closed_state=np.array([0.0, 0.0]),
    gripper_open_state=np.array([0.04, 0.04]),
    gripper_state_eps=0.001,
    arm_mtr_pos_gain=0.3,
    arm_mtr_vel_gain=0.3,
    arm_mtr_max_impulse=10.0,
    base_offset=mn.Vector3(0, 0.5, 0),
    base_link_names={"base_link"},
)

# Create and configure the robot
robot = MobileManipulator(
    params=params,
    agent_cfg=agent_cfg,
    sim=sim,
)
robot.reconfigure()
robot.reset()

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment