scenario_simulator_v2 C++ API
vehicle.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__VEHICLE_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__VEHICLE_HPP_
17 
25 #include <pugixml.hpp>
26 #include <traffic_simulator_msgs/msg/vehicle_parameters.hpp>
27 
29 {
30 inline namespace syntax
31 {
32 /* ---- Vehicle ----------------------------------------------------------------
33  *
34  * <xsd:complexType name="Vehicle">
35  * <xsd:all>
36  * <xsd:element name="ParameterDeclarations" type="ParameterDeclarations" minOccurs="0"/>
37  * <xsd:element name="BoundingBox" type="BoundingBox"/>
38  * <xsd:element name="Performance" type="Performance"/>
39  * <xsd:element name="Axles" type="Axles"/>
40  * <xsd:element name="Properties" type="Properties"/>
41  * </xsd:all>
42  * <xsd:attribute name="name" type="String" use="required"/>
43  * <xsd:attribute name="vehicleCategory" type="VehicleCategory" use="required"/>
44  * <xsd:attribute name="model3d" type="String"/>
45  * </xsd:complexType>
46  *
47  * -------------------------------------------------------------------------- */
48 struct Vehicle : public Scope // for ParameterDeclarations
49 {
50  const VehicleCategory vehicle_category; // Category of the vehicle (bicycle, train,...).
51 
52  const String
53  model3d; // Definition of the model of the vehicle as a model type or a relative or absolute file path.
54 
55  const ParameterDeclarations parameter_declarations; // Definition of additional parameters.
56 
57  const BoundingBox bounding_box; // The three dimensional bounding box that encloses the vehicle.
58 
59  const Performance performance; // Performance properties of the vehicle.
60 
61  const Axles axles; // A set of axles (front, rear, additional) and their geometric locations.
62 
63  Properties properties; // Additional properties as name value pairs.
64 
65  explicit Vehicle(const pugi::xml_node &, Scope &);
66 
67  explicit operator traffic_simulator_msgs::msg::VehicleParameters() const;
68 };
69 } // namespace syntax
70 } // namespace openscenario_interpreter
71 
72 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__VEHICLE_HPP_
Definition: scope.hpp:154
std::string String
Definition: string.hpp:24
Definition: escape_sequence.hpp:22
Definition: bounding_box.hpp:39
Definition: parameter_declarations.hpp:36
Definition: performance.hpp:39
Definition: vehicle_category.hpp:51
Properties properties
Definition: vehicle.hpp:63
const String model3d
Definition: vehicle.hpp:53
Vehicle(const pugi::xml_node &, Scope &)
Definition: vehicle.cpp:23
const Axles axles
Definition: vehicle.hpp:61
const BoundingBox bounding_box
Definition: vehicle.hpp:57
const ParameterDeclarations parameter_declarations
Definition: vehicle.hpp:55
const Performance performance
Definition: vehicle.hpp:59
const VehicleCategory vehicle_category
Definition: vehicle.hpp:50