Using GPS's data with robot_pose_ekf in Gazebo simulation
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?