I am trying to figure out why the ROS robot localization is giving me weird results from estimating motion for IMU only. It seems that when the robot is moving with constant velocity and a change in orientation is introduced, the body velocity is conserved s.t. the trajectory changes, even though there are no accelerations introduced, as if it does not allow for sideslip.
To verify results, I created a control condition where I can manually set the IMU values using dynamic reconfigure. Note that the EKF base_link_frame is set to base_link
and I have manually set the static tf base_link
to imu_link
to zero translation and zero rotation, ensuring that a rotation does not induce accelerations.
When I initialize the robot with a constant non-zero velocity and zero angular rate, I make sure the accelerations are set to zero, and then manually change the rotational rate to a constant value, before setting it back to zero. The figure below shows the results:
As can be seen in the top-down image, it is initially traveling forwards (in the image being up) with constant velocity. When I set the rotational rate around the vertical axis (through the plane of the image) temporarily to non-zero, it changes direction, instead of rotating while keeping the same forward motion.
I tried posing the problem the other way around: When in constant forward motion, I apply a lateral acceleration, causing it to change trajectory to the side, however in this case, there is no change in rotation, as would be expected. When I furthermore apply an acceleration that is normal to the velocity vector, the robot moves in a circular motion, again all the while keeping it's initial forward orientation as expected.
This is the configuration:
imu0: ekf/imu/data
imu0_config: [false, false, false,
false, false, false,
false, false, false,
true, true, true,
true, true, true]
imu0_queue_size: 1
imu0_nodelay: false
imu0_differential: false
imu0_relative: false
I'm not sure how to fix this. Is there a way to modify the motion model of robot localization package? Or am I missing something?
Thanks