@@ -39,17 +39,17 @@ class DijkstraPlanner : public ComputePathToPoseTaskServer
3939private:
4040 // Compute a plan given start and goal poses, provided in global world frame.
4141 bool makePlan (
42- const geometry_msgs::msg::PoseStamped & start,
43- const geometry_msgs::msg::PoseStamped & goal, double tolerance,
44- std::vector<geometry_msgs:: msg::PoseStamped> & plan);
42+ const geometry_msgs::msg::Pose & start,
43+ const geometry_msgs::msg::Pose & goal, double tolerance,
44+ nav2_msgs:: msg::Path & plan);
4545
4646 // Compute the navigation function given a seed point in the world to start from
4747 bool computePotential (const geometry_msgs::msg::Point & world_point);
4848
4949 // Compute a plan to a goal from a potential - must call computePotential first
5050 bool getPlanFromPotential (
51- const geometry_msgs::msg::PoseStamped & goal,
52- std::vector<geometry_msgs:: msg::PoseStamped> & plan);
51+ const geometry_msgs::msg::Pose & goal,
52+ nav2_msgs:: msg::Path & plan);
5353
5454 // Compute the potential, or navigation cost, at a given point in the world
5555 // - must call computePotential first
@@ -62,11 +62,11 @@ class DijkstraPlanner : public ComputePathToPoseTaskServer
6262
6363 // Compute the squared distance between two points
6464 inline double squared_distance (
65- const geometry_msgs::msg::PoseStamped & p1,
66- const geometry_msgs::msg::PoseStamped & p2)
65+ const geometry_msgs::msg::Pose & p1,
66+ const geometry_msgs::msg::Pose & p2)
6767 {
68- double dx = p1.pose . position .x - p2. pose .position .x ;
69- double dy = p1.pose . position .y - p2. pose .position .y ;
68+ double dx = p1.position .x - p2.position .x ;
69+ double dy = p1.position .y - p2.position .y ;
7070 return dx * dx + dy * dy;
7171 }
7272
@@ -87,9 +87,6 @@ class DijkstraPlanner : public ComputePathToPoseTaskServer
8787 // Wait for costmap server to appear
8888 void waitForCostmapServer (const std::chrono::seconds waitTime = std::chrono::seconds(10 ));
8989
90- // Publish plan for visualization purposes
91- void publishPlan (const std::vector<geometry_msgs::msg::PoseStamped> & path);
92-
9390 // Print costmap to terminal
9491 void printCostmap (const nav2_msgs::msg::Costmap & costmap);
9592
0 commit comments