Connecting to sources…

How to build Berkeley Humanoid Lite: the whole process

81 steps to build Berkeley Humanoid Lite, from buying parts, printing and assembly to software, calibration and training, with the bill of materials, shop links and the …

Described as under $5,000 in total; no itemised list

Buy parts

  • Select Power and CAN Cables

    Power cables use 14 AWG stranded silicone wire, with white/red for positive and black for ground. CAN cables use 30 AWG stranded silicone wire, with yellow for CAN-H and SDA and green for CAN-L and SCL.

  • Use the USB-Capable IM10A IMU

    Choose the IM10A IMU, which directly supports a USB connection. Using it avoids manually soldering the signal wires, and the BOM has been updated to include it.

Print and make

  • Download the latest CAD and print files

    Open the Releases page and download the latest CAD model and 3D printing project files.

  • Use the Bambu Lab X1C print settings

    The supplied parameters are tuned for the Bambu Lab X1C 3D printer. Modify them as needed to suit the characteristics of your own printer.

  • Print the actuator components

    Print the housing, output shaft, and motor shell using the Actuator Housing Profile.

  • Apply the actuator housing profile

    Apply the Actuator Housing Profile when printing the housing, output shaft, and motor shell.

  • Use the Quality profile settings

    The Actuator Housing Profile includes the settings shown under the Quality tab.

  • Use the Strength profile settings

    The Actuator Housing Profile includes the settings shown under the Strength tab.

  • Use the Support profile settings

    The Actuator Housing Profile includes the settings shown under the Support tab.

  • Use the Other profile settings

    The Actuator Housing Profile includes the settings shown under the Others tab.

  • Print Actuator Profile Components

    Print the cycloidal disk, input shaft, motor shaft, and spacers using the Actuator Shaft Profile.

  • Print the Remaining Robot Parts

    Print the remaining robot parts using the same printing approach.

  • Print Body Plates Mirrored

    Print the Upper Body and Lower Body plate parts twice in mirrored settings to assemble two arms and two legs. Right-click the part and select "mirror along X axis".

  • Print Structural Parts Faster

    Print the structural parts at a faster speed setting because they do not require the high precision used for actuator modules.

  • Get latest CAD and print files

    Access the latest CAD models and 3D print files from the Release page.

Assemble

  • Assemble the Arm

    Follow the arm video tutorial to assemble the arm.

  • Assemble the Leg

    Follow the leg video tutorial to assemble the leg.

  • Assemble the Entire Robot

    Follow the entire-robot video tutorial to assemble the robot.

  • Connect the Electrical Components

    After building the mechanical structure, connect the electrical components by following the wiring diagram.

  • Connect the CAN Bus Adapter

    Attach the cables directly to the screw terminal on the USB-CAN adapter board in CAN-L, CAN-H, GND order. The signal names are also labeled on the back side of the PCB.

  • Solder the Signal Cables

    Solder the signal cables together directly and protect the solder joints with heat-shrink tubes.

  • Connect the Power Bus with WAGO

    For initial power-cable connections and easier debugging, use WAGO connectors to quickly attach and detach each actuator to the main power bus without soldering. Two-, three-, and five-port types are used on the robot.

  • Permanently Solder the Cables

    For a more permanent build, solder the cables together directly. The video demonstrates how to solder the thicker cables.

  • Connect Actuators with XT Connectors

    Connect the main cables with XT60 connectors and connect each actuator to the main power bus with XT30 connectors.

  • Connect the IMU Through Arduino Nano

    Connect the IMU to the computer through an Arduino Nano. Use the reference photos to inspect the original wiring connection.

  • Modify the AS5600 magnetic encoder

    Follow the linked tutorial or video to swap out several resistors on the AS5600 magnetic encoder board.

  • Solder the encoder wires

    After moving the resistors, solder the VCC, GND, SDA, and SCL wires to the corresponding pads.

  • Attach the magnet to the motor rotor

    Use hot glue to stick the magnet to the motor rotor shaft. The 5010 motor uses a clip, while the M6C12 motor uses a screw at the end of the shaft, but the magnet-mounting procedure is the same.

  • Use the Encoder's Supplied Magnet

    Use the magnet supplied with the encoder. These magnets are charged along the radial axis, whereas normal round magnets are charged along the cylinder axis and do not work with the encoder.

  • Assemble the Actuator

    Assemble the actuator by following the video tutorial.

  • Connect and Solder Components

    Connect the encoder, motor, and motor controller according to the wiring diagram. The ECS CAN pads are fragile, so do not apply excessive force to the cables or pads while soldering and handling them; adding more flux helps form a solid solder joint on the tricky encoder and CAN pads.

  • Configure the actuator CAN ID

    Set `DEVICE_CAN_ID` to the correct CAN ID for the joint using the Joint ID Mapping. The value must be in the range [1, 63].

  • Select the motor profile

    Scroll to the motor selection section and uncomment the profile for the motor being used: MAD M6C12 150KV, MAD 5010 110KV, MAD 5010 310KV, or MAD 5010 370KV.

  • Disable Flash configuration loading

    Set both `LOAD_ID_FROM_FLASH` and `LOAD_CONFIG_FROM_FLASH` to 0 so the program can override the default random values in Flash.

