IntermediateROS 2 for Real Robots · Part 1

Using ros2_control to Drive a Real Robot

Move past simulation: wire ros2_control up to physical hardware, write a hardware interface, and accept velocity commands from a topic so any standard controller can drive the base.

33:0092K viewsOct 14, 2022#ros2#ros2-control#hardware-interface#twist

Build along

Timestamps jump straight to the matching moment in the video.

Every robot ends up needing the same loop: read sensors, run controllers, write commands. ros2_control standardises that loop so controllers become reusable.

Declare your joints, then implement read() and write(). Start with velocity command interfaces for a differential base - they are the simplest to get moving.

Grab wheel positions from the encoders, convert to linear and angular velocity, and publish odometry plus the joint states other nodes expect.

Send geometry_msgs/Twist to the controller command topic. Because the interface is standard, a joystick, a phone app or a nav stack can all be the source.

Stream the camera and drive from your phone to confirm the whole loop works outside the bench.

Articulated Robotics

@ArticulatedRobotics

Taught by this creator. Follow to see new tutorials in your feed.

Channel