Skip to content

jhaeusle/berkeley-humanoid-lite-lowlevel

 
 

Repository files navigation

Berkeley Humanoid Lite Low-level Control

This submodule repository contains the low-level control code for the Berkeley Humanoid Lite robot.

Installation

sudo apt install net-tools can-utils
pip install -r requirements.txt

Getting Started

Bring up the CAN interface

The low-level computer connects to the joints via CAN.

Run this script to initialize the CAN interface:

sudo ./scripts/start_can_transports.sh

Verify CAN connection

A Python script is provided to verify the CAN connection to all the joints of the robot:

python3 ./berkeley_humanoid_lite_lowlevel/robot/check_connection.py

Launch the joystick receiver

The low-level computer also receives commands from the joystick.

To broadcast the joystick commands to other running nodes, run the following command:

python ./berkeley_humanoid_lite_lowlevel/policy/udp_joystick.py

Joint Calibration

Because the joint actuators only have single encoder on the motor shaft, we need to calibrate the zero position of the joints after each power cycle.

Run the following command to start the calibration:

python3 ./berkeley_humanoid_lite_lowlevel/robot/calibrate_joints.py

After the script is launched and running, manually move the robot joints to the mechanical position limits. After all the joints are moved, press q or the B button on the joystick to quit the calibration.

The calibration data will be saved in the ./calibration.yaml file.

Run main controller

The main controller is implemented in C.

To run the controller, run the following command:

make run

Press LB + A to enter RL init mode. Then, press RB + A to enter RL running mode.

At any time, press B or the thumb buttons to exit RL mode. The joints will enter passive damping mode.

Press Ctrl + C to terminate the controller. Upon first termination, the joints will enter passive damping mode. Press Ctrl + C again to completely stop the controller, which joints will return to unpowered idle state.

About

A submodule of Berkeley Humanoid Lite Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 47.8%
  • C++ 39.7%
  • C 10.8%
  • CMake 1.3%
  • Other 0.4%