Ask Your Question
0

robot_localization gps compass

asked 2015-09-02 05:32:13 -0500

Porti77 gravatar image

Hello again: My system is this:

  • Compass: only has data yaw with 10 hz of frecuency. When is facing to the East reads 0 when facing North reads pi/2. Yaw_offset of navsat 0. And tf between base_link and compass (R, P, Y) -> (0, 0, 0) and (X, Y, Z) -> (0, 0, 0)
  • GPS: 1 hz of frecuency.
  • Have a publishing IMU 100 hz.And I'm not sure it will work with the final implementation.

The launch file is the next:

<!-- Launch file -->
    <launch>

       <param name="/use_sim_time" value="true" />
       <node pkg="rosbag" type="play" name="rosbagplay" args="/home/jorge_j/parking_imu_compass_1_9_f.bag --clock -d 3" required="true"/>

       <node pkg="tf2_ros" type="static_transform_publisher" name="bl_imu" args="0.0 0.0 0.0 0.0 0.0 0 1.0 base_link imu" /> 
       <node pkg="tf2_ros" type="static_transform_publisher" name="bl_compass" args="0.0 0.0 0.0 0.0 0.0 0 1.0 base_link compass" /> 
       <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="/compass/data"/>
           <param name="imu1" 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,
                                            false, false,  true,
                                            false, false, false,
                                            false, false, false,
                                            false, false, false]</rosparam>

             <rosparam param="imu1_config">[false, false, false,
                                             true,  true, false,
                                            false, false, false,
                                             true,  true,  true,
                                            false, false, false]</rosparam>

           <param name="odom0_differential" value="false"/>
           <param name="imu0_differential" value="false"/>
           <param name="imu1_differential" value="false"/>

           <param name="odom0_relative" value="false"/>
           <param name="imu0_relative" value="false"/>
           <param name="imu1_relative" value="false"/>

           <param name="imu0_remove_gravitational_acceleration" value="true"/>
           <param name="imu1_remove_gravitational_acceleration" value="true"/>

           <param name="print_diagnostics" value="true"/>

           <param name="odom0_queue_size" value="10"/>
           <param name="imu0_queue_size" value="10"/>
           <param name="imu1_queue_size" value="10"/>

           <param name="debug"           value="false"/>
           <param name="debug_out_file"  value="debug_ekf_localization.txt"/>

             <rosparam param="process_noise_covariance">[0.05, 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.06, 0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                                                         0,    0,    0,    0.03, 0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                                                         0,    0,    0,    0,    0.03, 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.025, 0,     0,    0,    0,    0,    0,    0,    0,
                                                         0,    0,    0,    0,    0,    0,    0,     0.025, 0,    0,    0,    0,    0,    0,    0,
                                                         0,    0,    0,    0,    0,    0,    0,     0,     0.04, 0,    0,    0,    0,    0,    0,
                                                         0,    0,    0 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2015-09-02 06:25:11 -0500

Tom Moore gravatar image

The forward direction for the robot platform should be +X in the base_link frame.

I take it the red line is the output of navsat_transform_node? Try setting your magnetic_declination_radians parameter.

edit flag offensive delete link more

Comments

Yes is the output of navasat_transform_node. The magnetic declination is about 2.5º but the compass that i will use is a satelital compass. How do you think anout the results?

Porti77 gravatar imagePorti77 ( 2015-09-02 07:29:55 -0500 )edit

They're reasonable. I'd fix the magnetic declination (careful with the sign) and possibly up the covariance on your GPS. It may be that your compass heading is not great, because +X acceleration should move in the same direction of travel as the GPS. You're getting skewed forward motion.

Tom Moore gravatar imageTom Moore ( 2015-09-02 21:20:21 -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

4 followers

Stats

Asked: 2015-09-02 05:32:13 -0500

Seen: 533 times

Last updated: Sep 02 '15