Expand description
Motor Node
This node manages motor control with configurable controller backends.
It provides velocity control through the standard /motor/cmd_vel topic
and publishes odometry data.
§Controller Selection
The node supports multiple motor controllers, selected via configuration:
- mock: Simulated motors for testing/development (no hardware required)
- l298n: L298N dual H-bridge driver for DC motors
§Topics
- Subscribes:
/motor/cmd_vel(Twist) - Velocity commands - Publishes:
/odom(Odometry) - Odometry data - Publishes:
/motor/status(MotorStatus) - Motor status
§Configuration
{
"controller": {
"type": "mock", // or "l298n"
"wheel_base": 0.3,
"max_velocity": 1.0
},
"odom_rate_hz": 50.0,
"max_linear_vel": 0.5,
"max_angular_vel": 1.0
}See config.rs for full configuration options.
Modules§
- topics
- Motor node topics
Structs§
- L298n
Controller Config - L298N controller configuration
- L298n
Motor Pins - Pin configuration for a single L298N motor
- Mock
Controller Config - Mock controller configuration
- Motor
Config - Motor node configuration
- Motor
Node - Motor node
Enums§
- Controller
Config - Motor controller configuration - tagged union
Traits§
- DynMotor
Controller - Trait alias for dynamic dispatch of motor controllers
Functions§
- create_
motor_ controller - Create a motor controller based on configuration
- run
- Run the motor node with V2 configuration system
Type Aliases§
- Boxed
Motor Controller - Boxed motor controller trait object