How to solve Warning with /imu_frame using robot_localization package?
Hi, I am using robot_localization package on ROS Kinetic to fuse imu data with wheel encoder odometry and generate a odometry/filtered message to navigate using AMCL for localization. My robot uses a raspberry pi 3 running Ubuntu Mate 16.04.2 and Arduino boards. It uses a Neato XV-11 Lidar for the laser scans. My launch works but the terminal does not stop to print this Warning message:
Warning: Invalid argument "/imu_frame" passed to canTransform argument source_frame in tf2 frame_ids cannot start with a '/' like:
at line 134 in /tmp/binarydeb/ros-kinetic-tf2-0.5.16/src/buffer_core.cpp
Also, in Rviz the topic /odometry/filtered got blinking errors at a rate of 4 Hz.
The Rviz error :
Transform [sender=unknown_publisher]
For frame [odom]: No transform to fixed frame [map]. TF error: [Lookup would require extrapolation into the future. Requested time 1516667536.039499044 but the latest data is at time 1516667536.027499399, when looking up transform from frame [odom] to frame [map]]
When it has no error:
Transform [sender=unknown_publisher]
Transform OK
What is the error in my application? Is there a solution to stop this warning?
Thank you! =)
I tried to upload images but I dont have points enough in ros answers.
My tf tree is:
Map -----/amcl (avg rate:4.05)-----> odom ----- /ekf_localization_node_odom2base (avg rate 49.5) ---> base_link
base_link ------- /tf_neato (avg rate:96.7) ------ > laser
base_link -------- /tf_imu (avg rate: 97.0) ---------> imu_frame
Here is the ekf_localization.yaml config file:
#2nd config for the 2nd node to make tf odom to base_link
#It is almost identical, just world_frame: odom.
#Configuration for robot odometry EKF
#
frequency: 50
two_d_mode: true
publish_tf: true
base_link_frame: base_link
odom_frame: odom
map_frame: map
world_frame: odom
#meaning_matrix_config: [ X, Y, Z,
# roll, pitch, yaw,
# X/dt, Y/dt, Z/dt,
# roll/dt, pitch/dt, yaw/dt,
# X/dt2, Z/dt2, Z/dt2]
odom0: /odom
odom0_config: [false, false, false,
false, false, false,
true, true, false,
false, false, true,
false, false, false]
odom0_differential: false
imu0: /imu
imu0_config: [false, false, false,
false, false, true,
false, false, false,
false, false, true,
true, false, false]
imu0_differential: false
Here is the terminal of my_file.launch:
... logging to /home/pi/.ros/log/a276a068-ffcc-11e7-a672-b827ebd25c92/roslaunch-pi-desktop-730.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://10.42.0.1:45873/
SUMMARY
========
PARAMETERS
* /amcl/base_frame_id: base_link
* /amcl/first_map_only: False
* /amcl/global_frame_id: map
* /amcl/gui_publish_rate: 10.0
* /amcl/kld_err: 0.01
* /amcl/kld_z: 0.99
* /amcl/laser_lambda_short: 0.1
* /amcl/laser_likelihood_max_dist: 2.0
* /amcl/laser_max_beams: 100
* /amcl/laser_max_range: -1
* /amcl/laser_min_range: -1
* /amcl/laser_model_type: likelihood_field
* /amcl/laser_sigma_hit: 0.1
* /amcl/laser_z_hit: 0.85
* /amcl/laser_z_max: 0.0
* /amcl/laser_z_rand: 0.15
* /amcl/laser_z_short: 0.0
* /amcl/max_particles: 3000
* /amcl/min_particles: 500
* /amcl/odom_alpha1: 0.1
* /amcl/odom_alpha2: 0.1
* /amcl/odom_alpha3: 0.1
* /amcl/odom_alpha4: 0.1
* /amcl/odom_alpha5: 0.1
* /amcl/odom_frame_id: odom
* /amcl/odom_model_type: diff
* /amcl/recovery_alpha_fast: 0.0
* /amcl/recovery_alpha_slow: 0.0
* /amcl/resample_interval: 1
* /amcl/save_pose_rate: 0 ...