Skip to content

Commit

Permalink
refining output, fixing bug, lab tested
Browse files Browse the repository at this point in the history
  • Loading branch information
marinagmoreira committed Apr 27, 2024
1 parent c3371ee commit 2da97fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions astrobee/behaviors/inspection/src/inspection_node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ class InspectionNode : public ff_util::FreeFlyerNodelet {
}
ROS_DEBUG_STREAM("Motion failed result error: " << result->response);

err_msg_ = "Result code " + result->response;
err_msg_ = "Move Code" + std::to_string(result->response) + ": (" + result->fsm_result + ")";
return fsm_.Update(MOTION_FAILED);
}

Expand Down Expand Up @@ -451,7 +451,7 @@ class InspectionNode : public ff_util::FreeFlyerNodelet {
case ff_util::FreeFlyerActionState::SUCCESS:
return fsm_.Update(DOCK_SUCCESS);
default:
err_msg_ = "Result code " + result->response;
err_msg_ = "Dock Code " + std::to_string(result->response) + ": (" + result->fsm_result + ")";
return fsm_.Update(DOCK_FAILED);
}
}
Expand Down Expand Up @@ -608,6 +608,9 @@ class InspectionNode : public ff_util::FreeFlyerNodelet {
}
void SciCamTimeout(const ros::TimerEvent& event) {
sci_cam_timeout_.stop();
// If the action was cancelled stop taking more pictures
if (fsm_.GetState() == STATE::WAITING) return;

// The sci cam image was not received
if (sci_cam_req_ < cfg_.Get<int>("sci_cam_max_trials")) {
ROS_WARN_STREAM("Scicam didn't repond, resending it again");
Expand Down
2 changes: 1 addition & 1 deletion astrobee/behaviors/inspection/tools/inspection_tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ void ResultCallback(ff_util::FreeFlyerActionState::Enum code,
// Check that result var is valid
if (result != nullptr) {
// If we get there then we have some response data
s += result->fsm_result + " (Code " + std::to_string(result->response) + ")";
s += result->fsm_result + " (Inspection Code " + std::to_string(result->response) + ")";
}
// Limit line to the maximum amout of characters
if (s.size() < 71) s.append(71 - s.size(), ' ');
Expand Down

0 comments on commit 2da97fd

Please sign in to comment.