From 25b8fe198b4a41ad2dd3fb485e49476815fb543f Mon Sep 17 00:00:00 2001 From: ubsyj Date: Tue, 30 Jan 2024 17:54:03 +0100 Subject: [PATCH] Set start value for diff_joint_positions, imu_angle, robot_pose, robot_vel in odometry.hpp --- turtlebot3_node/include/turtlebot3_node/odometry.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/turtlebot3_node/include/turtlebot3_node/odometry.hpp b/turtlebot3_node/include/turtlebot3_node/odometry.hpp index 7f355ab4..65cc2b3b 100644 --- a/turtlebot3_node/include/turtlebot3_node/odometry.hpp +++ b/turtlebot3_node/include/turtlebot3_node/odometry.hpp @@ -88,11 +88,11 @@ class Odometry bool use_imu_; bool publish_tf_; - std::array diff_joint_positions_; - double imu_angle_; + std::array diff_joint_positions_ = {0.0, 0.0}; + double imu_angle_ = 0.0; - std::array robot_pose_; - std::array robot_vel_; + std::array robot_pose_ = {0.0, 0.0, 0.0}; + std::array robot_vel_ = {0.0, 0.0, 0.0}; }; } // namespace turtlebot3 } // namespace robotis