Why is my odometry bad in rviz?
Hi, i am beginner to ROS, i have tested turtlebot 3 waffle robot in the real environment with rviz and SLAM and i found out that the odometry is not correct as i start to move or rotate with the turtlebot. For example, as i turn 90 degrees, in rviz it looks like i turned by almost 180 degrees. The accuracy is also getting worse as i continue to move or rotate.
Here it is how it looks: rviz printscreen Is it possible it has someting to do with the robot xacro file?
I am also getting a warning in the slam log but i cant fix it, i tried sudo ntpdate ntp.ubuntu.com both on remote pc and turtlebot but that didnt help and i think this warning could be the source of my problem.
There is no such problem in the gazebo simulated environment.
Do you have any ideas what can be the source of the problem? Thanks for helping.
SUMMARY
========
PARAMETERS
* /robot_description: <?xml version="1....
* /robot_state_publisher/publish_frequency: 50.0
* /robot_state_publisher/tf_prefix:
* /rosdistro: kinetic
* /rosversion: 1.12.14
* /turtlebot3_slam_gmapping/angularUpdate: 0.1
* /turtlebot3_slam_gmapping/astep: 0.05
* /turtlebot3_slam_gmapping/base_frame: base_footprint
* /turtlebot3_slam_gmapping/delta: 0.05
* /turtlebot3_slam_gmapping/iterations: 5
* /turtlebot3_slam_gmapping/kernelSize: 1
* /turtlebot3_slam_gmapping/lasamplerange: 0.005
* /turtlebot3_slam_gmapping/lasamplestep: 0.005
* /turtlebot3_slam_gmapping/linearUpdate: 1.0
* /turtlebot3_slam_gmapping/llsamplerange: 0.01
* /turtlebot3_slam_gmapping/llsamplestep: 0.01
* /turtlebot3_slam_gmapping/lsigma: 0.075
* /turtlebot3_slam_gmapping/lskip: 0
* /turtlebot3_slam_gmapping/lstep: 0.05
* /turtlebot3_slam_gmapping/map_frame: map
* /turtlebot3_slam_gmapping/map_update_interval: 0.1
* /turtlebot3_slam_gmapping/maxUrange: 3.0
* /turtlebot3_slam_gmapping/minimumScore: 50
* /turtlebot3_slam_gmapping/odom_frame: odom
* /turtlebot3_slam_gmapping/ogain: 3.0
* /turtlebot3_slam_gmapping/particles: 100
* /turtlebot3_slam_gmapping/resampleThreshold: 0.5
* /turtlebot3_slam_gmapping/sigma: 0.05
* /turtlebot3_slam_gmapping/srr: 0.1
* /turtlebot3_slam_gmapping/srt: 0.2
* /turtlebot3_slam_gmapping/str: 0.1
* /turtlebot3_slam_gmapping/stt: 0.2
* /turtlebot3_slam_gmapping/temporalUpdate: 0.5
* /turtlebot3_slam_gmapping/xmax: 10.0
* /turtlebot3_slam_gmapping/xmin: -10.0
* /turtlebot3_slam_gmapping/ymax: 10.0
* /turtlebot3_slam_gmapping/ymin: -10.0
NODES
/
robot_state_publisher (robot_state_publisher/robot_state_publisher)
rviz (rviz/rviz)
turtlebot3_slam_gmapping (gmapping/slam_gmapping)
ROS_MASTER_URI=http://192.168.1.24:11311
process[robot_state_publisher-1]: started with pid [17031]
process[turtlebot3_slam_gmapping-2]: started with pid [17032]
process[rviz-3]: started with pid [17038]
[ WARN] [1575379615.634309792]: Failed to compute laser pose, aborting initialization (Lookup would require extrapolation into the future. Requested time 1575379615.601603224 but the latest data is at time 1575379615.584323987, when looking up transform from frame [odom] to frame [base_footprint])
[ INFO] [1575379623.861870888]: Laser is mounted upwards.
-maxUrange 3 -maxUrange 3.49 -sigma 0.05 -kernelSize 1 -lstep 0.05 -lobsGain 3 -astep 0.05
-srr 0.1 -srt 0.2 -str 0.1 -stt 0.2
-linearUpdate 1 -angularUpdate 0.1 -resampleThreshold 0.5
-xmin -10 -xmax 10 -ymin -10 -ymax 10 -delta 0.05 -particles 100
[ INFO] [1575379623.869339879]: Initialization complete
update frame 0
update ld=0 ad=0
Laser Pose= 0 0 -3.14159
m_count 0
Registering First Scan
update frame 3
update ld=0 ad=0
Laser Pose= 0 0 -3.14159
what is your global frame in RVIZ set to?
@billy my global frame is set to /map
Likely wheel slip on a dirty floor. Try driving slower, so you dont slip as much and maybe clean your wheels. The laser warning is probably just due to computational overhead slowing your machine down a bit. What is your setup what are you trying to do?