You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently trying to integrate the /Imu topic from the ros2-driver with the robot_localization package to calculate my robot orientation. At the beggining, robot_localization was not able to handle the /Imu topic orientation information. After some investigation I discovered that the problem was in the timestamp that ros2-driver was publishing in the /Imu topic header. The timestamp was not aligned with the timestamp of the static transform that I use to convert the imu frame to base_link, so robot_localization was ignoring the topic.
This timestamp seems to be passed directly from the data received from the imu. Is there some reason to use the timestamp like this? Why not use the ROS timestamp for this field?
I solved my problem by modifying the ros2_driver advanced_navigation_driver.cpp like this
// IMU
imu_msg.header.stamp=node->now();
imu_msg.header.frame_id=imu_frame_id;
// Using the RPY orientation as done by cosama
orientation.setRPY(
system_state_packet.orientation[0],
system_state_packet.orientation[1],
PI/2.0f - system_state_packet.orientation[2] //REP 103
);
The text was updated successfully, but these errors were encountered:
I'm currently trying to integrate the /Imu topic from the ros2-driver with the robot_localization package to calculate my robot orientation. At the beggining, robot_localization was not able to handle the /Imu topic orientation information. After some investigation I discovered that the problem was in the timestamp that ros2-driver was publishing in the /Imu topic header. The timestamp was not aligned with the timestamp of the static transform that I use to convert the imu frame to base_link, so robot_localization was ignoring the topic.
This timestamp seems to be passed directly from the data received from the imu. Is there some reason to use the timestamp like this? Why not use the ROS timestamp for this field?
I solved my problem by modifying the ros2_driver advanced_navigation_driver.cpp like this
The text was updated successfully, but these errors were encountered: