How to use nav_transform_node
Hi Tom/all: I want to fuse GPS data into EKF , which means that I need to run ekf_localization_node together with navsat_transform_node. My launch file goes like follows:
<launch>
<node pkg="tf2_ros" type="static_transform_publisher" name="link1_broadcaster" args="0 0 0 1 0 0 0 base_link imu_link" />
<node pkg="tf2_ros" type="static_transform_publisher" name="link2_broadcaster" args="0 0 0 0 0 0 1 base_link gps" />
<rosparam command="load" file="$(find ivlocalization)/params/dual_ekf_navsat_example.yaml" />
<node pkg="ivlocalization" type="ekf_localization_node" name="ekf_se_map" clear_params="true" output="screen">
</node> >
<node pkg="ivlocalization" type="navsat_transform_node" name="navsat_transform" clear_params="true" output="screen">
</node>
<node name="playbag" pkg="rosbag" type="play" args="--clock $(arg bag_filename)" output="screen" />
</launch>
And here's my .yaml file:
ekf_se_map:
frequency: 30
sensor_timeout: 0.1
two_d_mode: false
transform_time_offset: 0.0
transform_timeout: 0.0
print_diagnostics: true
debug: false
map_frame: map
odom_frame: odom
base_link_frame: base_link
world_frame: map
# odom0: odometry/filtered
# odom0_config: [false, false, false,
# false, false, false,
# true, true, true,
# false, false, true,
# false, false, false]
# odom0_queue_size: 10
# odom0_nodelay: true
# odom0_differential: false
# odom0_relative: false
odom1: husky_velocity_controller/odom
odom1_config: [true, true, false,
false, false, false,
false, false, false,
false, false, false,
false, false, false]
odom1_queue_size: 10
odom1_nodelay: true
odom1_differential: false
odom1_relative: false
imu0: imu/data
imu0_config: [false, false, false,
true, true, false,
false, false, false,
true, true, true,
true, true, true]
imu0_nodelay: true
imu0_differential: false
imu0_relative: false
imu0_queue_size: 10
imu0_remove_gravitational_acceleration: true
use_control: false
process_noise_covariance: [1.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1e-3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0.3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0.3, 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.5, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0.1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3]
initial_estimate_covariance: [1.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ...
Did you check this? But what I currently see is, that you give your nodes no parameters. Where are your parameters located?
I've gone through the whole documents of robot_localization. And I load parameters from dual_ekf_navsat_example.yaml as mentioned in the fifth line of the launch file.
Ah ok but you need to specify the parameters in the local scope of nodes! so you just load the parameters in the global scope. Or did you do it in the local scope in the yaml file? Can you post your config?
I change the topic name in the subscriber function in the local scope,anything left over? I re-edit my question with my config of .yaml posted as you can see.Thank you so much!