Note
The default configuration for the joy_teleop nodes will only work for the TurtleBot 4 controller
and PS4 controllers. You may need to create your own
controller differ.
To drive the robot, press and hold either L1 or R1, and move the left joystick. By default, L1 will
drive the robot at 'normal' speeds, and R1 will drive the robot at 'turbo' speeds. The buttons can
be changed in the configuration file.
Command Velocity
Both the keyboard and joystick teleop methods work by sending velocity commands the the
robot through the /cmd_vel topic. This topic uses a
robot what linear and angular velocities should be applied.
You can manually publish to this topic through the command line by calling:
ros2 topic pub /cmd_vel geometry_msgs/msg/Twist
"linear:
x: 0.0
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.0"
Set the
linear.x
value to drive the robot forwards or backwards, and the
left or right.
Create® 3 Actions
The Create® 3 provides a set of
DriveDistance, DriveArc, and
to drive or rotate.
For example, command the robot to drive 0.5 m forwards at 0.3 m/s:
ros2 action send_goal /drive_distance irobot_create_msgs/action/DriveDistance
"distance: 0.5
max_translation_speed: 0.3"
ROS2 Actions
for driving the robot. You can use the
RotateAngle
actions to tell the robot exactly how far and how fast
config
file if the button mappings on your
geometry_msgs/Twist
\
message to tell the
angular.z
value to rotate
\
Need help?
Do you have a question about the Turtlebot4 and is the answer not in the manual?
Questions and answers