Ask Your Question
0

GPS integration in robot_localization

asked 2016-06-01 01:32:06 -0500

pankaj patel gravatar image

updated 2016-06-01 04:07:39 -0500

Hello all, I am trying to integrate UBlox Lea6h gps module with robot_localization, this gps is to be mounted on my quadcopter. I am using ros indigo in ubuntu 14.04. By using NavSatFix of rosserial I am feeding lat and long data with a rostopic /fix to the navsat_transform_node. My rostopic echo /fix output :

header: 
  seq: 84
 stamp: 
secs: 1464760028
nsecs: 759104988
frame_id: /fix
status: 
status: 0
service: 0
latitude: 19.1345443726
longitude: 72.906288147
altitude: 0.0
position_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
position_covariance_type: 0

I don't know how to find out and where to write the position covariance. My ekf_localization_node:

<launch>   
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization" clear_params="true">

  <!-- ======== STANDARD PARAMETERS ======== -->     
  <param name="frequency" value="30"/>

  <param name="sensor_timeout" value="0.1"/>

  <param name="two_d_mode" value="false"/>

    <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="map"/>

  <param name="transform_time_offset" value="0.0"/>

      <param name="odom0" value="/odometry/gps"/>

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

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

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

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

  <!-- ======== ADVANCED PARAMETERS ======== -->
  <param name="odom0_queue_size" value="2"/>
  <param name="odom0_pose_rejection_threshold" value="5"/>
  <param name="odom0_twist_rejection_threshold" value="1"/>  
  <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,    0,    0,    0,    0,     0,     0,    0.01, 0,    0,    0,    0,    0,
                                              0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0.01, 0,    0,    0,    0,
                                              0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0.02, 0,    0,    0,
                                              0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0.01, 0,    0,
                                              0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0.01, 0,
                                              0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0.015]</rosparam>


       <rosparam param="initial_estimate_covariance">[1e-9, 0,    0,    0,    0,    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 2016-06-01 03:31:49 -0500

IvanV gravatar image

updated 2016-06-01 05:14:22 -0500

There are actually quite a lot of cheesy things in your configuration files.

In ekf_localization_node:

<param name="map_frame" value="/odometry/gps"/> 
<param name="world_frame" value="/odometry/gps"/>

map_frame and world_frame should be the world reference frame (typically "map"). If you have a map and are fusing GPS, both should be the same. /odometry/gps doesn't look like a reference frame, but a topic.

Also, when using GPS, I think

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

should be false.

Start by fixing these issues and check back.

EDIT:

Another issue I see is that you are using only one EKF node, and using in the navsat as odometry input the output from this EKF. That is not correct, since the EKF uses as input the output from the navsat, and as both need the output from the other, no one is going to publish anything.

I think you should at least use another source of odometry for the EKF in order for it to start. It can be a fake one with a very high covariance.

Also, I'm not sure if something is providing the odom-->base_link transformation, which would also be necessary.

Finally, altough you see that nodes are linked in the graph, that doesn't mean that messages are being published. Only that they are subscribed/publishing the correct topics.

edit flag offensive delete link more

Comments

Thanks for the reply IvanV, Do you mean in parameter values there should be only frame names like map, odom, base_link as given in default ? I changed those things you mentioned earlier, still not getting anything. Can you please tell more about problems in my configurations.

pankaj patel gravatar image pankaj patel  ( 2016-06-01 04:08:16 -0500 )edit

One more thing that I want to ask is, robot localization will work with only gps or it needs IMU sensor also ? By saying Transformation from odom-> base_link do you mean integration of one more sensor ?

pankaj patel gravatar image pankaj patel  ( 2016-06-01 05:34:41 -0500 )edit

Please check REP 105 for the standard reference frames and their relationship. Your EKF is publishing the transformation map->odom, but requires odom->base_link. If you want to avoid it, maybe you can set odom_frame to "map" so it publishes map->base_link.

IvanV gravatar image IvanV  ( 2016-06-01 06:16:53 -0500 )edit

You're essentially trying to integrate your GPS data, yes? If you haven't already seen it, check out this question here, it helped me.

M@t gravatar image M@t  ( 2016-06-15 22:31:15 -0500 )edit

Also check out this example launch file here, it gives you a good idea of how to set everything up. Full credit for it goes to Tom Moore since he wrote and not me.

M@t gravatar image M@t  ( 2016-06-15 22:57:20 -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

2 followers

Stats

Asked: 2016-06-01 01:32:06 -0500

Seen: 1,006 times

Last updated: Jun 01 '16