scenario_simulator_v2 C++ API
misc_object.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__MISC_OBJECT_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__MISC_OBJECT_HPP_
17 
26 #include <pugixml.hpp>
27 #include <traffic_simulator_msgs/msg/misc_object_parameters.hpp>
28 
30 {
31 inline namespace syntax
32 {
33 /* ---- MiscObject 1.1 ---------------------------------------------------------
34  *
35  * <xsd:complexType name="MiscObject">
36  * <xsd:all>
37  * <xsd:element name="ParameterDeclarations" type="ParameterDeclarations" minOccurs="0"/>
38  * <xsd:element name="BoundingBox" type="BoundingBox"/>
39  * <xsd:element name="Properties" type="Properties"/>
40  * </xsd:all>
41  * <xsd:attribute name="mass" type="Double" use="required"/>
42  * <xsd:attribute name="miscObjectCategory" type="MiscObjectCategory" use="required"/>
43  * <xsd:attribute name="name" type="String" use="required"/>
44  * <xsd:attribute name="model3d" type="String"/>
45  * </xsd:complexType>
46  *
47  * -------------------------------------------------------------------------- */
48 struct MiscObject : public Scope
49 {
51 
52  const Double mass; // Mass of the miscellaneous object. Unit: Kg; Range: [0..inf[.
53 
54  const MiscObjectCategory misc_object_category; // Categorization of the miscellaneous object.
55 
56  const String
57  model3d; // Definition of the model of the miscellaneous object as a model type or a relative or absolute file path.
58 
59  const ParameterDeclarations parameter_declarations; // Definition of additional parameters.
60 
61  const BoundingBox bounding_box; // Bounding box definition for the miscellaneous object.
62 
63  Properties properties; // Property definitions for the miscellaneous object.
64 
65  explicit MiscObject(const pugi::xml_node &, Scope &);
66 
67  explicit operator traffic_simulator_msgs::msg::MiscObjectParameters() const;
68 };
69 } // namespace syntax
70 } // namespace openscenario_interpreter
71 
72 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__MISC_OBJECT_HPP_
Definition: scope.hpp:154
std::string String
Definition: string.hpp:24
Definition: hypot.hpp:22
Definition: bounding_box.hpp:39
Definition: misc_object_category.hpp:63
Definition: misc_object.hpp:49
const String model3d
Definition: misc_object.hpp:57
static constexpr ObjectType object_type
Definition: misc_object.hpp:50
MiscObject(const pugi::xml_node &, Scope &)
Definition: misc_object.cpp:23
const MiscObjectCategory misc_object_category
Definition: misc_object.hpp:54
const BoundingBox bounding_box
Definition: misc_object.hpp:61
const Double mass
Definition: misc_object.hpp:52
const ParameterDeclarations parameter_declarations
Definition: misc_object.hpp:59
Properties properties
Definition: misc_object.hpp:63
Definition: object_type.hpp:44
@ miscellaneous
Definition: object_type.hpp:49
Definition: parameter_declarations.hpp:36