-
Notifications
You must be signed in to change notification settings - Fork 2
Motors
The motor node provides topics for the left and right motors which allow setting the speed and reading the current step count, and an estimate of position using the step counts.
-
~rate
,float
: the rate at which odometry and steps are published (default: 10 Hz). -
tf_prefix
,str
: the transform prefix for reference frames.
-
motors/steps_left
,UInt16
: current left step counter value. -
motors/steps_right
,UInt16
: current right step counter value. -
motors/real_steps_left
,Int64
: current left step counter (including overflows). -
motors/real_steps_right
,Int64
: current right step counter (including overflows). -
motors/odometry
,Odometry
: odometry estimate from step counters.
-
motors/speed_left
,Float32
: left motor speed between -1.0 and 1.0. -
motors/speed_right
,Float32
: left motor speed between -1.0 and 1.0.
SMBus
Base controller for navigation stacks to convert /cmd_vel
messages to motor speeds.
-
~rate
,float
: the rate at which motor speeds are updated, only used if~fixed_rate
istrue
(default: 10 Hz). -
~fixed_rate
,bool
: whether a fixed rate for motor speed updates should be used (default:false
). -
~angular_smoothing
,float
: speed smoothing on angular speed, see Motor Control section below (default: 0.65). -
~linear_smoothing
,float
: speed smoothing on linear speed, see Motor Control section below (default: 1.25). -
~motor_control_mode
,str
: can be set tosimple
orcomplex
, see Motor Control section below (default:complex
).
-
motors/speed_right
,Float32
: See motors above. -
motors/speed_left
,Float32
: See motors above.
-
/cmd_vel
,Twist
: commands with requested linear x and angular z. Should be remapped if using multiple Pi-pucks.
Simple control uses a direct correspondence from requested movement to motor speeds using wheel diameter and separation to estimate correct motor speeds.
Does not support smoothing.
Complex control uses the robots physical dimensions to more accurately set motor speeds to match twist parameters. Complex control should therefore be more accurate to the commands being received.
Complex mode also supports smoothing using the following formula: sign(velocity) * abs(velocity) ^ smoothing
. Where velocity
is the initial angular or linear velocity output of the complex controller and smoothing
is the smoothing parameter for angular or linear velocity as specified in the node's parameters.
General
Considerations
Nodes
Examples