turtlebot3_absolute_move
This file is ai generated. Do not edit this file directly. Instead, edit the node source code and run the generate-node-docs command to update this file.
Description
An interactive node that moves the TurtleBot3 to absolute coordinates in the odometry frame. Users can input goal positions and headings, and the node autonomously navigates the robot to those coordinates. The node uses a simple path planner that first moves to the target position, then rotates to the desired heading.
Publishers
cmd_vel(geometry_msgs/Twist or geometry_msgs/TwistStamped)Velocity commands for autonomous navigation
Message type depends on ROS_DISTRO environment variable
Subscribers
odom(nav_msgs/Odometry)Current robot pose in the odometry frame
Parameters
The node uses hardcoded control parameters:
Angular speed: 0.15 rad/s
Linear speed: 0.5 m/s (scaled by distance)
Position threshold: 0.05 meters
Heading threshold: 1.0 degree
Control rate: 20 Hz (0.05 second timer period)
Example Usage
Launch the absolute move node:
ros2 run turtlebot3_example turtlebot3_absolute_move
Input example:
goal x (absolute): 1.0
goal y (absolute): 0.5
goal heading (absolute, degrees): 90
The robot will:
Rotate toward the goal position
Drive straight to coordinates (1.0, 0.5)
Rotate to face 90 degrees
Prompt for the next goal
Behavior
Movement Strategy
Translation Phase:
Calculates direction to goal position
Rotates toward goal while moving forward
Uses proportional control for angular velocity
Linear velocity scaled by distance (max 0.1 m/s)
Stops when within 0.05 m of goal
Rotation Phase:
Rotates to desired heading
Uses proportional control (scaled by heading error)
Minimum rotation speed: 0.1 rad/s
Maximum rotation speed: 1.0 rad/s
Stops when within 1° of target heading
Sequential Goals:
After reaching a goal, prompts for next coordinates
Continues until program is interrupted (Ctrl+C)
Input Format
goal x: Absolute x coordinate in meters (can be negative)
goal y: Absolute y coordinate in meters (can be negative)
goal heading: Absolute orientation in degrees (-180 to 180)
0° = positive X axis
90° = positive Y axis
-90° = negative Y axis
180° or -180° = negative X axis
Notes
Requires accurate odometry for proper navigation
Does not perform obstacle avoidance
Can be combined with obstacle detection node for safer operation
The node continuously logs progress messages showing current and goal positions