scenario_simulator_v2 C++ API
catalogs.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 TRAFFIC_SIMULATOR__TEST__CATALOGS_HPP_
16 #define TRAFFIC_SIMULATOR__TEST__CATALOGS_HPP_
17 
18 #include <string>
19 #include <traffic_simulator_msgs/msg/misc_object_parameters.hpp>
20 #include <traffic_simulator_msgs/msg/pedestrian_parameters.hpp>
21 #include <traffic_simulator_msgs/msg/vehicle_parameters.hpp>
22 
23 auto getVehicleParameters() -> traffic_simulator_msgs::msg::VehicleParameters
24 {
25  traffic_simulator_msgs::msg::VehicleParameters parameters;
26  parameters.name = "vehicle.volkswagen.t";
27  parameters.subtype.value = traffic_simulator_msgs::msg::EntitySubtype::CAR;
28  parameters.performance.max_speed = 69.444;
29  parameters.performance.max_acceleration = 200;
30  parameters.performance.max_deceleration = 10.0;
31  parameters.bounding_box.center.x = 1.5;
32  parameters.bounding_box.center.y = 0.0;
33  parameters.bounding_box.center.z = 0.9;
34  parameters.bounding_box.dimensions.x = 4.5;
35  parameters.bounding_box.dimensions.y = 2.1;
36  parameters.bounding_box.dimensions.z = 1.8;
37  parameters.axles.front_axle.max_steering = 0.5;
38  parameters.axles.front_axle.wheel_diameter = 0.6;
39  parameters.axles.front_axle.track_width = 1.8;
40  parameters.axles.front_axle.position_x = 3.1;
41  parameters.axles.front_axle.position_z = 0.3;
42  parameters.axles.rear_axle.max_steering = 0.0;
43  parameters.axles.rear_axle.wheel_diameter = 0.6;
44  parameters.axles.rear_axle.track_width = 1.8;
45  parameters.axles.rear_axle.position_x = 0.0;
46  parameters.axles.rear_axle.position_z = 0.3;
47  return parameters;
48 }
49 
50 auto getPedestrianParameters() -> traffic_simulator_msgs::msg::PedestrianParameters
51 {
52  traffic_simulator_msgs::msg::PedestrianParameters parameters;
53  parameters.name = "pedestrian";
54  parameters.subtype.value = traffic_simulator_msgs::msg::EntitySubtype::PEDESTRIAN;
55  parameters.bounding_box.center.x = 0.0;
56  parameters.bounding_box.center.y = 0.0;
57  parameters.bounding_box.center.z = 0.5;
58  parameters.bounding_box.dimensions.x = 1.0;
59  parameters.bounding_box.dimensions.y = 1.0;
60  parameters.bounding_box.dimensions.z = 2.0;
61  return parameters;
62 }
63 
64 auto getMiscObjectParameters() -> traffic_simulator_msgs::msg::MiscObjectParameters
65 {
66  traffic_simulator_msgs::msg::MiscObjectParameters misc_object_param;
67  misc_object_param.bounding_box.dimensions.x = 1.0;
68  misc_object_param.bounding_box.dimensions.y = 1.0;
69  misc_object_param.bounding_box.dimensions.z = 1.0;
70  misc_object_param.subtype.value = traffic_simulator_msgs::msg::EntitySubtype::UNKNOWN;
71  misc_object_param.name = "obstacle";
72  return misc_object_param;
73 }
74 
75 #endif // TRAFFIC_SIMULATOR__TEST__CATALOGS_HPP_
auto getMiscObjectParameters() -> traffic_simulator_msgs::msg::MiscObjectParameters
Definition: catalogs.hpp:65
auto getPedestrianParameters() -> traffic_simulator_msgs::msg::PedestrianParameters
Definition: catalogs.hpp:51
auto getVehicleParameters(const uint8_t subtype=traffic_simulator_msgs::msg::EntitySubtype::CAR) -> traffic_simulator_msgs::msg::VehicleParameters
Definition: catalogs.hpp:23