Issues using robot_localization with gps and imu
I only have two sensors, gps and and imu, that I am trying to integrate using robot_localization. I've created a launch file based on this question, pasted at the end.
There are a couple of issues. When I run the launch file I'm getting warnings about not having a base_link->map transform. The node handles the transform between odom and base link, do I need to create a transform from odom to map myself? There wasn't anything indicated in the linked answer so I assumed not, but I seem to be missing something. Warnings are pasted below
[ WARN] [1467926395.059514047]: Could not obtain base_link->map transform. Will not remove offset of navsat device from robot's origin.
[ WARN] [1467926397.126389602]: Could not obtain transform from map to base_link. Error was "map" passed to lookupTransform argument source_frame does not exist.
Second, the output of /odometry/gps is stuck at 0 for all values despite my gps data coming in fine, I would guess because of the map to base_link transform issue. Any help figuring out where I went wrong in my setup would be greatly appreciated.
EDIT- After rereading the robot_localization wiki I removed the map_frame line from the file as suggested but get the same results. Why is it still looking for a transform for the map_frame if I'm not using one?
<launch>
<node pkg="tf2_ros" type="static_transform_publisher" name="bl_imu" args="0 0 0 0 0 0 1 base_link imu_link" />
<!-- Start piksi driver, remap spp output to /gps/fix -->
<node pkg="swiftnav_piksi" type="piksi_node" name="piksi_node">
<param name="port" value="/dev/ttyUSB0" />
<remap from="fix" to="/gps/fix"/>
</node>
<!-- Start imu running, remap output to /imu/data -->
<node pkg="ros_erle_imu" type="imu_talker" name="imu_talker">
<remap from="imu9250" to="/imu/data"/>
</node>
<!-- Start -->
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization" clear_params="true">
<param name="frequency" value="30"/>
<param name="sensor_timeout" value="0.1"/>
<param name="two_d_mode" value="true"/>
<param name="map_frame" value="map"/>
<param name="odom_frame" value="odom"/>
<param name="base_link_frame" value="base_link"/>
<param name="world_frame" value="odom"/>
<param name="transform_time_offset" value="0.0"/>
<param name="odom0" value="/odometry/gps"/>
<param name="imu0" value="/imu/data"/>
<rosparam param="odom0_config">[true, true, false,
false, false, false,
false, false, false,
false, false, false,
false, false, false]</rosparam>
<rosparam param="imu0_config">[false, false, false,
true, true, true,
false, false, false,
true, true, true,
true, true, true]</rosparam>
<param name="odom0_differential" value="false"/>
<param name="imu0_differential" value="false"/>
<rosparam param="process_noise_covariance">[0.05, 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.05, 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, 0.06, 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 ...
Please post sample input messages.
Added the rostopic echo output for /gps/fix and /imu/data, I'll figure out how to share a bag file as well
EDIT- So the warnings were from incorrectly set frame_ids. If I delete the map frame and change odom and world to gps they're silenced. Position is still drifting a ton though.
Bag file https://github.com/swift-nav/ros_rove... GPS/IMU data only bag file https://github.com/swift-nav/ros_rove...