Berkeley Humanoid Lite Docs
  • Home
  • Releases
  • Getting Started with Hardware
    • Materials and Parts (BOM)
    • Preparing the Tools
    • 3D Printing Instructions
    • Building the Actuator
    • Flashing the Motor Controllers
    • Building the Robot
  • Getting Started with Software
    • Software Development Environment Overview
    • Training Environment
    • Sim2sim Validation
    • The On-board Computer
    • Motion Capture System
  • lerobot Integration
  • In-depth Contents
    • Field Oriented Control (FOC) Operation
    • Motor Controller Firmware Execution Timing Information
    • Motor Characterization
    • Actuator Characterization
    • CAN Communication
    • Joint ID Mapping
    • Exporting Robot Description Files from Onshape
    • Domain Randomizations for Training Locomotion
  • Contribute
Powered by GitBook
On this page
  • Install Ubuntu 22.04
  • Install Dependencies
  • Test connection with joint actuators
  • Test connection with IMU
  • Test connection with Joystick
  • Run everything together
  • C codebase
  • Python codebase
  1. Getting Started with Software

The On-board Computer

PreviousSim2sim ValidationNextMotion Capture System

Last updated 23 days ago

We are almost done!

The last step before running policy on the real robot is to set up the environment on the on-board NUC computer.

Install Ubuntu 22.04

We find that Ubuntu 22.04 works well with our software and hardware stack on the robot. Follow to install Ubuntu 22.04 on the NUC computer.

Note

To enter BIOS on the BeeLink N95 NUC computer, press XXXX during bootup.

Install Dependencies

sudo apt install build-essential cmake net-tools can-utils python3-pip

Test connection with joint actuators

As the first step, we need to initialize the CAN transport on the Linux side. To do this, we have prepared a script:

source ./scripts/start_can_transports.sh

Note

Naturally, to stop the transports, you can do:

source ./scripts/stop_can_transports.sh

To test connection to individual actuator, run this command.

python ./berkeley_humanoid_lite_lowlevel/motor/ping.py --port can0 --id 1

--port corresponds to the port of the CAN device on linux. With the two arms and legs all connected, it should be can[0,1,2,3]

--id corresponds to the CAN ID of the device. It should be in range [1..14].

Alternatively, to test connection to all the motors, run this script.

python ./berkeley_humanoid_lite_lowlevel/robot/anyonehere.py

Test connection with IMU

To test connection to the IMU, run this command.

python ./berkeley_humanoid_lite_lowlevel/robot/test_imu.py

Test connection with Joystick

Run this script to launch the Python program that reads the joystick and broadcast the reading on UDP port.

python ./berkeley_humanoid_lite_lowlevel/policy/udp_joystick.py

Run everything together

There are two ways to run the lowlevel code: C codebase and Python codebase.

C codebase

For locomotion tasks, we recommend to use the C codebase for better realtime gaurantee. The C codebase is under ./csrc/ directory.

On the on-board computer, do the following:

make
./build/real_humanoid

Real-time kernel performance

Python codebase

[Coming soon]

If running into performance issues where the USB-CAN adapter cannot maintain the required communication frequency, we can use the real-time kernel instead.

Ubuntu tutorial
https://xanmod.org/