SOLO12_SDK
is a C++ interface framework for the SOLO 12 Advanced Quadruped Platform developed by PAL Robotics. This framework uses Masterboard SDK developed by the Open Dynamic Robot Initiative, which provides a C++ interface to send and receive commands from the masterboard via Ethernet or WiFi.
- Estabilish connection with the masterboard via Ethernet and initialize the masterboard.
- Calibrate the encoder zero positions if necessary (i.e. after a power cycle.), then track the encoder zero pose for the visual verification of the calibration.
- Track stance pose (the initial position) in order to place to robot on the ground.
- Track desired joint trajectories that are read from file via the onboard PD controller.
- Save the measured realized joint trajectories to file.
You will need build essentials, cmake and eigen3 to build:
sudo apt-get update
sudo apt-get install build-essential cmake libeigen3-dev
You may use the included scripts or the VS Code tasks to configure and build:
- Clear the existing build (if necessary):
scripts/build/clear.sh
- Configure cmake file:
scripts/build/configure.sh
- Build the project:
scripts/build/build.sh
- Set executable permissions if not already done (may require elevated priviliges):
set_permissions.sh
- Make sure the power is off.
- If you have NOT hard calibrated before: Position each leg exactly in the encoder zero pose using the calibration braces.
- If you have hard calibrated before: Position each leg approximately in the encoder zero pose (i.e. vertical with respect to the base, knees extended).
- Power on the robot and launch the
build/bin/main
executable.
- Navigate to
/build
directory and run the main executable:./bin/main
- Start the main script and wait for the sweep sequence to finish.
- Press
enter
and the robot will be in the hold state. - Press
enter
again and the robot will be tracking the test trajectory found in/data/active/gait.csv
.
The SOLO12_SDK
executable takes command line arguments and keyboard inputs. The available command line arguments can be viewed using the -h
or --help
flag.
You will need the interface name for the SOLO12 robot. You can view this information using ifconfig
in your terminal.
The user interface prints important information in real time to the terminal. The printed information options can be changed in include/commander/config.hpp
.
The interface commands three robot states:
- Sweep: Sweeps the legs until the index pulse positions are found (no user input is needed, however the robot needs to be freely move its joints).
- Hold: Tracks the initial pose of the robot (this can be changed in
include/commander/config.hpp
). - Track: Tracks the trajectory provided in the file
/data/active/gait.csv
(this can be changed ininclude/commander/config.hpp
).
The robot will follow the following state sequence after power up:
Sweeping -> Hold -> Track -> Hold -> Track -> ...
If the index pulse positions are still on memory, sweeping will be skipped.
Hard calibration is required after hardware assembly to determine the index pulse locations with respect to the encoder zero positions. You will need to save the displayed index offset values to include/commander/config.hpp
.
This calibration is done after every power up. The robot will go into sweeping calibration mode if it detects the index positions are not found. During this step, no user input is required, however the robot must be able to move its joints freely. The robot will sweep the legs until the index positions are found. Once all the index positions are found, the robot will go into the zero position thanks to the index pulse locations saved from the hard calibration step (needs to be done only once after hardware assembly). The robot will wait for the user to press any key to continue.
Because of the transmission ratio of 9 between the motors and the joints, the index pulse occurs every -o
or --offset-index
flag. For details, see -h
or --help
flag.
By default, the robot will track the trajectory provided in the file /data/active/gait.csv
(this can be changed in include/commander/config.hpp
). The trajectory file will be read during initialization and then after every time the trajectory is completed.
Once the trajectory is complete, the measured joint trajectories will be saved to /build/data/track_data/realized_control_data.csv
(this can be changed in include/commander/config.hpp
).