robot_localization not publishing map -> odom transformation
Hello everyone,
I am trying to set up the localization pipline for my custom robot using the robot_localization
package and gazebo. I am simulating a robot that has an IMU, Wheel Odometry and GPS in gazebo. I want to configure robot_localization
so it publishes the odom -> base_link
and map -> odom
transformations. Currently, only the odom -> base_link
is being published, although I also configured the map -> odom
location node, including a navsat_transform_node
to fuse the GPS.
This is the launchfile that I am using to start the localizations:
<launch>
<!-- Node that publishes the odom -> base_link transform -->
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_local" ns="/mowro/localisation/" clear_params="true">
<rosparam command="load" file="$(find mowro_tf)/config/ekf_template.yaml" />
<remap from="odometry/filtered" to="/mowro/localisation/local/odometry/filtered"/>
</node>
<!-- Node that generates transforms gps coordinates -->
<node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform" ns="/mowro/" respawn="true">
<param name="magnetic_declination_radians" value="0"/>
<param name="yaw_offset" value="0"/>
<param name="broadcast_utm_transform" value="false"/>
<param name="publish_filtered_gps" value="false"/>
<remap from="/mowro/imu/data" to="/mowro/imu" />
<remap from="/mowro/gps/fix" to="/mowro/gps" />
<remap from="/mowro/odometry/filtered" to="/mowro/localisation/local/odometry/filtered" />
</node>
<!-- Node that publishes the map -> odom transform -->
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_global" ns="/mowro/localisation/" clear_params="true">
<rosparam command="load" file="$(find mowro_tf)/config/ekf_template_map.yaml" />
<remap from="/mowro/localisation/odometry/filtered" to="/mowro/localisation/global/odometry/filtered" />
</node>
</launch>
This is my configuration file for the odom -> base_link
localization node:
frequency: 30
sensor_timeout: 0.1
two_d_mode: true
transform_time_offset: 0.5
transform_timeout: 0.0
print_diagnostics: true
debug: false
publish_tf: true
publish_acceleration: false
map_frame: map
odom_frame: mowro/odom
base_link_frame: base_link
world_frame: mowro/odom
odom0: /mowro/odom
odom0_config: [true, true, false,
false, false, true,
false, false, false,
false, false, false,
false, false, false]
odom0_queue_size: 2
odom0_nodelay: false
odom0_differential: false
odom0_relative: false
odom0_pose_rejection_threshold: 5
odom0_twist_rejection_threshold: 1
use_control: true
stamped_control: false
control_config: [true, false, false, false, false, true]
acceleration_limits: [1.3, 0.0, 0.0, 0.0, 0.0, 3.4]
deceleration_limits: [1.3, 0.0, 0.0, 0.0, 0.0, 4.5]
acceleration_gains: [0.8, 0.0, 0.0, 0.0, 0.0, 0.9]
deceleration_gains: [1.0, 0.0, 0.0, 0.0, 0.0, 1.0]
[Covariance matrices have been left out to improve readability]
This is my configuration file for the map -> odom
localization node:
frequency: 30
sensor_timeout: 0.1
two_d_mode: true
transform_time_offset: 0.5
transform_timeout: 0.0
print_diagnostics: true
debug: false
publish_tf: true
publish_acceleration: false
map_frame: map
odom_frame: mowro/odom
base_link_frame: base_link
world_frame: map
odom0: /mowro/odometry/gps
odom0_config: [true, true, false,
false, false, false,
false, false, false,
false, false, false,
false, false, false]
odom0_queue_size: 2
odom0_nodelay: false
odom0_differential: false
odom0_relative: false
odom0_pose_rejection_threshold: 5
odom0_twist_rejection_threshold: 1
use_control: false
stamped_control: false
control_timeout: 0.2
control_config: [true, false, false, false, false, true]
acceleration_limits: [1 ...