-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlane_direction.h
35 lines (25 loc) · 1.03 KB
/
lane_direction.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#pragma once
#include <memory>
#include "drake/automotive/maliput/api/lane.h"
namespace drake {
namespace automotive {
/// LaneDirection holds the lane that a MaliputRailcar is traversing and the
/// direction in which it is moving. A MaliputRailcar can either travel in the
/// increasing-`s` direction or in the decreasing-`s` direction.
struct LaneDirection {
DRAKE_DEFAULT_COPY_AND_MOVE_AND_ASSIGN(LaneDirection)
/// Default constructor.
LaneDirection() {}
/// A constructor that sets `with_s` to be `true`.
explicit LaneDirection(const maliput::api::Lane* lane_input)
: LaneDirection(lane_input, true) {}
/// Fully parameterized constructor.
LaneDirection(const maliput::api::Lane* lane_input, bool with_s_input)
: lane(lane_input), with_s(with_s_input) {}
const maliput::api::Lane* lane{nullptr};
/// True means that the MaliputRailcar's `s` coordinate increases when the
/// vehicle has positive speed. False means the opposite.
bool with_s{true};
};
} // namespace automotive
} // namespace drake