Skip to content

Commit a4a57aa

Browse files
authored
fix bug for adding final goal (#65)
1 parent 7d67208 commit a4a57aa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

nav2_straightline_planner/src/straight_line_planner.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ nav_msgs::msg::Path StraightLine::createPlan(
133133
global_path.poses.push_back(pose);
134134
}
135135

136-
global_path.poses.push_back(goal);
136+
geometry_msgs::msg::PoseStamped goal_pose = goal;
137+
goal_pose.header.stamp = node_->now();
138+
goal_pose.header.frame_id = global_frame_;
139+
global_path.poses.push_back(goal_pose);
137140

138141
return global_path;
139142
}

0 commit comments

Comments
 (0)