Branch data Line data Source code
1 : : /* 2 : : * ----------------- BEGIN LICENSE BLOCK --------------------------------- 3 : : * 4 : : * Copyright (C) 2018-2022 Intel Corporation 5 : : * 6 : : * SPDX-License-Identifier: LGPL-2.1-only 7 : : * 8 : : * ----------------- END LICENSE BLOCK ----------------------------------- 9 : : */ 10 : : 11 : : /** 12 : : * Generated file 13 : : * @file 14 : : * 15 : : * Generator Version : 11.0.0-2046 16 : : */ 17 : : 18 : : #pragma once 19 : : 20 : : #include <cstdint> 21 : : #include <iostream> 22 : : #include <limits> 23 : : #include <memory> 24 : : #include <sstream> 25 : : #include "ad/physics/Angle.hpp" 26 : : #include "ad/physics/AngularAcceleration.hpp" 27 : : #include "ad/physics/Distance.hpp" 28 : : #include "ad/physics/Duration.hpp" 29 : : /*! 30 : : * @brief namespace ad 31 : : */ 32 : : namespace ad { 33 : : /*! 34 : : * @brief namespace rss 35 : : */ 36 : : namespace rss { 37 : : /*! 38 : : * @brief namespace world 39 : : */ 40 : : namespace world { 41 : : 42 : : /*! 43 : : * \brief DataType UnstructuredSettings 44 : : * 45 : : * Parameter settings to be used for unstructured constellation handling. 46 : : */ 47 : : struct UnstructuredSettings 48 : : { 49 : : /*! 50 : : * \brief Smart pointer on UnstructuredSettings 51 : : */ 52 : : typedef std::shared_ptr<UnstructuredSettings> Ptr; 53 : : 54 : : /*! 55 : : * \brief Smart pointer on constant UnstructuredSettings 56 : : */ 57 : : typedef std::shared_ptr<UnstructuredSettings const> ConstPtr; 58 : : 59 : : /*! 60 : : * \brief standard constructor 61 : : */ 62 : 25717 : UnstructuredSettings() = default; 63 : : 64 : : /*! 65 : : * \brief standard destructor 66 : : */ 67 : : ~UnstructuredSettings() = default; 68 : : 69 : : /*! 70 : : * \brief standard copy constructor 71 : : */ 72 : : UnstructuredSettings(const UnstructuredSettings &other) = default; 73 : : 74 : : /*! 75 : : * \brief standard move constructor 76 : : */ 77 : : UnstructuredSettings(UnstructuredSettings &&other) = default; 78 : : 79 : : /** 80 : : * \brief standard assignment operator 81 : : * 82 : : * \param[in] other Other UnstructuredSettings 83 : : * 84 : : * \returns Reference to this UnstructuredSettings. 85 : : */ 86 : : UnstructuredSettings &operator=(const UnstructuredSettings &other) = default; 87 : : 88 : : /** 89 : : * \brief standard move operator 90 : : * 91 : : * \param[in] other Other UnstructuredSettings 92 : : * 93 : : * \returns Reference to this UnstructuredSettings. 94 : : */ 95 : : UnstructuredSettings &operator=(UnstructuredSettings &&other) = default; 96 : : 97 : : /** 98 : : * \brief standard comparison operator 99 : : * 100 : : * \param[in] other Other UnstructuredSettings 101 : : * 102 : : * \returns \c true if both UnstructuredSettings are equal 103 : : */ 104 : 152 : bool operator==(const UnstructuredSettings &other) const 105 : : { 106 : 152 : return (pedestrian_turning_radius == other.pedestrian_turning_radius) 107 [ + + ]: 148 : && (drive_away_max_angle == other.drive_away_max_angle) 108 [ + + + + ]: 146 : && (vehicle_yaw_rate_change == other.vehicle_yaw_rate_change) && (vehicle_min_radius == other.vehicle_min_radius) 109 [ + + ]: 142 : && (vehicle_trajectory_calculation_step == other.vehicle_trajectory_calculation_step) 110 : 140 : && (vehicle_front_intermediate_yaw_rate_change_ratio_steps 111 [ + + ]: 140 : == other.vehicle_front_intermediate_yaw_rate_change_ratio_steps) 112 : 138 : && (vehicle_back_intermediate_yaw_rate_change_ratio_steps 113 [ + + ]: 138 : == other.vehicle_back_intermediate_yaw_rate_change_ratio_steps) 114 [ + + ]: 136 : && (vehicle_brake_intermediate_acceleration_steps == other.vehicle_brake_intermediate_acceleration_steps) 115 : 134 : && (vehicle_continue_forward_intermediate_acceleration_steps 116 [ + + ]: 134 : == other.vehicle_continue_forward_intermediate_acceleration_steps) 117 : 132 : && (vehicle_continue_forward_intermediate_yaw_rate_change_ratio_steps 118 [ + + ]: 132 : == other.vehicle_continue_forward_intermediate_yaw_rate_change_ratio_steps) 119 : 130 : && (pedestrian_continue_forward_intermediate_heading_change_ratio_steps 120 [ + + ]: 130 : == other.pedestrian_continue_forward_intermediate_heading_change_ratio_steps) 121 : 128 : && (pedestrian_continue_forward_intermediate_acceleration_steps 122 [ + + ]: 128 : == other.pedestrian_continue_forward_intermediate_acceleration_steps) 123 [ + + ]: 126 : && (pedestrian_brake_intermediate_acceleration_steps == other.pedestrian_brake_intermediate_acceleration_steps) 124 : 124 : && (pedestrian_front_intermediate_heading_change_ratio_steps 125 [ + + ]: 124 : == other.pedestrian_front_intermediate_heading_change_ratio_steps) 126 [ + + ]: 300 : && (pedestrian_back_intermediate_heading_change_ratio_steps 127 [ + + ]: 274 : == other.pedestrian_back_intermediate_heading_change_ratio_steps); 128 : : } 129 : : 130 : : /** 131 : : * \brief standard comparison operator 132 : : * 133 : : * \param[in] other Other UnstructuredSettings. 134 : : * 135 : : * \returns \c true if both UnstructuredSettings are different 136 : : */ 137 : 16 : bool operator!=(const UnstructuredSettings &other) const 138 : : { 139 : 16 : return !operator==(other); 140 : : } 141 : : 142 : : /*! 143 : : * The change of heading |h'(t)| is limited. 144 : : * That means, the maximum trajectory is defined by a circle until response time. 145 : : * This parameter specifies the radius of that circle. 146 : : */ 147 : : ::ad::physics::Distance pedestrian_turning_radius; 148 : : 149 : : /*! 150 : : * In certain constellations the ego vehicle might be allowed to drive away from a 151 : : * dangerous object using a given heading range. 152 : : * This parameter defines the maximum possible angle the vehicle is able to drive away. 153 : : */ 154 : : ::ad::physics::Angle drive_away_max_angle; 155 : : 156 : : /*! 157 : : * The change of the heading h'(t) is limited while the response time. 158 : : * This specifies the maximum change of the yaw rate during response time. 159 : : */ 160 : : ::ad::physics::AngularAcceleration vehicle_yaw_rate_change; 161 : : 162 : : /*! 163 : : * Defines the minimal radius a vehicle is able to drive on. 164 : : */ 165 : : ::ad::physics::Distance vehicle_min_radius; 166 : : 167 : : /*! 168 : : * The current unstructured implementation calculates the location and heading based 169 : : * on time increments. 170 : : * That might lead to an increasing error the farer the point is. 171 : : * This parameter defines the time interval for this incremental calculation. 172 : : */ 173 : : ::ad::physics::Duration vehicle_trajectory_calculation_step; 174 : : 175 : : /*! 176 : : * During calculation of the trajectory set, multiple yaw rate ratios are used. The default is max left, max right and 177 : : * no yaw rate change. By specifying a value larger than zero more intermediate steps are used. The value is 178 : : * specifying the steps on one side, therefore the resulting intermedate steps are twice this value. This value is 179 : : * used for the front of the trajectory set. 180 : : */ 181 : : uint32_t vehicle_front_intermediate_yaw_rate_change_ratio_steps{0}; 182 : : 183 : : /*! 184 : : * During calculation of the trajectory set, multiple yaw rate ratios are used. The default is max left, max right and 185 : : * no yaw rate change. By specifying a value larger than zero more intermediate steps are used. The value is 186 : : * specifying the steps on one side, therefore the resulting intermedate steps are twice this value. This value is 187 : : * used for the back of the trajectory set. 188 : : */ 189 : : uint32_t vehicle_back_intermediate_yaw_rate_change_ratio_steps{0}; 190 : : 191 : : /*! 192 : : * Specifies the intermediate acceleration steps (between brake_max and brake_min) used while calculating the cbrake 193 : : * trajectory set. 194 : : */ 195 : : uint32_t vehicle_brake_intermediate_acceleration_steps{0}; 196 : : 197 : : /*! 198 : : * Specifies the intermediate acceleration steps (between brake_min and accel_max) used while calculating the continue 199 : : * forward trajectory set. 200 : : */ 201 : : uint32_t vehicle_continue_forward_intermediate_acceleration_steps{0}; 202 : : 203 : : /*! 204 : : * Specifies the intermediate yaw rate change ratio steps used while calculating the continue forward trajectory set. 205 : : */ 206 : : uint32_t vehicle_continue_forward_intermediate_yaw_rate_change_ratio_steps{0}; 207 : : 208 : : /*! 209 : : * Specifies the intermediate heading change ratio steps used while calculating the continue forward trajectory set. 210 : : */ 211 : : uint32_t pedestrian_continue_forward_intermediate_heading_change_ratio_steps{0}; 212 : : 213 : : /*! 214 : : * Specifies the intermediate steps used while calculating the continue forward trajectory set. 215 : : */ 216 : : uint32_t pedestrian_continue_forward_intermediate_acceleration_steps{0}; 217 : : 218 : : /*! 219 : : * Specifies the intermediate steps used while calculating the brake trajectory set. 220 : : */ 221 : : uint32_t pedestrian_brake_intermediate_acceleration_steps{0}; 222 : : 223 : : /*! 224 : : * During calculation of the trajectory set, multiple heading change ratios are used. The default is max left, max 225 : : * right and no heading change. By specifying a value larger than zero more intermediate steps are used. The value is 226 : : * specifying the steps on one side, therefore the resulting intermedate steps are twice this value. This value is 227 : : * used for the front of the trajectory set. 228 : : */ 229 : : uint32_t pedestrian_front_intermediate_heading_change_ratio_steps{0}; 230 : : 231 : : /*! 232 : : * During calculation of the trajectory set, multiple heading change ratios are used. The default is max left, max 233 : : * right and no yaw rate change. By specifying a value larger than zero more intermediate steps are used. The value is 234 : : * specifying the steps on one side, therefore the resulting intermedate steps are twice this value. This value is 235 : : * used for the back of the trajectory set. 236 : : */ 237 : : uint32_t pedestrian_back_intermediate_heading_change_ratio_steps{0}; 238 : : }; 239 : : 240 : : } // namespace world 241 : : } // namespace rss 242 : : } // namespace ad 243 : : 244 : : /*! 245 : : * \brief protect the definition of functions from duplicates by typedef usage within other data types 246 : : */ 247 : : #ifndef GEN_GUARD_AD_RSS_WORLD_UNSTRUCTUREDSETTINGS 248 : : #define GEN_GUARD_AD_RSS_WORLD_UNSTRUCTUREDSETTINGS 249 : : /*! 250 : : * @brief namespace ad 251 : : */ 252 : : namespace ad { 253 : : /*! 254 : : * @brief namespace rss 255 : : */ 256 : : namespace rss { 257 : : /*! 258 : : * @brief namespace world 259 : : */ 260 : : namespace world { 261 : : 262 : : /** 263 : : * \brief standard ostream operator 264 : : * 265 : : * \param[in] os The output stream to write to 266 : : * \param[in] _value UnstructuredSettings value 267 : : * 268 : : * \returns The stream object. 269 : : * 270 : : */ 271 : 28 : inline std::ostream &operator<<(std::ostream &os, UnstructuredSettings const &_value) 272 : : { 273 : 28 : os << "UnstructuredSettings("; 274 : 28 : os << "pedestrian_turning_radius:"; 275 : 28 : os << _value.pedestrian_turning_radius; 276 : 28 : os << ","; 277 : 28 : os << "drive_away_max_angle:"; 278 : 28 : os << _value.drive_away_max_angle; 279 : 28 : os << ","; 280 : 28 : os << "vehicle_yaw_rate_change:"; 281 : 28 : os << _value.vehicle_yaw_rate_change; 282 : 28 : os << ","; 283 : 28 : os << "vehicle_min_radius:"; 284 : 28 : os << _value.vehicle_min_radius; 285 : 28 : os << ","; 286 : 28 : os << "vehicle_trajectory_calculation_step:"; 287 : 28 : os << _value.vehicle_trajectory_calculation_step; 288 : 28 : os << ","; 289 : 28 : os << "vehicle_front_intermediate_yaw_rate_change_ratio_steps:"; 290 : 28 : os << _value.vehicle_front_intermediate_yaw_rate_change_ratio_steps; 291 : 28 : os << ","; 292 : 28 : os << "vehicle_back_intermediate_yaw_rate_change_ratio_steps:"; 293 : 28 : os << _value.vehicle_back_intermediate_yaw_rate_change_ratio_steps; 294 : 28 : os << ","; 295 : 28 : os << "vehicle_brake_intermediate_acceleration_steps:"; 296 : 28 : os << _value.vehicle_brake_intermediate_acceleration_steps; 297 : 28 : os << ","; 298 : 28 : os << "vehicle_continue_forward_intermediate_acceleration_steps:"; 299 : 28 : os << _value.vehicle_continue_forward_intermediate_acceleration_steps; 300 : 28 : os << ","; 301 : 28 : os << "vehicle_continue_forward_intermediate_yaw_rate_change_ratio_steps:"; 302 : 28 : os << _value.vehicle_continue_forward_intermediate_yaw_rate_change_ratio_steps; 303 : 28 : os << ","; 304 : 28 : os << "pedestrian_continue_forward_intermediate_heading_change_ratio_steps:"; 305 : 28 : os << _value.pedestrian_continue_forward_intermediate_heading_change_ratio_steps; 306 : 28 : os << ","; 307 : 28 : os << "pedestrian_continue_forward_intermediate_acceleration_steps:"; 308 : 28 : os << _value.pedestrian_continue_forward_intermediate_acceleration_steps; 309 : 28 : os << ","; 310 : 28 : os << "pedestrian_brake_intermediate_acceleration_steps:"; 311 : 28 : os << _value.pedestrian_brake_intermediate_acceleration_steps; 312 : 28 : os << ","; 313 : 28 : os << "pedestrian_front_intermediate_heading_change_ratio_steps:"; 314 : 28 : os << _value.pedestrian_front_intermediate_heading_change_ratio_steps; 315 : 28 : os << ","; 316 : 28 : os << "pedestrian_back_intermediate_heading_change_ratio_steps:"; 317 : 28 : os << _value.pedestrian_back_intermediate_heading_change_ratio_steps; 318 : 28 : os << ")"; 319 : 28 : return os; 320 : : } 321 : : 322 : : } // namespace world 323 : : } // namespace rss 324 : : } // namespace ad 325 : : 326 : : namespace std { 327 : : /*! 328 : : * \brief overload of the std::to_string for UnstructuredSettings 329 : : */ 330 : 1 : inline std::string to_string(::ad::rss::world::UnstructuredSettings const &value) 331 : : { 332 [ + - ]: 1 : stringstream sstream; 333 [ + - ]: 1 : sstream << value; 334 [ + - ]: 2 : return sstream.str(); 335 : 1 : } 336 : : } // namespace std 337 : : 338 : : /*! 339 : : * \brief overload of fmt::formatter calling std::to_string 340 : : */ 341 : : template <> struct fmt::formatter<::ad::rss::world::UnstructuredSettings> : formatter<string_view> 342 : : { 343 : 0 : template <typename FormatContext> auto format(::ad::rss::world::UnstructuredSettings const &value, FormatContext &ctx) 344 : : { 345 : 0 : return formatter<string_view>::format(std::to_string(value), ctx); 346 : : } 347 : : }; 348 : : 349 : : #endif // GEN_GUARD_AD_RSS_WORLD_UNSTRUCTUREDSETTINGS