# 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](http://docs.ros.org/api/geometry_msgs/html/msg/Twist.html) or [geometry_msgs/TwistStamped](http://docs.ros.org/api/geometry_msgs/html/msg/TwistStamped.html)) - Velocity commands for autonomous navigation - Message type depends on ROS_DISTRO environment variable ## Subscribers - `odom` ([nav_msgs/Odometry](http://docs.ros.org/api/nav_msgs/html/msg/Odometry.html)) - 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: ```bash 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: 1. Rotate toward the goal position 2. Drive straight to coordinates (1.0, 0.5) 3. Rotate to face 90 degrees 4. Prompt for the next goal ## Behavior ### Movement Strategy 1. **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 2. **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 3. **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