Trouble about using robot_localization package [closed]
Hi, I‘m doing a robot using GPS navigation. So I use the robot_localization package to fuse IMU and GPS data. But the topic odometry/gps
's output was like this and never change even the robot is moving
header:
seq: 173
stamp:
secs: 2785
nsecs: 800000000
frame_id: "odom"
child_frame_id: ''
pose:
pose:
position:
x: -0.0005534869851544499
y: 0.0020810341835022e-05
z: 0.0
orientation:
x: 0.0
y: 0.0
z: 0.0
w: 1.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]
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]
And there is a warning when starting the navsat_transform_node Transform from imu_link to base_link was unavailable for the time requested.
launch file is here
<launch>
<!-- Transforms -->
<node pkg="tf" type="static_transform_publisher"
name="gps_transform"
args="0 0 0 0 0 0 base_link gps_link 10" />
<node pkg="tf" type="static_transform_publisher"
name="imu_transform"
args="0 0 0 0 0 0 base_link imu_link 10" />
<!-- Navsat Transform -->
<node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform_node" respawn="true" clear_params="true">
<param name="magnetic_declination_radians" value="0"/>
<param name="yaw_offset" value="0"/>
<param name="zero_altitude" value="true"/>
<param name="use_odometry_yaw" value="false"/>
<param name="wait_for_datum" value="false"/>
<param name="publish_filtered_gps" value="true"/>
<param name="broadcast_cartesian_transform" value="false"/>
<remap from="/imu/data" to="/imu/data" />
<remap from="/gps/fix" to="/gps/fix" />
<remap from="/odometry/filtered" to="/odometry/filtered" />
</node>
<!-- EKF Node -->
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization_with_gps">
<rosparam command="load" file="$(find my_simulator)/config/gps_localization_config.yaml" />
</node>
</launch>
gps_localization_config.yaml
# GPS and IMU Localization
frequency: 30
sensor_timeout: 0.1
two_d_mode: true
transform_time_offset: 0.0
transform_timeout: 0.0
print_diagnostics: true
debug: false
publish_tf: true
publish_acceleration: false
map_frame: map # Defaults to "map" if unspecified
odom_frame: odom # Defaults to "odom" if unspecified
base_link_frame: base_link # Defaults to "base_link" if unspecified
world_frame: odom # Defaults to the value of odom_frame if unspecified
odom0: /odometry/gps
odom0_config: [true, true, false,
false, false, false,
false, false, false,
false, false, true,
false, false, false]
odom0_queue_size: 10
odom0_nodelay: false
odom0_differential: false ...