MuJoCo Humanoid
by Google DeepMind
A 21 degree-of-freedom bipedal humanoid model for advanced locomotion research. Features full-body articulation including torso, hips, knees, ankles, shoulders, and elbows. Ideal for studying walking, running, balance control, and complex whole-body coordination tasks. This high-fidelity physics model enables realistic biomechanics simulation and is widely used in reinforcement learning research for bipedal locomotion.
Specifications
- Manufacturer
- Google DeepMind
- Type
- Humanoid Robot
- Environment
- Simulated
- Category
- MuJoCo Physics Simulator
- Controller
- MuJoCo
- Sensors
- Joint positionJoint velocityTorso orientationCenter of massGround contact
- Actuators
- Position servoVelocity servoTorque control
- Connectivity
- ZMQLocal
Getting started
MuJoCo Humanoid Integration Guide
Overview
The MuJoCo Humanoid is a 21-DOF bipedal robot model designed for advanced locomotion research. This integration allows FEAGI's neural circuits to control the humanoid's movements, learning to walk, balance, and perform complex whole-body coordination tasks.
Model Specifications
- Degrees of Freedom: 21
- Actuators: 21 (torso, hips, knees, ankles, shoulders, elbows)
- Body Segments: Torso, pelvis, two legs (thighs, shins, feet), two arms (upper arms, forearms, hands)
- Control Frequency: 50 Hz
- Simulation Timestep: 0.002s
Sensory Capabilities
Joint Sensors
- Joint Position: Current angle of each actuated joint (21 values)
- Joint Velocity: Angular velocity of each joint (21 values)
Body State Sensors
- Torso Orientation: Quaternion representing torso rotation in 3D space
- Center of Mass: XYZ position of the robot's center of mass
- Ground Contact: Binary sensors for each foot indicating ground contact
Motor Capabilities
Actuator Types
- Position Control: Direct joint angle targets
- Velocity Control: Desired angular velocity for each joint
- Torque Control: Direct torque commands (advanced)
Joint Ranges
- Hip joints: ±90°
- Knee joints: 0° to 150°
- Ankle joints: ±45°
- Shoulder joints: ±90°
- Elbow joints: 0° to 150°
FEAGI Integration
Cortical Mapping
i_joint_position: 21 neurons (one per joint angle)i_joint_velocity: 21 neurons (angular velocities)i_orientation: 4 neurons (quaternion)i_com_position: 3 neurons (XYZ)i_ground_contact: 2 neurons (left foot, right foot)
o_joint_control: 21 neurons (target positions or velocities)
Neural Circuit Design Tips
- Balance Control: Use torso orientation and COM sensors to maintain upright posture
- Gait Generation: Create CPG (Central Pattern Generator) circuits for rhythmic leg movements
- Coordination: Hip-knee-ankle coordination is critical for stable walking
- Ground Contact Feedback: Use foot contact sensors to trigger stance/swing phase transitions
Controller Setup
Prerequisites
- MuJoCo physics engine (included with controller)
- Python 3.8+
- FEAGI Python SDK
Installation
The generic MuJoCo controller handles all models. When launching the humanoid:
python controller.py --model_xml humanoid.xml --agent_id mujoco_humanoid_01
Controller Parameters
--ip: FEAGI IP address (default: 127.0.0.1)--model_xml: Model file (humanoid.xml)--agent_id: Unique agent identifier--cortical_input: Input cortical area name (default: i_vision)--cortical_output: Output cortical area name (default: o_motor)
Recommended Learning Tasks
Beginner
- Stand Upright: Learn to maintain balance without falling
- Shift Weight: Transfer weight between feet
Intermediate
- Step in Place: Lift one foot while maintaining balance
- Forward Steps: Take coordinated steps forward
- Turn in Place: Rotate the body while standing
Advanced
- Continuous Walking: Maintain stable forward locomotion
- Obstacle Navigation: Walk around or over obstacles
- Terrain Adaptation: Adjust gait for uneven surfaces
Troubleshooting
Model Falls Immediately
- Check that torso orientation sensors are connected
- Verify ground contact sensors are providing feedback
- Ensure initial joint angles are within safe ranges
Jerky or Unstable Movement
- Reduce motor command magnitudes
- Implement smoothing in motor output layer
- Check simulation timestep and control frequency match
Controller Not Connecting
- Verify FEAGI is running and accessible
- Check firewall settings for ZMQ ports (5555, 30005, 30001)
- Review controller logs for connection errors
Resources
- MuJoCo Documentation: https://mujoco.readthedocs.io/
- FEAGI Documentation: https://feagi.org/docs
- Example Genomes: Check the FEAGI marketplace for pre-trained walking controllers
Support
For integration questions or issues:
- Discord: https://discord.gg/feagi
- GitHub Issues: https://github.com/feagi/feagi
Connecting to FEAGI
MuJoCo Humanoid - Connectivity
Connection Type
The MuJoCo Humanoid runs on your local machine and connects to FEAGI via:
- ZMQ for sensory data (joint positions, velocities, orientation)
- ZMQ for motor commands (joint control signals)
- HTTP for registration and metadata
Network Requirements
Ports Used
- 5555: Sensory data (ZMQ PUB socket)
- 30005: Motor commands (ZMQ SUB socket)
- 30001: Agent registration (TCP)
Firewall Configuration
Ensure these ports are open for localhost communication:
# macOS
sudo pfctl -d # Disable firewall temporarily for testing
# Linux
sudo ufw allow 5555
sudo ufw allow 30005
sudo ufw allow 30001
# Windows
# Open Windows Firewall settings and allow these ports
Controller Setup
Installation
The generic MuJoCo controller is installed once and can run any MuJoCo model.
- Navigate to Embodiment Explorer
- Select "MuJoCo Physics Simulator" category
- Click on "MuJoCo Humanoid"
- Click "Launch" (controller installs automatically if needed)
# Clone controller repository
git clone https://github.com/feagi/embodiment-controllers.git
cd embodiment-controllers/simulators/mujoco
# Create Python virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Install FEAGI Python SDK
pip install feagi
Launch Command
# From controller directory with venv activated
python generic_controller.py \
--model_xml humanoid.xml \
--agent_id mujoco_humanoid_01 \
--ip 127.0.0.1 \
--cortical_input i_vision \
--cortical_output o_motor
Configuration Options
| Parameter | Default | Description |
|---|---|---|
--ip | 127.0.0.1 | FEAGI host IP address |
--model_xml | (required) | MuJoCo model XML file |
--agent_id | (required) | Unique agent identifier |
--cortical_input | i_vision | Input cortical area name |
--cortical_output | o_motor | Output cortical area name |
Connection Process
- Startup: Controller loads MuJoCo model and initializes physics engine
- Check FEAGI: Verifies FEAGI is reachable on specified IP
- Register: Sends agent registration to FEAGI (port 30001)
- Establish ZMQ: Creates publisher (port 5555) and subscriber (port 30005)
- Simulation Loop:
- Reads joint states from MuJoCo
- Publishes sensory data to FEAGI
- Receives motor commands from FEAGI
- Applies commands to MuJoCo actuators
- Steps physics simulation at 120 Hz
Standalone Mode
- Physics simulation continues normally
- MuJoCo viewer allows manual joint manipulation
- No neural control (useful for testing physics)
To exit standalone and connect to FEAGI:
- Start FEAGI
- Restart the controller
Troubleshooting
"Connection refused" Error
- Verify FEAGI is running:
docker psor check FEAGI logs - Check IP address matches FEAGI host
- Ensure ports 5555, 30005, 30001 are not blocked
Model Freezes or Stops Responding
- Check FEAGI logs for errors
- Verify ZMQ sockets are not blocked by firewall
- Restart controller and FEAGI if connection is lost
Model Loads but No Neural Control
- Verify cortical area names match FEAGI genome
- Check motor commands are being published by FEAGI
- Review FEAGI logs for mapping errors
High Latency or Lag
- Reduce control frequency if CPU is overloaded
- Check network latency if FEAGI is remote
- Close unnecessary applications
Remote FEAGI Connection
To connect to FEAGI running on a different machine:
# Replace 127.0.0.1 with FEAGI host IP
python generic_controller.py \
--model_xml humanoid.xml \
--agent_id mujoco_humanoid_01 \
--ip 192.168.1.100
Performance Optimization
For Best Performance:
- Run controller and FEAGI on the same machine (localhost)
- Close MuJoCo viewer if visual feedback not needed (headless mode)
- Reduce control frequency for complex genomes
- Use dedicated GPU for FEAGI neural computations
Support
For connectivity issues:
- Discord: https://discord.gg/feagi
- GitHub Issues: https://github.com/feagi/embodiment-controllers
View marketplace for this embodiment · Back to embodiment explorer
