Robot_localization and Hector mapping [closed]
Hi guys,
I am trying to run hector_mapping
in concomitant with robot_localization
. I think all my configurations are correct, but for more clarity here the conf:
<launch>
<include file="$(find rovitis_launch)/launch/mapping/hector_mapping.launch"/>
<node pkg="tf" type="static_transform_publisher" name="base_link_to_camera" args="1.65 0 0.65 0 0 0 base_link camera 10"/>
<node pkg="tf" type="static_transform_publisher" name="base_link_to_gps" args="0.83 0 1.37 0 0 0 base_link GPS_link 10"/>
<node pkg="tf" type="static_transform_publisher" name="base_link_to_imu" args="0 0 0.2 -1.57 0 -3.14 base_link imu_link 10"/>
<node pkg="tf" type="static_transform_publisher" name="base_link_to_laser_link" args="1.65 0 0.1 0 0 0 base_link laser_link 10"/>
<rosparam command="load" file="$(find rovitis_launch)/config/gps_odom.yaml" />
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_se_odom" clear_params="true"/>
<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" clear_params="true">
<rosparam command="load" file="$(find rovitis_launch)/config/navsat_transform.yaml" />
<remap from="odometry/filtered" to="odometry/filtered_map"/>
</node>
</launch>
and then
# For parameter descriptions, please refer to the template parameter files for each node.
ekf_se_odom:
frequency: 30
sensor_timeout: 0.1
two_d_mode: true
transform_time_offset: 0.0
transform_timeout: 0.0
print_diagnostics: true
debug: true
debug_out_file: /home/matteo/rover_ws/ekf_se_odom.txt
map_frame: map
odom_frame: odom
base_link_frame: base_link
world_frame: odom
odom0: odom
odom0_config: [true, true, false,
false, false, false,
false, false, false,
false, false, true,
false, false, false]
odom0_queue_size: 10
odom0_nodelay: true
odom0_differential: false
odom0_relative: true
odom0_pose_rejection_threshold: 5
odom0_twist_rejection_threshold: 1
twist0: gps/fix_velocity
twist0_config: [false, false, false,
false, false, false,
true, true, true,
false, false, false,
false, false, false]
twist0_queue_size: 10
twist0_nodelay: true
twist0_differential: false
twist0_relative: true
imu0: imu/data
imu0_config: [false, false, false,
true, true, true,
false, false, false,
true, true, true,
true, true, true]
imu0_nodelay: false
imu0_differential: false
imu0_relative: true
imu0_queue_size: 10
imu0_pose_rejection_threshold: 0.8 # Note the difference in parameter names
imu0_twist_rejection_threshold: 0.8 #
imu0_linear_acceleration_rejection_threshold: 0.8 #
imu0_remove_gravitational_acceleration: true
use_control: false
process_noise_covariance: [...]
initial_estimate_covariance: [...]
ekf_se_map:
frequency: 30
sensor_timeout: 0.1
two_d_mode: true
transform_time_offset: 0.0
transform_timeout: 0.0
print_diagnostics: true
debug: true
debug_out_file: /home/matteo/rover_ws/ekf_se_map.txt
map_frame: map
odom_frame: odom
base_link_frame: base_link
world_frame: map
odom0: odom
odom0_config: [true, true, false,
false, false, false,
false, false, false,
false, false, true,
false, false, false]
odom0_queue_size: 10
odom0_nodelay: true
odom0_differential: false
odom0_relative: true
odom0_pose_rejection_threshold: 5
odom0_twist_rejection_threshold: 1
odom1: odometry/gps
odom1_config: [true, true, true,
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
twist0: gps/fix_velocity
twist0_config: [false, false, false,
false, false, false,
true, true, true,
false, false, false,
false, false, false]
twist0_queue_size: 10
twist0_nodelay: true
twist0_differential: false
twist0_relative: true
imu0: imu/data
imu0_config: [false, false, false,
true, true, true,
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: [...]
initial_estimate_covariance: [...]
Finally navsat conf
frequency: 30
delay: 3.0
magnetic_declination_radians: 0.0539 # For lat/long 45.2266641° N , 11.9843053° E
yaw_offset: 0.0 # IMU reads ...
Did you remember to turn off the publication of the map->odom transform in Hector mapping? The EKF is publishing that.
Please post sample input messages for every sensor input.
Also, I'd turn off debug mode. That's just going to eat your hard drive.
Thanks Tom for the reply and the hint, it saved me;) I solved using gmapping instead of hector (yes I disabled the publication of tf)
@matteopantano I have the same issue I tried to solve ir with gmapping but with no success, could you show your solution?
@matteopantano check this, I think I found the solution if you still want to use hectormap:
301359