Got confused with frame_ids
I'm fusing GPS, Visual Odometry and IMU. After reading the documentations with some try and error tests, finally I can get a reasonable output.
I put the frame_id of my Visual Odometry output as odom. I put the frame_id of my IMU as base_link. The GPS data is transformed to odom frame using navsat_transform_node and all three sensors are fused in ekf_node. Because Visual Odometry and GPS both produce x,y,z in state vector, I put differential mode to true for visual odometry as it is less accurate than GPS. I want you to explain me if this configuration is wrong. (I will send my launch file if you need)
Anyway
I'm confused about coordinate frames. The first time I read about the package, I though that it can handle multiple sensors in their own coordinate frames. I thought that It includes some sort of self-calibration. But Now, what I get is that the package only can produce /tf message between odom and base_link frames.
Is this true? I mean if I want to fuse a sensor in another frame, say odom_b, then do I have to provide /tf from odom_b to odom?
Next question: I know that visual odometry becomes less and less accurate over time. When I publish its poses, I just put the covariance of current measure and don't account for previous covariances. Does the filter accumulates those covariances it self?
<launch>
<node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform_node" respawn="true">
<param name="magnetic_declination_radians" value="0"/>
<param name="yaw_offset" value="0"/>
<param name="zero_altitude" value="true"/>
<remap from="/imu/data" to="/imu_with_cov" />
<remap from="/gps/fix" to="/fix" />
<remap from="/odometry/filtered" to="/odometry/filtered" />
</node>
<node pkg="robot_localization" type="ukf_localization_node" name="ukf_se" clear_params="true">
<!-- ======== STANDARD PARAMETERS ======== -->
<param name="frequency" value="10"/>
<param name="sensor_timeout" value="0.1"/>
<param name="two_d_mode" value="true"/>
<!-- Defaults to "odom" if unspecified -->
<param name="odom_frame" value="odom"/>
<!-- Defaults to "base_link" if unspecified -->
<param name="base_link_frame" value="imu_link"/>
<!-- Defaults to the value of "odom_frame" if unspecified -->
<param name="world_frame" value="odom"/>
<param name="transform_time_offset" value="0.0"/>
<param name="odom0" value="/vo"/>
<param name="odom1" value="/odometry/gps"/>
<param name="imu0" value="/imu_with_cov"/>
<rosparam param="odom0_config">[true, true, true,
false, false, false,
false, false, false,
false, false, false,
false, false, false]</rosparam>
<rosparam param="odom1_config">[true, true, true,
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,
false, false, false,
false, false, false]</rosparam>
<param name="odom0_differential" value="true"/>
<param name="odom1_differential" value="false"/>
<param name="imu0_differential" value="false"/>
<param name="odom0_relative" value="true"/>
<param name="odom1_relative" value="true"/>
<param name="imu0_relative" value="true"/>
<param name="print_diagnostics" value="true"/>
<!-- ======== ADVANCED PARAMETERS ======== -->
<param name="odom0_queue_size" value="5"/>
<param name="odom1_queue_size" value="50"/>
<param name="imu0_queue_size" value="50"/>
<param name="debug" value="false"/>
<param name="debug_out_file" value="debug_ekf_localization.txt"/>
</node>
<node pkg="my_mono_vo" type="monocularVO" name="monocularVO" respawn="true">
</node>
</launch>
EDIT1:
Hi Tom ...
Please post your full launch file, and a sample message for every input (e.g., your NavSatFix message, your IMU message, and your visual odometry message).
Great! Would you mind accepting the answer below? Just click the checkmark.