Closed ghost closed 10 years ago
Fixed in 6b5c594880b285dc891e8ea4ec4ef4104ea0c6a5.
It was indeed a bug as tf::Transform
is not default initialized (other than ROS messages). Additionally, the published pose from an IMU orientation was not initialized correctly if the publish_roll_pitch
parameter is set to false.
Thanks for reporting this!
Note that you should not have two input topics to the same message_to_tf node. It would publish the same transforms from different data sources. In the case of libhector_gazebo_ros_imu and libgazebo_ros_p3d the orientation error is calculated differently and message_to_tf would publish slightly different roll/pitch transforms from base_stabilized
to base_link
depending on the parameter settings.
I see. I was wondering what the slight glitchiness was about. Thanks!
I'm using the catkin branch of this repo, on a ROS indigo/Ubuntu trusty system. I'm sending IMU and Odometry information to message_to_tf using the libhector_gazebo_ros_imu and libgazebo_ros_p3d plugins. The base_link -> base_stabilized tf published by message_to_tf switches intermittently between
and
After some investigation, in the part of imuCallback that creates this transform, the translation is never set. Adding a
setOrigin(tf::Vector3(0.0, 0.0, 0.0))
resolves the issue. Does this make sense as a fix?