Arrows are in a wrong direction when showing odometry/filtered
I am using the robot localization node to fuse IMU and GPS data. When I view odometry/filtered in RVIZ in the odom frame the arrows don't point to direction of movement,but perpendicular to.the movement. What's wrong with it? Besides, when EKF node gets data from GPS, the odometry/filtered jumps discretely. Anyone had this problem before? Seems like I'm missing something simple. Thanks in advance.
Launch file:
<launch>
<rosparam command="load" file="$(find robot_localization)/params/sensor_fusion.yaml" />
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_se_map" clear_params="true">
</node>
<node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform" clear_params="true">
</node>
</launch>
yaml file:
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: false
#debug_out_file: /home/jiang/catkin_ws/src/robot_localization/params/debug.txt
#map_frame: map
odom_frame: odom
base_link_frame: base_link
world_frame: odom
odom0: odometry/gps
odom0_config: [true, true, false,
false, false, false,
false, false, false,
false, false, false,
false, false, false]
odom0_queue_size: 10
odom0_nodelay: false
odom0_differential: false
odom0_relative: false
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: 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,
0, 0, 1e-9, 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 ...
I don't see a screenshot; maybe it didn't attach correctly. And can we see your EKF, IMU, and GPS configurations?
In my exerience, depending on which IMU and GPS you have, they don't necessarily produce output in the same coordinate frame. And are you using a navsat_transform_node?
Sounds like you haven't set it up properly - if you add more information (screenshots, your r_l config file, and example messages from your IMU & GPS) that would help with debugging.
@harry jiang: you didn't have enough karma to attach images. I've fixed that for you. You should now be able to attach your screenshot.
Don't use image hosting websites for this. It is not needed.
@mogumbo: I add the screenshoot now. I use mpu6050 and neo-7m and by rosserial to publish the IMU and GPS topics. I run one kf_localization_node and one navsat_transform_node to fuse IMU and GPS. I set all frame_id of GPS and IMU to "base_link" when I don't need to tf.
@gvdhoorn: Thanks, and I also want to add my yaml file but I don't know how to do that...
just copy-paste the contents it into your question. There is no need to attach it, as it is just text.
After you've pasted, make sure to select all the text and press the Preformatted Text button though. It's the ..
.. the one with
101010
on it.That will make sure the yaml renders correctly.
Alternatively, you could press
ctrl+k
after selecting the text.@gvdhoorn: thanks a lot!!!