robot_localization map to odom transform seems to be incorrect
I'm using two robot_localization nodes, one for continuous data (wheels' odom + imu) and the other including gps for pose correction. For instance ekf_localization and gps_ekf_localization are giving the exact same output seen from the odom frame which is normal, but when looking at their output in the map frame I am supposed to see a drift between them but they are still the same and the whole trajectory has the same form with a slight deformation and it's rotated with an important angle and also translated. This is an example of the published transforms:
transform:
translation:
x: 1.62237404993
y: -1.66250429176
z: 0.0
rotation:
x: 0.0
y: 0.0
z: 0.864963620982
w: 0.501834568736
This made me think that the map to odom transform is wrong for some reason, also made me question: is the gps data really used for pose correction? With the same configuration, I eliminated the gps data and still have the same output. The weird thing is that every thing seem to be working some times, the robot maintain its trajectory and seems to be very aware of its position and orientation. But with a more complex trajectory and in some different areas I'm getting the same behavior as the one described in this paper when fusing only odom and imu.
The launch file I'm using is a way too similar to the one provided as answer for the following question. Does this have something to do with the imu parameters ? I've been reading the documentation and almost every published issue and question about the package but I still have so many questions bothering me in my head since I'm new to all this magic. I will try to provide some bag files as soon as possible. But hopefully this little description will make you able to give me some points to check or to correct. Thank you in advance.
EDIT in response to Tom's comment:
This is the launch file I'm using:
<launch>
<param name="/use_sim_time" value="false"/>
<node pkg="tf2_ros" type="static_transform_publisher" name="bf_bl" args="0 0 0.3 0 0 0 1 base_footprint base_link" />
<node pkg="tf2_ros" type="static_transform_publisher" name="bl_gps" args="0.448 0 0.358 0 0 0 1 base_link gps" />
<node pkg="tf2_ros" type="static_transform_publisher" name="bl_imu" args="0.448 0 0.358 0 0 3,14159 1 base_link imu_link" />
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization" output= "screen" clear_params="true">
<param name="frequency" value="10"/>
<param name="sensor_timeout" value="0.1"/>
<param name="two_d_mode" value="true"/>
<param name="map_frame" value="map_gps"/>
<param name="odom_frame" value="/odometry/filtered"/>
<param name="base_link_frame" value="base_footprint"/>
<param name="world_frame" value="/odometry/filtered"/>
<remap from="/odom_wheels" to="/odom"/>
<param name="transform_time_offset" value="0.0"/>
<param name="odom0" value="odom"/>
<param name="imu0" value="imu/data"/>
<rosparam param="odom0_config">[false, false, false,
false, false, false,
true, true, false,
false, false, false,
false, false, false]</rosparam>
<rosparam param="imu0_config">[false, false, false,
true, true ...
This seems to indicate that your GPS data is not being fused at all. Please post your full launch/configuration and sample messages for each input.
Thank you for your comment Tom, I edited my question and added the launch file , I will add a bag file or some data messages as soon as possible, I don't have the robot with me right now , so I have to go back to the bag files that I've got and post some filtered data.
I added the bag file, and I would be grateful if you help me!