-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix imu topic frame_id with came_name ns #2680
fix imu topic frame_id with came_name ns #2680
Conversation
Hi @brsbilgin I think that the current code is behaving as expected, and no need for these changes
|
@@ -59,8 +59,8 @@ using realsense2_camera_msgs::msg::Extrinsics; | |||
using realsense2_camera_msgs::msg::IMUInfo; | |||
|
|||
#define FRAME_ID(sip) (static_cast<std::ostringstream&&>(std::ostringstream() << _camera_name << "_" << STREAM_NAME(sip) << "_frame")).str() | |||
#define IMU_FRAME_ID (static_cast<std::ostringstream&&>(std::ostringstream() << _camera_name << "_imu_frame")).str() | |||
#define IMU_OPTICAL_FRAME_ID (static_cast<std::ostringstream&&>(std::ostringstream() << _camera_name << "_imu_optical_frame")).str() | |||
#define IMU_FRAME_ID (static_cast<std::ostringstream&&>(std::ostringstream() << _camera_name << "_" << "imu_frame")).str() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
already working good.
why to split "_" from the rest of the const string ?
imu_msg.angular_velocity.x = gyro_data.m_data.x(); | ||
imu_msg.angular_velocity.y = gyro_data.m_data.y(); | ||
imu_msg.angular_velocity.z = gyro_data.m_data.z(); | ||
imu_msg.angular_velocity.x = -gyro_data.m_data.z(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to swap axes, these gyro frame is in ROS CS, and IMU frame should be in same coordinates.
this is not the optical one, which we publish later in other function.
Closing this PR. |
The imu topic frame was published with default name space which is "camera" even i gave different name to the camera_name parameter. The frame name was always "camera_imu_optical_frame" never changed according the camera_name