Effective Robotics Programming with ROS - Third Edition
by Luis Sanchez, Enrique Fernandez Perdomo, Anil Mahtani
Creating a base controller
A base controller is an important element in the navigation stack because it is the only way to effectively control your robot. It communicates directly with the electronics of your robot.
ROS does not provide a standard base controller, so you must write a base controller for your mobile platform.
Your robot has to be controlled with the message type geometry_msgs/Twist. This message was used on the Odometry message that we saw before.
So, your base controller must subscribe to a topic with the name cmd_vel, and must generate the correct commands to move the platform with the correct linear and angular velocities.
We are now going to recall the structure of this message. Type the following command in a shell to see the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access