diff --git a/nexus_system_orchestrator/src/system_orchestrator.cpp b/nexus_system_orchestrator/src/system_orchestrator.cpp index a336a38..bb6a2d2 100644 --- a/nexus_system_orchestrator/src/system_orchestrator.cpp +++ b/nexus_system_orchestrator/src/system_orchestrator.cpp @@ -868,7 +868,7 @@ void SystemOrchestrator::_halt_job(const std::string& job_id) std::make_shared<endpoints::RemovePendingTaskService::ServiceType::Request>(); req->task_id = task_id; const auto resp = - this->_workcell_sessions.at(task_id)->remove_pending_task_client-> + this->_workcell_sessions.at(wc_id)->remove_pending_task_client-> send_request(req); if (!resp->success) { diff --git a/nexus_system_orchestrator/src/workcell_request.cpp b/nexus_system_orchestrator/src/workcell_request.cpp index 2a2b7f7..2921f2e 100644 --- a/nexus_system_orchestrator/src/workcell_request.cpp +++ b/nexus_system_orchestrator/src/workcell_request.cpp @@ -107,7 +107,9 @@ WorkcellRequest::make_goal() void WorkcellRequest::on_feedback( endpoints::WorkcellRequestAction::ActionType::Feedback::ConstSharedPtr msg) { - this->_ctx->task_states.at(this->_task.id) = msg->state; + // Will insert a new state if one was not created at work order creation time + // i.e. for transportation requests that are done after task assignments + this->_ctx->task_states[this->_task.id] = msg->state; this->_on_task_progress(this->_ctx->task_states); }