Software

  • Install Isaac Lab system packages

    Use apt to install cmake and build-essential, the system packages required by Isaac Lab.

  • Install uv

    Run the installation script to set up uv, a Python package and project manager.

  • Sync project dependencies

    Run uv sync to install everything required by the project.

  • Activate the uv environment

    Activate the ./.venv virtual environment in the project.

  • Create a conda environment

    Create and activate a conda environment named berkeley-humanoid-lite using Python 3.10.

  • Install Isaac Sim and Isaac Lab

    Install Isaac Sim 4.5.0 and Isaac Lab 2.1.0 on a fresh installation of Ubuntu 24.04.

  • Clone the project repository

    Clone the HybridRobotics Berkeley-Humanoid-Lite project repository.

  • Initialize the project submodules

    Enter the cloned repository and initialize the robot description and low-level code submodules.

  • Install modules into Isaac Lab

    Install the Berkeley Humanoid Lite, assets, and low-level code modules into the Isaac Lab environment in editable mode.

  • Install additional project packages

    Install the additional packages required by the project using the requirements.txt file.

  • Install Ubuntu 22.04

    Follow the Ubuntu tutorial to install Ubuntu 22.04 on the NUC computer.

  • Enter the NUC BIOS

    Press XXXX during bootup to enter the BIOS on the BeeLink N95 NUC computer.

  • Install Dependencies

    Install build-essential, cmake, net-tools, can-utils, and python3-pip.

  • Initialize the CAN Transport

    Run the provided script to initialize the CAN transport on the Linux side.

  • Stop the CAN Transports

    Run the stop script when the transports need to be stopped.

  • Start the CAN transports

    Before running the program, make sure the CAN transports are started correctly.

  • Build and run the C codebase

    The C codebase is under the `./csrc/` directory. On the onboard computer, run `make`, then run `./build/real_humanoid`.

  • Run Python locomotion

    Go to the `./source/berkeley-humanoid-lite-lowlevel/` directory and run the locomotion script. The robot follows the same state transitions as the Mujoco sim2sim simulation.

  • Set Up STM32CubeIDE

    Set up STM32CubeIDE for flashing the motor controllers.

  • Clone the Motor Controller Firmware

    Download the motor controller firmware codebase from the Recoil-Motor-Controller-BESC repository.

  • Flash the motor controller

    Click the "Run" button to load the configured program into the motor controller.

  • Restore flags and flash again

    Change the configuration flags back to 1, then click "Run" to perform the final flashing.

  • Load motor controller firmware

    Click the "Run" button four times so that both the firmware and configuration parameters are loaded to the motor controller.

  • Review setup documentation

    Follow the documentation for Berkeley Humanoid Lite software and hardware setup.

