How arghyachatterjee/waypoint-based-2d-navigation-in-ros works
Project Type and Purpose
• Type: A ROS‐based robotics navigation package (Python node) that buffers and sequentially issues waypoint goals to the navigation stack.
• Purpose:
– Accept a list of 2D waypoints (predefined or loaded from file).
– Publish goals to the move_base action server one by one.
– Optionally record the robot’s path to disk.
– Expose ROS parameters for wait duration and distance tolerance.
File Structure
• Top-level:
– CMakeLists.txt, package.xml, setup.py: ROS build/config files.
– launch/follow_waypoints.launch: Launches your node and any required parameters.
– nodes/follow_waypoints: (possibly legacy or alternate launch script wrapper).
– src/follow_waypoints/follow_waypoints.py: Main Python node implementing waypoint sequencing.
– saved_path/pose.csv & pose.txt: Files where recorded waypoint sequences are stored.
– readme_images: Screenshots for documentation.
• Architectural hints:
– A single core node (“follow_waypoints”) interacting with ROS Master, Parameter Server, Action Server, Topics, and the local filesystem.
README for Additional Insights
• Runtime invocation:
rosrun follow_waypoints follow_waypoints.py
• ROS parameters:
– wait_duration (float)
– waypoint_distance_tolerance (float)
• Topics/Actions used:
– Publishes to move_base action server
– Subscribes to robot pose (e.g., /amcl_pose or /odom)
– Listens for /start_journey topic (std_msgs/Empty)
• Features: buffering goals, saving/loading paths.
Main Components
a. ROS Master & Parameter Server
b. follow_waypoints Node (Action Client & Publisher/Subscriber)
c. Navigation Stack (e.g., move_base Action Server, local & global costmaps)
d. Robot Base Controller (diff_drive_controller, hardware drivers)
e. Rviz (Visualization)
f. File System (saved_path/*.csv, *.txt)
g. User Interface (CLI or remapping for parameters/topics)
Relationships & Interactions
• follow_waypoints ↔ ROS Master
– Registers as node, reads parameters (wait_duration, waypoint_distance_tolerance), advertises topics and action client.
• follow_waypoints –> move_base (actionlib client sends PoseStamped goals)
• move_base –> Robot Base (trajectory commands)
• Robot Base –> Odometry topic (e.g., /odom), follow_waypoints subscribes to monitor distance to each waypoint.
• follow_waypoints –> File System (writes/reads saved_path/pose.csv)
• User –> ROS Parameter Server (sets parameters)
• User –> /start_journey topic (std_msgs/Empty) to trigger replay of saved path
• follow_waypoints –> Rviz (publishes visualization markers or relies on move_base display)
Architectural Patterns & Principles
• Publisher/Subscriber for telemetry and control triggers.
• Actionlib Client/Server for goal sequencing and preemption.
• Parameter Server for tunable behaviors.
• Modularization: Single responsibility node, delegating path planning & control to the navigation stack.