navsat_transform_node outputs zero pose on /odometry/gps
Hi all,
I'am trying to get robot_localization to work with imu and GPS (no real odometry) using the navsat_transform_node node with Gazebo.
I have my first ekf node, running with imu0 only as input, to obtain the odom frame. Then I try to fuse GPS information using the navsat_transform_node, but this node only outputs zero odometry on /odometry/gps:
header:
seq: 194
stamp:
secs: 40
nsecs: 200000000
frame_id: "odom"
child_frame_id: ''
pose:
pose:
position:
x: 0.0
y: 0.0
z: 0.0
orientation:
x: 0.0
y: 0.0
z: 0.0
w: 1.0
covariance: [1.0099999999999998, -8.788794008375919e-25, 0.0, 0.0, 0.0, 0.0, -8.271806125530277e-25, 1.0099999999999998, -1.6940658945086007e-21, 0.0, 0.0, 0.0, 6.776263578034403e-21, 0.0, 1.01, 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]
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]
Is there something obvious that I am missing?
My launch file for the robot_localization components is the following
<launch>
<rosparam command="load" file="$(find symeter2)/config/ekf_config.yaml" />
<!-- Launch Symeter 2 gui-->
<node pkg="symeter2_gui" type="symeter2_gui" name="symeter2_gui" output="screen" />
<!-- Launch the robot_localization node -->
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_se_odom" clear_params="true">
<rosparam param="initial_state">[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]</rosparam>
</node>
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_se_map" clear_params="true">
<remap from="odometry/filtered" to="odometry/filtered_map"/>
</node>
<node pkg="robot_localization" type="navsat_transform_node"
name="navsat_transform" respawn="true" output="log">
<rosparam param="datum">[49.9, 8.9, 0.0, map, base_link]</rosparam>
<remap from="/imu/data" to="/symeter2/imu0" />
<remap from="/gps/fix" to="/symeter2/fix/" />
<remap from="/odometry/filtered" to="/odometry/filtered" />
</node>
</launch>
and the ekf_config.yaml file is the following:
ekf_se_odom:
frequency: 30
sensor_timeout: 1
two_d_mode: false
transform_time_offset: 0.0
transform_timeout: 0.0
print_diagnostics: true
debug: false
publish_tf: true
publish_acceleration: false
map_frame: map
odom_frame: odom
base_link_frame: base_link
world_frame: odom
imu0: symeter2/imu0
imu0_config: [false, false, false, #x, y, z
true, true, true, #roll, pitch, yaw
false, false, false, #vx, vy, vz,
true, true, true, #vroll, vpitch, vyaw
true, true, true] #ax, ay, az
imu0_nodelay: false
imu0_differential: false
imu0_relative: false
imu0_queue_size: 10
imu0_remove_gravitational_acceleration: true
use_control: false
process_noise_covariance ...
After reading https://answers.ros.org/question/2000... , it seems that I do not need to have two ekf nodes when I only have IMU to fuse with GPS.
But I would still have my problem with navsat_transform_node generating 0 pose in /odometry/gps.
I'am probably missing something quite simple, but it still eludes me...
It turns out that I have the exact same behavior as described in https://answers.ros.org/question/2822...
I also have an empty child_frame_id