Skip to content

Commit

Permalink
Fix style
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 Apr 8, 2024
1 parent 11cc303 commit 8ef2f55
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -429,20 +429,20 @@ class RobotUpdateHandle
static Commission decommission();

/// Set whether this commission should accept dispatched tasks.
Commission& accept_dispatched_tasks(bool decision=true);
Commission& accept_dispatched_tasks(bool decision = true);

/// Check whether this commission is accepting dispatched tasks.
bool is_accepting_dispatched_tasks() const;

/// Set whether this commission should accept direct tasks
Commission& accept_direct_tasks(bool decision=true);
Commission& accept_direct_tasks(bool decision = true);

/// Check whether this commission is accepting direct tasks.
bool is_accepting_direct_tasks() const;

/// Set whether this commission should perform idle behaviors (formerly
/// referred to as "finishing tasks").
Commission& perform_idle_behavior(bool decision=true);
Commission& perform_idle_behavior(bool decision = true);

/// Check whether this commission is performing idle behaviors (formerly
/// referred to as "finishing tasks").
Expand Down
2 changes: 1 addition & 1 deletion rmf_fleet_adapter/src/rmf_fleet_adapter/TaskManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2515,7 +2515,7 @@ void TaskManager::_handle_commission_request(

static const auto response_validator =
std::make_shared<nlohmann::json_schema::json_validator>(
_make_validator(rmf_api_msgs::schemas::robot_commission_response));
_make_validator(rmf_api_msgs::schemas::robot_commission_response));

if (!_validate_request_message(request_json, request_validator, request_id))
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ class AllocateTasks : public std::enable_shared_from_this<AllocateTasks>
}

TaskAssignments assignments;
for (std::size_t i=0; i < assignments_ptr->size(); ++i)
for (std::size_t i = 0; i < assignments_ptr->size(); ++i)
{
const auto r_it = robot_indexes.find(i);
if (r_it == robot_indexes.end())
Expand Down Expand Up @@ -789,8 +789,8 @@ void FleetUpdateHandle::Implementation::dispatch_command_cb(
r_it, self->_pimpl->unassigned_requests.end());

std::string error_str =
"Unable to replan assignments when accommodating task_id ["
+ request->booking()->id() + "]. Reasons:";
"Unable to replan assignments when accommodating task_id ["
+ request->booking()->id() + "]. Reasons:";
if (errors.empty())
{
error_str += " No reason given by planner.";
Expand Down Expand Up @@ -875,7 +875,7 @@ void FleetUpdateHandle::Implementation::dispatch_command_cb(
{
std::stringstream ss;
ss << "Unabled to replan assignments when cancelling task ["
<< task_id << "] for fleet [" << name << "]. ";
<< task_id << "] for fleet [" << name << "]. ";
if (errors.empty())
{
ss << "No planner error messages were provided.";
Expand Down Expand Up @@ -1002,10 +1002,10 @@ void FleetUpdateHandle::Implementation::reassign_dispatched_tasks(
}

auto on_plan_received = [
on_success,
on_failure,
w = weak_self,
initial_last_bid_assignment = last_bid_assignment
on_success,
on_failure,
w = weak_self,
initial_last_bid_assignment = last_bid_assignment
](TaskAssignments assignments)
{
const auto self = w.lock();
Expand Down Expand Up @@ -1077,7 +1077,7 @@ void FleetUpdateHandle::Implementation::reassign_dispatched_tasks(
std::vector<std::string> errors;
const auto replan_results = AllocateTasks(
nullptr, expectations, task_planner, node)
.run(errors);
.run(errors);

if (replan_results.has_value())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ class RobotUpdateHandle::Commission::Implementation

//==============================================================================
RobotUpdateHandle::Commission::Commission()
: _pimpl(rmf_utils::make_impl<Implementation>())
: _pimpl(rmf_utils::make_impl<Implementation>())
{
// Do nothing
}
Expand Down Expand Up @@ -809,7 +809,7 @@ void RobotUpdateHandle::reassign_dispatched_tasks()
{
const auto mgr = context->task_manager();
if (mgr)
mgr->reassign_dispatched_requests([](){}, [](auto){});
mgr->reassign_dispatched_requests([]() {}, [](auto) {});
});
}
}
Expand Down

0 comments on commit 8ef2f55

Please sign in to comment.