runaway values with robot_localization, no velocity sensors
I have a boat with only two sensors: a VectorNav IMU and a Marvelmind indoor GPS unit. Notably, there are no sensors that can measure velocity, and ekflocalizationnode quickly thinks that the boat is going 100+ m/s for some reason—even with no position changes. I'm running Ubuntu 20.04 with ROS Noetic. My launch file is:
<launch>
<param name="use_sim_time" value="true" />
<node name="base_link_to_hedgehog" pkg="tf" type="static_transform_publisher" args="0 0 0 0 0 0 base_link hedgehog 50" />
<node name="odom_to_base_link" pkg="tf" type="static_transform_publisher" args="0 0 0 0 0 0 odom base_link 10" />
<!-- https://roscon.ros.org/2015/presentations/robot_localization.pdf -->
<node name="indoor_ukf" pkg="robot_localization" type="ekf_localization_node">
<param name="world_frame" value="map" />
<param name="map_frame" value="map" />
<param name="odom_frame" value="odom" />
<param name="frequency" value="40" />
<param name="pose0" value="/indoor_gps"/>
<param name="pose0_relative" value="false" />
<param name="pose0_differential" value="false" />
<param name="pose0_queue_size" value="100" />
<rosparam param="pose0_config">[true, true, true,
false, false, false,
false, false, false,
false, false, false,
false, false, false]</rosparam>
<param name="imu0" value="/vectornav/IMU"/>
<param name="imu0_differential" value="false" />
<param name="imu0_relative" value="false" />
<param name="imu0_queue_size" value="1000" />
<rosparam param="imu0_config"> [false, false, false,
true, true, true,
false, false, false,
false, false, false,
false, false, false]</rosparam>
<param name="imu0_remove_gravitational_acceleration" value="true" />
<param name="two_d_mode" value="false" />
<rosparam param="initial_state">[0.0, 0.0, 0.0,
0.0, 0.0, 0.0,
0.0, 0.0, 0.0,
0.0, 0.0, 0.0,
0.0, 0.0, 0.0]</rosparam>
<param name="print_diagnostics" value="true"/>
<param name="publish_tf" value="true"/>
</node>
</launch>
I had a setup with two localization nodes replacing the static transform from odom to base_link but removed it for simplicity since the issue persists in both configurations—and it seems not to be necessary anyways ("If all you have is IMU and GPS data, then you don't need to run two EKFs, as it won't really help you").
A rosbag is available here.
Asked by bencs on 2023-01-20 00:16:21 UTC
Answers
It would be helpful if you could include a sample of each sensor input in the question. I won't have cycles to review bag data.
It's been a long time since that other question was asked, but in general, a straight GPS/IMU integration isn't going to work well without a velocity reference. The other question was also fusing acceleration data from the IMU and using two_d_mode
. You could try fusing the acceleration from your IMU (you might as well include the gyro angular velocity data, too).
I question whether your GPS data is being fused into the state estimate at all, but I can't comment without some sample sensor messages.
Asked by Tom Moore on 2023-05-15 04:38:49 UTC
Comments