Class PerformAction

Nested Relationships

Nested Types

Class Documentation

class PerformAction

Public Types

using Location = rmf_traffic::agv::Plan::Goal
using DescriptionPtr = std::shared_ptr<Description>
using ConstDescriptionPtr = std::shared_ptr<const Description>
class Description : public rmf_task_sequence::Activity::Description

Public Functions

const std::string &category() const

Get the category.

Description &category(const std::string &new_category)

Set the category.

const nlohmann::json &description() const

Get the description.

Description &description(const nlohmann::json &new_description)

Set the description.

const rmf_traffic::Duration &action_duration_estimate() const

Get the action duration estimate.

Description &action_duration_estimate(rmf_traffic::Duration new_duration)

Set the action duration estimate.

bool use_tool_sink() const

Check whether to account for battery drain from tools.

Description &use_tool_sink(bool use_tool)

Set whether to account for battery drain from tools.

std::optional<Location> expected_finish_location() const

Get the expected finish location.

Description &expected_finish_location(std::optional<Location> new_location)

Set the expected finish location.

virtual Activity::ConstModelPtr make_model(State invariant_initial_state, const Parameters &parameters) const final

Generate a Model for this Activity based on its description, parameters, and the invariants of its initial state.

Parameters:
  • invariant_initial_state[in] A partial state that represents the state components which will definitely be true when this Activity begins.

  • parameters[in] The parameters for the robot.

Returns:

a model based on the given start state and parameters.

virtual Header generate_header(const rmf_task::State &initial_state, const Parameters &parameters) const final

Generate human-friendly header information for this Activity.

Parameters:
  • initial_state[in] The expected initial state when the activity begins

  • parameters[in] Parameters of the robot during the Activity

Public Static Functions

static DescriptionPtr make(const std::string &category, nlohmann::json description, rmf_traffic::Duration action_duration_estimate, bool use_tool_sink, std::optional<Location> expected_finish_location = std::nullopt)

Make a PerformAction description.

Parameters:
  • category[in] A category for this action

  • description[in] A json description of the action to perform

  • action_duration_estimate[in] An estimate for how long it will take for the action to complete

  • use_tool_sink[in] If true, battery drain from peripheral tools will be accounted for while performing the action

  • expected_finish_location[in] An optional location to indicate where the robot will end up after performing the action. Use nullopt to indicate that after performing the action, the robot will be at its initial location.