scenario_simulator_v2 C++ API
position.hpp
Go to the documentation of this file.
1 // Copyright 2015 TIER IV, Inc. All rights reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef OPENSCENARIO_INTERPRETER__SYNTAX__POSITION_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__POSITION_HPP_
17 
23 #include <pugixml.hpp>
24 
26 {
27 inline namespace syntax
28 {
29 /*
30  Position (OpenSCENARIO XML 1.3)
31 
32  <xsd:complexType name="Position">
33  <xsd:choice>
34  <xsd:element name="WorldPosition" type="WorldPosition"/>
35  <xsd:element name="RelativeWorldPosition" type="RelativeWorldPosition"/>
36  <xsd:element name="RelativeObjectPosition" type="RelativeObjectPosition"/>
37  <xsd:element name="RoadPosition" type="RoadPosition"/>
38  <xsd:element name="RelativeRoadPosition" type="RelativeRoadPosition"/>
39  <xsd:element name="LanePosition" type="LanePosition"/>
40  <xsd:element name="RelativeLanePosition" type="RelativeLanePosition"/>
41  <xsd:element name="RoutePosition" type="RoutePosition"/>
42  <xsd:element name="GeoPosition" type="GeoPosition"/>
43  <xsd:element name="TrajectoryPosition" type="TrajectoryPosition"/>
44  </xsd:choice>
45  </xsd:complexType>
46 */
47 struct Position : public ComplexType
48 {
49  explicit Position(const pugi::xml_node &, Scope &);
50 
51  explicit operator geometry_msgs::msg::Pose() const;
52 
53  explicit operator NativeLanePosition() const;
54 };
55 
57  Position,
58  CASE(WorldPosition), //
61  // CASE(RoadPosition),
62  // CASE(RelativeRoadPosition),
64  // CASE(RelativeLanePosition),
65  // CASE(RoutePosition),
66  // CASE(GeoPosition),
67  // CASE(TrajectoryPosition),
68 );
69 
71  const Position,
72  CASE(WorldPosition), //
75  // CASE(RoadPosition),
76  // CASE(RelativeRoadPosition),
78  // CASE(RelativeLanePosition),
79  // CASE(RoutePosition),
80  // CASE(GeoPosition),
81  // CASE(TrajectoryPosition),
82 );
83 } // namespace syntax
84 } // namespace openscenario_interpreter
85 
86 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__POSITION_HPP_
Definition: scope.hpp:154
#define CASE(IDENTIFIER)
DEFINE_LAZY_VISITOR(Action, CASE(GlobalAction), CASE(UserDefinedAction), CASE(PrivateAction),)
Definition: escape_sequence.hpp:22
traffic_simulator::CanonicalizedLaneletPose NativeLanePosition
Definition: simulator_core.hpp:35
Definition: lane_position.hpp:44
Definition: position.hpp:48
Position(const pugi::xml_node &, Scope &)
Definition: position.cpp:23
Definition: relative_object_position.hpp:44
Definition: relative_world_position.hpp:44
Definition: world_position.hpp:43