Can I use robot_localization package with only imu data? If I could,how to config the package?
I want to fuse IMU and GPS data with robot_localization package used in an autonomous car, but there will have some time that I can't obtain the GPS data and IMU is the only source I can get to calculate position. I have a high precise IMU,but the error is huge when I use robot_localization without gps, so my question is can I use robot_localization package with only imu data.If I could,how to config the package correctly? Here is my launch file:
<launch>
<node pkg="tf2_ros" type="static_transform_publisher" name="bl_imu" args="0 0 0 0 0 0 1 base_link imu_link" />
<node pkg="tf2_ros" type="static_transform_publisher" name="bl_gps" args="0 0 0 0 0 0 1 imu_link gps_link"/>
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization_global" clear_params="true">
<param name="frequency" value="30"/>
<param name="sensor_timeout" value="2"/>
<!--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="imu0" value="/imuData"/>
<rosparam param="imu0_config">[false, false, false,
true, true, true,
false, false, false,
true, true, true,
true, true, true]</rosparam>
<param name="imu0_differential" value="true"/>
<param name="imu0_remove_gravitational_acceleration" value="true"/>
<param name="two_d_mode" value="true"/>
<param name="odom0" value="/odometry/gps"/>
<rosparam param="odom0_config">[true, true, true,
false, false, false,
false, false, false,
false, false, false,
false, false, false]</rosparam>
</node>
<node pkg="robot_localization" type="navsat_transform_node"
name="navsat_transform_node" respawn="true" output="screen">
<param name="magnetic_declination_radians" value="0.157"/>
<param name="yaw_offset" value="1.570796327"/>
<remap from="/imu/data" to="/imuData"/>
<remap from="/gps/fix" to="/gpsData"/>
</node>
<node pkg="rviz" type="rviz" name="rviz_imu_gps_fuse" output="screen" args="-d $(find robot_localization)/robot_localization.rviz"/>
</launch>
Thanks to your post I have a better clarity on creating the launch file. I could not find the
robot_localization.rviz
file in the robot_localization repository. Can you guide me as to how to create this file?