Skip to content
Snippets Groups Projects
Commit 87f01366 authored by Christoph Kochendoerfer's avatar Christoph Kochendoerfer
Browse files

added default initalization for variables

parent ffede64f
No related branches found
No related tags found
2 merge requests!14Trajectories,!13Extended vehicle and entity properties
...@@ -44,7 +44,7 @@ struct EntityProperties ...@@ -44,7 +44,7 @@ struct EntityProperties
BoundingBox bounding_box{Vec3d{}, Dimension3d{}}; BoundingBox bounding_box{Vec3d{}, Dimension3d{}};
EntityType type{EntityType::kOther}; EntityType type{EntityType::kOther};
std::string model{}; std::string model{};
std::map<std::string, std::string> properties; std::map<std::string, std::string> properties{};
}; };
inline bool operator==(const EntityProperties& lhs, const EntityProperties& rhs) noexcept inline bool operator==(const EntityProperties& lhs, const EntityProperties& rhs) noexcept
...@@ -119,11 +119,11 @@ enum class ExternalControlState ...@@ -119,11 +119,11 @@ enum class ExternalControlState
struct Performance struct Performance
{ {
// in m/s // in m/s
double max_speed; double max_speed{0.0};
// in m/s² // in m/s²
double max_acceleration; double max_acceleration{0.0};
// in m/s² // in m/s²
double max_deceleration; double max_deceleration{0.0};
}; };
inline bool operator==(const Performance& lhs, const Performance& rhs) noexcept inline bool operator==(const Performance& lhs, const Performance& rhs) noexcept
...@@ -136,13 +136,13 @@ inline bool operator==(const Performance& lhs, const Performance& rhs) noexcept ...@@ -136,13 +136,13 @@ inline bool operator==(const Performance& lhs, const Performance& rhs) noexcept
struct Axle struct Axle
{ {
// in radian // in radian
double max_steering; double max_steering{0.0};
// in m // in m
double wheel_diameter; double wheel_diameter{0.0};
// in m // in m
double track_width; double track_width{0.0};
// in m // in m
Vec3d bb_center_to_axle_center; Vec3d bb_center_to_axle_center{};
}; };
inline bool operator==(const Axle& lhs, const Axle& rhs) noexcept inline bool operator==(const Axle& lhs, const Axle& rhs) noexcept
...@@ -157,10 +157,10 @@ struct VehicleProperties : public EntityProperties ...@@ -157,10 +157,10 @@ struct VehicleProperties : public EntityProperties
{ {
VehicleClass classification{VehicleClass::kOther}; VehicleClass classification{VehicleClass::kOther};
Performance performance; Performance performance{};
Axle front_axle; Axle front_axle{};
Axle rear_axle; Axle rear_axle{};
bool is_host{false}; bool is_host{false};
// TODO: remove, once external control for traffic is implemented through controllers // TODO: remove, once external control for traffic is implemented through controllers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment