Skip to content

README.md

Machine-translated by Robotheca from the original in Chinese (opens in a new tab). License: MIT (opens in a new tab).

C++ Controller Problem (15 points)

Problem Description

Implement a ROS 2 control node and reusable Controller API using C++ (C++17 recommended). The core logic must not be replaced with Python. It is recommended to split the controller into modules such as controller, kinematics, dynamics, balance, and trajectory planning. The system should take user commands and robot status as input and output target values for six motors' joints/wheels. The control input must subscribe to the Topic specified in docs/remote_control.md, supporting inputs from keyboard, analog web, or CAN gateway.

The control deployment must clearly select one of the following modes:

  • Pure Upper Computer: The upper computer directly sends CAN frames via GPIO peripherals or USB-CAN modules to control the six motors.
  • Upper-Lower Computer Collaboration: The upper computer receives data from remote controllers, IMU/status, etc., and sends high-level commands to the lower computer via GPIO, USB-TTL, or other serial links; the lower computer parses the commands and is responsible for CAN motor control.
  • Pure Lower Computer: No dependency on the upper computer; the remote controller/sensors, control algorithms, and CAN execution links are all closed-loop on the lower computer. Simulation or virtual actuators can be deployed on the lower computer for demonstration.

All three modes must provide data flow, fault/emergency stop strategies, and reproducible demonstration methods. If the pure lower computer solution is fully implemented, additional points may be awarded for the Linux control link part as specified in linux/README.md.

Deliverables

include/, src/, config/, launch/, CMakeLists.txt, interface documentation, and unit/integration tests. It should include inverse kinematics, leg-wheel coordination, jump trajectory, limit handling, and exception handling. Additionally, submit the upper computer/lower computer mode selection, link timing, and the 6-motor mapping table.

Scoring

ItemScore
C++ ROS 2 Node2
Controller Hierarchy, Deployment Mode, and Interface Architecture2
Kinematics/Dynamics Computation2
Trajectory Planning (Including Jumping)2
Control Stability, Limits, and Fault Handling1
Remote Controller Topic/CAN Input and Safety Timeout1
Six-Motor Actuator, Visual Input, and Hardware Backend Integration5

Acceptance

Check the source code, compilation logs, Topic/parameter interfaces, six motor targets, and simulation results; verify the safety behavior after a 200 ms timeout of the remote control input. Python may only be used for data analysis, plotting, dataset processing, or automated testing.

Total: 15 points.

Files by @wusi321, at commit b6b12b0, read from GitHub in your browser. Hardware license: MIT; software license: MIT. Robotheca doesn't review code: read it before running it.