Class Graph::OrientationConstraint

Nested Relationships

This class is a nested type of Class Graph.

Class Documentation

class OrientationConstraint

A class that implicitly specifies a constraint on the robot’s orientation.

Public Types

enum class Direction

Values:

enumerator Forward
enumerator Backward

Public Functions

virtual bool apply(Eigen::Vector3d &position, const Eigen::Vector2d &course_vector) const = 0

Apply the constraint to the given homogeneous position.

Parameters:
  • position[inout] The position which needs to be constrained. The function should modify this position such that it satisfies the constraint, if possible.

  • course_vector[in] The direction that the robot is travelling in. Given for informational purposes.

Returns:

True if the constraint is satisfied with the new value of position. False if the constraint could not be satisfied.

virtual rmf_utils::clone_ptr<OrientationConstraint> clone() const = 0

Clone this OrientationConstraint.

virtual ~OrientationConstraint() = default

Public Static Functions

static rmf_utils::clone_ptr<OrientationConstraint> make(std::vector<double> acceptable_orientations)

Make an orientation constraint that requires a specific value for the orientation.

static rmf_utils::clone_ptr<OrientationConstraint> make(Direction direction, const Eigen::Vector2d &forward_vector)

Make an orientation constraint that requires the vehicle to face forward or backward.