BAM M6 Actuator Model for Dynamixel XL330 Servos in Microduck RL
Microduck RL drives its Dynamixel XL330 servos using the BAM M6 actuator model—a voltage-controlled configuration with load-dependent friction—defined in src/mjlab_microduck/robot/microduck_constants.py and instantiated through FrictionDRBamActuatorCfg classes.
The Dynamixel XL330 servos in the Microduck RL robot rely on a specific actuator abstraction to simulate realistic motor behavior in Isaac Gym. According to the pollen-robotics/microduck_rl source code, these servos are backed by the BAM M6 actuator configuration, which models voltage control with load-dependent friction characteristics.
BAM M6 Actuator Configuration
The actuator specification for the XL330 servos resides in src/mjlab_microduck/robot/microduck_constants.py at lines 21–24. Here, the configuration dictionary maps the xl330 motor to the m6 model identifier, establishing the foundation for the voltage-controlled actuator behavior.
The _BAM_ACTUATOR_KWARGS dictionary centralizes the actuator parameters:
from mjlab_microduck.actuator import FrictionDRBamActuatorCfg
_BAM_ACTUATOR_KWARGS = dict(
motor_name="xl330", # Dynamixel XL330 servo
model="m6", # BAM M6: voltage control + load-dependent friction
target_names_expr=(r"^(?!passive_).*",),
kp_fw=200.0, # Firmware-preserved stiffness
vin_range=(6.5, 8.2), # Battery voltage randomisation range
vin_drop_gain_range=(0.0, 0.2),
vin_min=6.0,
delay_min_lag=3,
delay_max_lag=6,
)
FrictionDRBamActuatorCfg Implementation
The FrictionDRBamActuatorCfg class in src/mjlab_microduck/actuator/friction_dr_bam.py implements the BAM M6 behavior. This configuration supports both standard and backlash-aware variants depending on the robot model requirements.
To instantiate the standard actuator for the base robot:
actuators = FrictionDRBamActuatorCfg(**_BAM_ACTUATOR_KWARGS)
For robot models that include backlash hinges, use the BacklashEncoderBamActuatorCfg variant:
from mjlab_microduck.actuator import BacklashEncoderBamActuatorCfg
backlash_actuators = BacklashEncoderBamActuatorCfg(**_BAM_ACTUATOR_KWARGS)
Robot Configuration Integration
The BAM M6 actuator configuration attaches to the robot articulation through the EntityCfg specification in microduck_constants.py. The MICRODUCK_WALK_ROBOT_CFG entity binds the actuator to the walk specification:
MICRODUCK_WALK_ROBOT_CFG = EntityCfg(
spec_fn=get_walk_spec,
init_state=HOME_FRAME,
collisions=(FULL_COLLISION,),
articulation=EntityArticulationInfoCfg(
actuators=(actuators,), # BAM M6 actuator for XL330
soft_joint_pos_limit_factor=0.9,
),
)
Validation and Real-World Calibration
The BAM M6 model is validated against physical test-bench data to ensure simulation fidelity. The scripts/validate_bam_testbench.py script performs this validation, comparing the simulated voltage-controlled response against real Dynamixel XL330 measurements.
Key files in the actuator pipeline include:
src/mjlab_microduck/robot/microduck_constants.py– Defines XL330-to-M6 mappings and robot entity configuration.src/mjlab_microduck/actuator/friction_dr_bam.py– ImplementsFrictionDRBamActuatorCfgand backlash variants.scripts/validate_bam_testbench.py– Validates the BAM M6 model against hardware data.
Summary
- BAM M6 is the designated actuator model for Dynamixel XL330 servos in Microduck RL, providing voltage-controlled simulation with load-dependent friction.
- Configuration resides in
src/mjlab_microduck/robot/microduck_constants.pywithmotor_name="xl330"andmodel="m6". FrictionDRBamActuatorCfgimplements the standard actuator, whileBacklashEncoderBamActuatorCfgsupports backlash-aware models.- The
validate_bam_testbench.pyscript ensures the simulated behavior matches physical XL330 servo performance.
Frequently Asked Questions
What is the BAM M6 actuator model?
The BAM M6 is a voltage-controlled actuator model that incorporates load-dependent friction (BAM) to simulate realistic Dynamixel XL330 servo behavior. It models battery voltage randomization, firmware stiffness preservation, and mechanical lag characteristics.
Where is the XL330 actuator configured in Microduck RL?
The configuration is defined in src/mjlab_microduck/robot/microduck_constants.py at lines 21–24. Here, the _BAM_ACTUATOR_KWARGS dictionary specifies motor_name="xl330" and model="m6", which is passed to FrictionDRBamActuatorCfg classes.
What is the difference between FrictionDRBamActuatorCfg and BacklashEncoderBamActuatorCfg?
FrictionDRBamActuatorCfg provides the standard BAM M6 actuator for base robot models without mechanical backlash. BacklashEncoderBamActuatorCfg extends this functionality to handle backlash hinges, using the same _BAM_ACTUATOR_KWARGS configuration but applying different internal physics modeling for gear slack.
How does the BAM M6 model handle voltage control?
The BAM M6 model simulates voltage control through parameters like vin_range=(6.5, 8.2) for battery randomization, vin_drop_gain_range for sag modeling, and kp_fw for firmware stiffness. This allows the simulation to replicate how the physical XL330 servos respond to varying power supply conditions.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →