Low-level serial driver for communicating with the SemuBot STM32 wheelbase firmware.
semubot_driver provides the host-side interface to the STM32 firmware over serial. It handles sending velocity commands, reading wheelbase state, and serves as the serial backend for ros2_control-based stacks when needed.
Use this package for:
- Direct serial testing of firmware variants
- Onboard-control variants where the STM32 handles mixing or PID internally
- Serial backend for
ros2ctrl-serial
For ros2_control-based stacks, see semubot_ros_control.
CMD:vx,vy,wz
| Field | Meaning |
|---|---|
vx |
Forward / backward |
vy |
Left / right (strafe) |
wz |
Rotation / yaw |
Examples
CMD:0.20,0.00,0.00 # forward
CMD:-0.20,0.00,0.00 # backward
CMD:0.00,0.20,0.00 # left
CMD:0.00,-0.20,0.00 # right
CMD:0.00,0.00,0.20 # rotate
CMD:0.00,0.00,0.00 # stop
STATE:p1,p2,p3,v1,v2,v3
| Field | Meaning |
|---|---|
p1, p2, p3 |
Wheel positions |
v1, v2, v3 |
Wheel velocities |
Motor order
| Index | Joint |
|---|---|
| M1 | omni_ball_1_joint |
| M2 | omni_ball_2_joint |
| M3 | omni_ball_3_joint |
Host sends CMD:vx,vy,wz. STM32 applies the onboard open-loop mixer and drives motors directly. No PID.
Host sends CMD:vx,vy,wz. STM32 computes wheel velocity targets, reads encoders, runs onboard PID, and drives motors. PID runs entirely on the STM32.
The semubot_ros_control hardware interface sends low-level motor commands over serial. semubot_driver acts as the communication backend. PID runs on the ROS 2 side.
/cmd_vel
→ ros2_control controller
→ SemuBotHardwareInterface
→ semubot_driver
→ STM32 → PWM
Open a serial terminal to the STM32 and send commands manually:
# Forward
CMD:0.10,0.00,0.00
# Expected response
STATE:p1,p2,p3,v1,v2,v3
# Stop
CMD:0.00,0.00,0.00Run the driver node as the serial backend for the ros2_control stack:
ros2 run semubot_driver driver_node --ros-args \
-p mode:=ros2_control \
-p serial_port:=/dev/ttyACM0 \
-p baud_rate:=115200In this mode the driver forwards low-level motor commands from the hardware interface to the STM32 and returns encoder state. The STM32 does not perform mixing or PID — that is handled by the ROS 2 controller.
Do not use
mode:=ros2_controlfor onboard PID testing. In that case the STM32 expectsCMD:vx,vy,wzdirectly.
| Package | Description |
|---|---|
semubot_ros_control |
ros2_control hardware interface and velocity controller |
semubot_bringup |
Top-level launch files |
SemuBot-Firmware |
STM32 firmware (FreeRTOS, micro-ROS) |
This project is licensed under the Apache 2.0 license - see the LICENSE file for more information.