Class GoToPlace

Nested Relationships

Nested Types

Class Documentation

class GoToPlace

Public Types

using Goal = 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::vector<Goal> &one_of() const

Get the possible destinations for this description.

const Goal &destination() const

Get the current goal for this description.

Description &destination(Goal new_goal)

Set a single goal for this description.

std::string destination_name(const rmf_task::Parameters &parameters) const

Get the name of the goal. If the goal does not have an explicit name, it will be referred to as “#x” where “x” is the index number of the waypoint.

If there are multiple goal options, this will be a |-separated list of destinations.

const std::vector<Goal> &expected_next_destinations() const

Get the expected future destinations that may come after this one.

Description &expected_next_destinations(std::vector<Goal> value)

Set the expected future destinations that may come after this one. This GoToPlace event will be completed when it arrives at its specified primary destination, regardless of these expected next destinations.

The expected next destinations will only be used by the traffic system to help optimize traffic throughput. When this is left empty, the traffic system might perform poorly if the robot does not have exclusive rights to be at its destination.

bool prefer_same_map() const

Check whether a destination on the same map as the robot’s initial location should always be preferred over any other destinations. If there is no destination on the same map then closest will be chosen.

Description &prefer_same_map(bool choice)

Specify whether or not a destination on the same map as the robot’s initial location should always be preferred over any other destinations.

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 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(Goal goal)

Make a GoToPlace description using a goal.

static DescriptionPtr make_for_one_of(std::vector<Goal> goal)

Make a GoToPlace description using a goal. This constructor will pick the nearest unoccupied goal and head for said goal.