Ask Your Question
1

Can I use robot_localization package with only imu data? If I could,how to config the package?

asked 2016-04-25 03:51:22 -0500

Nico.Zhou gravatar image

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>
edit retag flag offensive close merge delete

Comments

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?

Subodh Malgonde gravatar imageSubodh Malgonde ( 2018-07-25 04:54:31 -0500 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2016-05-09 19:55:13 -0500

Tom Moore gravatar image

You can use it with just an IMU, yes, but until I add bias correction, I wouldn't expect great results. Even after bias correction has been added, I wouldn't want to have only an IMU for pose estimation. Double integration of linear acceleration is going to lead to drift.

edit flag offensive delete link more

Comments

Thanks for your answer Tom, I'm think about fuse visual odometry, hope I can get good result.

Nico.Zhou gravatar imageNico.Zhou ( 2016-05-16 02:00:52 -0500 )edit

Hello. I just started using the robot localization package only with an IMU. I am using the the launch file Nico provided but I am getting zeros both in position and linear twist (on /odometry/filtered). Any ideas about what I am doing wrong? Is the navsat node necessary? Thank you for your time.

SprGrf gravatar imageSprGrf ( 2016-09-01 04:04:13 -0500 )edit

@SprGrf I am trying to do the same thing, IMU only navigation. Were you able to figure this out?

vik748 gravatar imagevik748 ( 2018-01-29 21:42:28 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-04-25 03:51:22 -0500

Seen: 1,090 times

Last updated: May 09 '16