Wheel Velocity Node - AtlasBuggy/BabyBuggyROS GitHub Wiki
Wheel Velocity
To Run
Run rosrun wheel_vel calc_vel.py
Subscribed Topics
/encoder1_raw
, Int64
/encoder2_raw
, Int64
Published Topics
/wheel_vel
, Float64
/ang_vel
, Float64
Details
This node takes in the left and right encoders (encoder1 and encoder2), calculates the velocities using a first order filter (same as the smoothing node). These velocities are published to /wheel_vel
and /ang_vel
with the following equation:
wheel_vel = (right_vel + left_vel) / 2
ang_vel = (right_vel - left_vel) / wheel_dist
Note that wheel_dist is the distance between the left and right encoders.