Skip to content

Commit

Permalink
TaskPlanner constructor to have planner id as first argument
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Chong <[email protected]>
  • Loading branch information
aaronchongth committed Jun 14, 2023
1 parent bbb3689 commit a1d26aa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions rmf_task/include/rmf_task/TaskPlanner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,20 +200,20 @@ class TaskPlanner

/// Constructor
///
/// \param[in] planner_id
/// Identifier of this task planner, to be used for booking automated
/// requests.
///
/// \param[in] configuration
/// The configuration for the planner
/// The configuration for the planner.
///
/// \param[in] default_options
/// Default options for the task planner to use when solving for assignments.
/// These options can be overriden each time a plan is requested.
///
/// \param[in] task_planner_name
/// Identifier of this task planner, to be used for booking automated
/// requests.
TaskPlanner(
const std::string& planner_id,
Configuration configuration,
Options default_options,
const std::string& task_planner_name);
Options default_options);

/// Get a const reference to configuration of this task planner
const Configuration& configuration() const;
Expand Down
12 changes: 6 additions & 6 deletions rmf_task/src/rmf_task/TaskPlanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ class TaskPlanner::Implementation
Configuration config;
Options default_options;
ConstTravelEstimatorPtr travel_estimator;
std::string task_planner_name;
std::string planner_id;
bool check_priority = false;
ConstCostCalculatorPtr cost_calculator = nullptr;

Expand All @@ -385,7 +385,7 @@ class TaskPlanner::Implementation
{
return rmf_task::requests::ChargeBattery::make(
start_time,
task_planner_name,
planner_id,
time_now,
nullptr,
true);
Expand Down Expand Up @@ -643,7 +643,7 @@ class TaskPlanner::Implementation
config.parameters(),
request,
*travel_estimator,
task_planner_name,
planner_id,
error);

if (!pending_task)
Expand Down Expand Up @@ -1120,15 +1120,15 @@ TaskPlanner::TaskPlanner(

// ============================================================================
TaskPlanner::TaskPlanner(
const std::string& planner_id,
Configuration configuration,
Options default_options,
const std::string& task_planner_name)
Options default_options)
: _pimpl(rmf_utils::make_impl<Implementation>(
Implementation{
configuration,
default_options,
std::make_shared<TravelEstimator>(configuration.parameters()),
task_planner_name
planner_id
}))
{
// Do nothing
Expand Down

0 comments on commit a1d26aa

Please sign in to comment.