ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Using GPS's data with robot_pose_ekf in Gazebo simulation

asked 2012-12-13 22:13:29 -0500

ChengXiang gravatar image

Hi. I am now doing simulation of robot with a GPS sensor attached. The sensor plugin I used is the GPS plugin provided by the Hector team. The way I make use of the GPS data is as followed: I use the utm_odometry node to first convert the GPS's fix data into odom message, then I will input the odom message into the robot_pose_ekf as the “vo” inputs.

However, I run into a problem with the robot_pose_ekf node. For robot_pose_ekf, it cannot process message with zero diagonal covariance matrix.

This is my GPS sensor's fix output,

header: 
  seq: 41
  stamp: 
  secs: 10
  nsecs: 500000000
frame_id: base_footprint
 status: 
 status: 0
 service: 1
latitude: 49.8999981297
longitude: 8.90000579613
altitude: -0.0689502682112
position_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
position_covariance_type: 0

This is the utm_odometry node's output,

header: 
 seq: 307
 stamp: 
 secs: 77
 nsecs: 0
frame_id: base_footprint
child_frame_id: ''
pose: 
pose: 
position: 
  x: 492817.988235
  y: 5527516.10598
  z: -0.385949522131
orientation: 
  x: 1.0
  y: 0.0
  z: 0.0
  w: 0.0
  covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,  
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 99999.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 
99999.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 99999.0]
twist: 
 twist: 
 linear: 
  x: 0.0
  y: 0.0
  z: 0.0
angular: 
  x: 0.0
  y: 0.0
  z: 0.0
covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,  
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

Both the simulated GPS's fix and odom output from utm_odometry node have diagonal zeros in their covariance matrix. I wonder if this is considered normal? If so, does that means that the outputs from simulated GPS sensors cannot be input into utm_odometry -->robot_pose_ekf?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2012-12-13 22:55:47 -0500

JonW gravatar image

This may be a limitation of the utm_odometry node. Looking at the hector_gazebo plugin, the covariance matrix is zeroed, but there is another element in the NavSatFix message called position_covariance_type that is set to sensor_msgs::NavSatFix::COVARIANCE_TYPE_UNKNOWN by the hector GPS plugin. There appears to be a discussion of this field here.

Looking at the source code of utm_odometry node appears to ignore this field and just examines the covariance matrix. The code can be found around line 54.

edit flag offensive delete link more

Comments

I see. Thanks. I think i will find another way to make use of the GPS data then.

ChengXiang gravatar image ChengXiang  ( 2012-12-14 18:11:27 -0500 )edit

Question Tools

Stats

Asked: 2012-12-13 22:13:29 -0500

Seen: 1,208 times

Last updated: Dec 13 '12