Examples Overview¶
The examples directory contains C++ and Python examples that use MuJoCo simulation.
Install MuJoCo¶
The C++ examples require MuJoCo headers and libraries to be discoverable by CMake.
C++ Example Directory¶
Build:
Run:
./dyros_robot_controller_example fr3
./dyros_robot_controller_example xls
./dyros_robot_controller_example fr3_xls
Python Example Directory¶
Run:
python3 dyros_robot_controller_example.py --robot_name fr3
python3 dyros_robot_controller_example.py --robot_name xls
python3 dyros_robot_controller_example.py --robot_name fr3_xls
Control Loop Pattern¶
All examples follow the same shape:
- Initialize
RobotDataandRobotController. - Update model state from simulator state.
- Compute the desired command.
- Send the command back to the simulator.