diff --git a/release-notes.md b/release-notes.md index bd01a9c..419322d 100644 --- a/release-notes.md +++ b/release-notes.md @@ -1,5 +1,4 @@ -- [feat]修改断线重连检测稳定性 -- [feat]改用docker发布模式 +- [fix]修复IMU赋值错误问题 版本说明: - alpha:内部测试版本(不建议使用) diff --git a/src/fishbot.cpp b/src/fishbot.cpp index bf31307..f89bea2 100644 --- a/src/fishbot.cpp +++ b/src/fishbot.cpp @@ -524,8 +524,8 @@ void callback_sensor_publisher_timer_(rcl_timer_t *timer, int64_t last_call_time imu_msg.header.stamp.nanosec = static_cast((stamp % 1000) * 1e6); // 纳秒部分 imu_msg.angular_velocity.x = imu_data.angular_velocity.x; - imu_msg.angular_velocity.x = imu_data.angular_velocity.x; - imu_msg.angular_velocity.x = imu_data.angular_velocity.x; + imu_msg.angular_velocity.y = imu_data.angular_velocity.y; + imu_msg.angular_velocity.z = imu_data.angular_velocity.z; imu_msg.linear_acceleration.x = imu_data.linear_acceleration.x; imu_msg.linear_acceleration.y = imu_data.linear_acceleration.y;