path_planning

path_planning.py

Overview

path_planning.py is a skeleton global planner that emits a single dummy waypoint at 1 Hz. It lets downstream local planners, controllers and visualisers run before the real global planner is available.

Interfaces (strongly-typed, stateless)

Direction

Topic

Message type / Notes

Required

/{robot}/map

nav_msgs/OccupancyGrid – static or SLAM map

Required

/{robot}/odom_slam

nav_msgs/Odometry – robot pose in map frame

Provided

/{robot}/planned_path

nav_msgs/Path – single-PoseStamped at (1.0, 1.0), 1 Hz

Contract

Pre-conditions

  • Messages published on /map and /odom_slam share the same frame.

  • Both topics must have published at least once before planning.

Post-conditions

  • Every second, exactly one nav_msgs/Path is published.

  • Path header uses the map’s frame_id and current time stamp.

  • A single PoseStamped goal at coordinates (1.0, 1.0) is appended.

Invariants

  • Planner does not block; if data is missing it waits silently.

  • Orientation of the goal pose remains the default identity quaternion.

Implementation notes

  • Use rospy.Rate(1) to enforce 1 Hz.

  • queue_size=1 on the publisher to always keep the latest plan.

  • Replace plan_path() with a full search algorithm when ready.

Classes

PathPlanner()

Skeleton path planner that publishes a one-step plan each second.