Calibrate and test

  • Enable First-Time Bootup Configuration

    Open `Core/Inc/motor_controller_conf.h` and set `FIRST_TIME_BOOTUP` to 1 so the internal Flash pages can be configured for reading and writing.

  • Connect and Run the Initial Flash

    Connect the motor controller to the computer through its Micro USB port. Wait for STM32CubeIDE to detect the device, then click the "Run" button.

  • Update the ST-LINK Debugger Firmware

    On a brand-new board, accept the ST-LINK debugger firmware update and perform the upgrade according to its instructions. Click "Run" again afterward.

  • Power-Cycle and Complete Configuration

    Unplug and reconnect the USB cable to power-cycle the board after the initial flash. Then change the `FIRST_TIME_BOOTUP` flag back to 0.

  • Verify the flashed program

    After the second flashing, unplug and plug the device again to ensure the flash option is loaded. Confirm that the LED blinks at around 1 Hz.

  • Connect the actuator to the computer

    Use the on-board computer after completing the On-board Computer section. Connect the actuator CAN bus to the computer through the USB-CAN adapter, then power on the actuator.

  • Start the socket CAN transport

    Before running the Python script, start the socket CAN transport on the computer.

  • Check the actuator CAN connection

    Run the motor ping script using the can0 transport and CAN ID 1. Use -c to select the CAN transport and -i to specify the device CAN ID.

  • Verify the actuator is online

    A successful connection prints "Motor is online". If the script prints "Motor is offline", check the signal cable connection, power, and CAN ID settings.

  • Calibrate the electrical position offset

    Make sure nothing is attached to the actuator and that it is free to spin, then run the electrical-offset calibration program for can0 and CAN ID 1.

  • Prepare the actuator for motor testing

    Connect the power cables properly and leave the actuator free to spin. Expect the motor to draw about 1 A from the power supply.

  • Observe the motor calibration sequence

    The motor gradually increases holding torque until the phase current reaches the target value. It then makes one full mechanical rotation counter-clockwise, followed by one rotation clockwise.

  • Correct a reversed rotation direction

    If the motor first rotates clockwise and then counter-clockwise, swap any two of the three motor phase wires. Alternatively, change MOTOR_PHASE_ORDER in the firmware to -1.

  • Test an Individual Actuator

    Test an individual actuator using port can0 and ID 1. With both arms and legs connected, the CAN ports should be can[0,1,2,3], and the device ID should be in the range [1..14].

  • Test All Motor Connections

    Run the script to test the connection to all the motors.

  • Test the IMU connection

    Run the provided script to test the connection to the IMU.

  • Test the joystick connection

    Launch the Python program that reads the joystick and broadcasts the readings on a UDP port.

Data and training

  • Choose a policy training task

    Velocity-Berkeley-Humanoid-Lite-v0 trains a policy that actuates all 22 degrees of freedom on the robot, while Velocity-Berkeley-Humanoid-Lite-Biped-v0 only controls the 12 degrees of freedom on the leg.

  • Train the policy

    Run the provided training command. By default, training runs for 6000 iterations and should take around two hours.

  • View results and export policy

    Run the viewing script to visualize the trained policy. The script also exports the trained policy to an ONNX file and creates or updates configs/policy_latest.yaml, which records the parameters used for sim2sim and sim2real deployment.

  • Move the actuator with a sinusoidal curve

    Run the provided script on CAN interface can0 for actuator ID 1. It commands the actuator to rotate according to a sinusoidal position curve.

Use it

  • Begin with conservative motor settings

    Start with small kP, kD, and torque-limit values to learn how the actuator behaves. If anything unexpected happens, press Ctrl+C to stop the actuator.

  • Visualize the robot

    Run the visualization script to visualize the robot.

Common problems

  • CAD assets have export failures and incorrect dimensions. #8 #24
  • Published print files contain wrong, missing, and duplicate parts. #4 #19
  • BOM omissions and mismatches cause incorrect parts purchases. #2 #7
  • The recommended 110KV motor is discontinued and unavailable. #1
  • Software installation lacks required configuration and Python modules. #10 #15
  • Pinned PyTorch fails on RTX 50-series GPU architectures. #43 #49
  • Sim2Sim commands make the robot slide without stepping. #46
  • Arm joints lack an initial-offset calibration procedure. #48

Datasets

Parts

  • Modular 3D-printed gearboxes and widely available parts (CAD and print files in Releases)
  • Actuator and compute models not stated

Tools

  • 3D printer

Skills

  • Isaac Lab policy training and sim2sim validation
  • Real-world deployment and teleoperation

Software

  • Isaac Lab environments and task definitions
  • Motion capture and teleoperated control

Documents