Skip to content

Commit f5cd789

Browse files
Fix cancellation, feedback
Signed-off-by: Luca Della Vedova <[email protected]>
1 parent d9e80fe commit f5cd789

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

nexus_system_orchestrator/src/system_orchestrator.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ void SystemOrchestrator::_halt_job(const std::string& job_id)
860860
std::make_shared<endpoints::RemovePendingTaskService::ServiceType::Request>();
861861
req->task_id = task_id;
862862
const auto resp =
863-
this->_workcell_sessions.at(task_id)->remove_pending_task_client->
863+
this->_workcell_sessions.at(wc_id)->remove_pending_task_client->
864864
send_request(req);
865865
if (!resp->success)
866866
{

nexus_system_orchestrator/src/workcell_request.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ WorkcellRequest::make_goal()
105105
void WorkcellRequest::on_feedback(
106106
endpoints::WorkcellRequestAction::ActionType::Feedback::ConstSharedPtr msg)
107107
{
108-
this->_ctx->task_states.at(this->_task.id) = msg->state;
108+
// Will insert a new state if one was not created at work order creation time
109+
// i.e. for transportation requests that are done after task assignments
110+
this->_ctx->task_states[this->_task.id] = msg->state;
109111
this->_on_task_progress(this->_ctx->task_states);
110112
}
111113

0 commit comments

Comments
 (0)