2424
2525#include < chrono>
2626#include < functional>
27+ #include < memory>
2728#include < mutex>
2829#include < string>
2930#include < sstream>
31+ #include < utility>
3032#include < vector>
3133
3234#include < gz/common/SignalHandler.hh>
@@ -121,7 +123,7 @@ class Control
121123 public: std::string cmdTopic;
122124
123125 // / \brief The joint being controlled
124- public: gz::sim::Entity joint;
126+ public: gz::sim::Entity joint{gz::sim:: kNullEntity } ;
125127
126128 // / \brief A multiplier to scale the raw input command
127129 public: double multiplier = 1.0 ;
@@ -231,7 +233,7 @@ class gz::sim::systems::ArduPilotPluginPrivate
231233 public: uint16_t fdm_port_in{9002 };
232234
233235 // / \brief The port for the SITL flight controller - auto detected
234- public: uint16_t fcu_port_out;
236+ public: uint16_t fcu_port_out{ 0 } ;
235237
236238 // / \brief The name of the IMU sensor
237239 public: std::string imuName;
@@ -343,7 +345,7 @@ class gz::sim::systems::ArduPilotPluginPrivate
343345
344346 // / \brief Max number of consecutive missed ArduPilot controller
345347 // / messages before timeout
346- public: int connectionTimeoutMaxCount;
348+ public: int connectionTimeoutMaxCount{} ;
347349
348350 // / \brief Transform from model orientation to x-forward and z-up
349351 public: gz::math::Pose3d modelXYZToAirplaneXForwardZDown;
@@ -352,7 +354,7 @@ class gz::sim::systems::ArduPilotPluginPrivate
352354 public: gz::math::Pose3d gazeboXYZToNED;
353355
354356 // / \brief Last received frame rate from the ArduPilot controller
355- public: uint16_t fcu_frame_rate;
357+ public: uint16_t fcu_frame_rate{} ;
356358
357359 // / \brief Last received frame count from the ArduPilot controller
358360 public: uint32_t fcu_frame_count = UINT32_MAX ;
@@ -1461,9 +1463,9 @@ bool gz::sim::systems::ArduPilotPlugin::ReceiveServoPacket()
14611463 }
14621464
14631465 // 16 / 32 channel compatibility
1464- uint16_t pkt_magic{0 };
1465- uint16_t pkt_frame_rate{0 };
1466- uint32_t pkt_frame_count{0 };
1466+ uint16_t pkt_magic{};
1467+ uint16_t pkt_frame_rate{};
1468+ uint32_t pkt_frame_count{};
14671469 std::array<uint16_t , 32 > pkt_pwm{};
14681470 ssize_t recvSize{-1 };
14691471 if (this ->dataPtr ->have32Channels )
0 commit comments