Skip to content

Commit

Permalink
Remove debug output
Browse files Browse the repository at this point in the history
Signed-off-by: Michael X. Grey <mxgrey@intrinsic.ai>
  • Loading branch information
mxgrey committed Mar 11, 2024
1 parent efca418 commit bf87862
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 33 deletions.
23 changes: 0 additions & 23 deletions rmf_task_sequence/src/rmf_task_sequence/Task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -804,29 +804,18 @@ void Task::Active::_generate_pending_phases()
//==============================================================================
void Task::Active::_finish_phase(Phase::Tag::Id id)
{
std::cout << "Triggering finish for phase " << id
<< " of task [" << _task_id() << "]" << std::endl;
std::lock_guard<std::recursive_mutex> lock(_next_phase_mutex);
if (!_active_stage)
{
std::cerr << "[rmf_task_sequence::Task::Active::_finish_phase] "
<< "No active stage is present for task [" << _task_id()
<< "]." << std::endl;
return;
}

if (_active_stage->id != id)
{
std::cerr << "[rmf_task_sequence::Task::Active::_finish_phase] "
<< "Mismatch in phase ID of task [" << _task_id() << "]. Expected: " << id
<< ". Current: " << _active_stage->id << std::endl;
return;
}

std::cout << "Beginning next phase of task [" << _task_id() << "] after "
<< id << std::endl;
_completed_stages.push_back(_active_stage);
// _active_stage = nullptr;

const auto phase_finish_time = _clock();
const auto completed_phase = std::make_shared<Phase::Completed>(
Expand Down Expand Up @@ -870,18 +859,6 @@ void Task::Active::_begin_next_stage(std::optional<nlohmann::json> restore)
{
if (_pending_stages.empty())
{
std::stringstream ss;
ss << "Finishing task [" << _task_id() << "]";
if (_active_stage)
{
ss << " at stage " << _active_stage->id;
}
else
{
ss << " with no active stage";
}

std::cout << ss.str() << std::endl;
return _finish_task();
}

Expand Down
10 changes: 0 additions & 10 deletions rmf_task_sequence/src/rmf_task_sequence/events/Sequence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,25 +366,15 @@ void Sequence::Active::next()

BoolGuard lock(_inside_next);


rmf_task::VersionedString::Reader reader;
do
{
if (_reverse_remaining.empty())
{
Sequence::Standby::update_status(*_state);
std::cout << "Finishing sequence [" << *reader.read(_state->name())
<< "] at index "
<< _current_event_index_plus_one - 1
<< std::endl;
_sequence_finished();
return;
}

std::cout << "Beginning next activity in sequence ["
<< *reader.read(_state->name()) << "]. "
<< _reverse_remaining.size() << " activities remaining." << std::endl;

++_current_event_index_plus_one;
const auto next_event = _reverse_remaining.back();
_reverse_remaining.pop_back();
Expand Down

0 comments on commit bf87862

Please sign in to comment.