Publish generated path to use for visualisation

This commit is contained in:
2025-04-18 22:04:04 +02:00
parent ec831bd334
commit aeaf36fc2b
6 changed files with 12 additions and 2 deletions

View File

@ -109,6 +109,7 @@ namespace mg {
rclcpp::Rate rate(UPDATE_RATE);
while (target_check() && rclcpp::ok()) {
target_update();
if (hgoal->is_canceling()) {
cancel();
return;

View File

@ -22,7 +22,7 @@ namespace mg {
template <>
inline void DWA<MgNavigationServer::MoveGlobal>::target_update() {
baseNode.path_buffer()->update_path(goal);
baseNode.path_buffer()->update_path();
target_pos = baseNode.path_buffer()->get_next(pos, LOOKAHEAD);
}

View File

@ -47,6 +47,7 @@ namespace mg {
resp_ = client_->async_send_request(req).share();
}
if (resp_.valid()) {
path_msg_ = resp_.get();
auto req = std::make_shared<PathService::Request>();
req->x = goal_->x;
@ -68,6 +69,7 @@ namespace mg {
resp_ = client_->async_send_request(req).share();
}
resp_.wait();
path_msg_ = resp_.get();
auto req = std::make_shared<PathService::Request>();
req->x = goal_->x;