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