Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/plugins/ros2/navigator_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,6 @@ ROS2NavigatorThread::send_goal()

case rclcpp_action::ResultCode::ABORTED: {
nav_if_->set_final(true);
nav_if_->set_error_code(NavigatorInterface::ERROR_PATH_GEN_FAIL);
nav_if_->write();
std::stringstream ss;
for (std::size_t i = 0; i < 16; i++) {
if (i != 0) {
Expand All @@ -211,7 +209,12 @@ ROS2NavigatorThread::send_goal()
logger->log_warn(name(), ("Aborted goal with id: " + ss.str()).c_str());

auto val = result.result;
logger->log_error(name(), "Navigation Goal failed with error_code: %d", val->error_code);

uint32_t error_code = (uint32_t)val->error_code;

nav_if_->set_error_code(error_code);
nav_if_->write();
} break;

case rclcpp_action::ResultCode::CANCELED: {
Expand Down