odom drifting the base_link

asked 2022-08-19 16:59:30 -0500

iimata gravatar image

updated 2022-08-19 17:06:33 -0500

i have a simple robot with a map=>odom=>base_link=>(Wheels & Sensors links)TF

im trying to publish the encoder data from odom to base_link

and im using slam_gmapping with these params

<arg name="scan_topic"  default="scan" />
  <arg name="base_frame"  default="lidar_link"/>
  <arg name="odom_frame"  default="odom"/>

  <node pkg="tf" type="static_transform_publisher" name="laser_transform" args="0 0 0.3 0 0 0 /base_link /lidar_link 100"/>


i know i have problems with the TF but i cant locate it

any suggestions and i appreciate any help<3

((robot TF))

edit retag flag offensive close merge delete


I think the LiDAR may be installed in the wrong direction. Why don't you try physically changing it first and see if it makes a difference?

miura gravatar image miura  ( 2022-08-20 07:37:49 -0500 )edit

can u justfiy more <3

im getting this message actually ::: Message Filter dropping message: frame 'lidar_link' at time 1661008421.287 for reason 'discarding message because the queue is full'

iimata gravatar image iimata  ( 2022-08-20 10:15:12 -0500 )edit

I'm not sure, but if I were you, I would first comment <arg name="base_frame" default="lidar_link"/> and see what happens if you use the default base_link.

ref: http://wiki.ros.org/gmapping?distro=n...

miura gravatar image miura  ( 2022-08-21 07:29:10 -0500 )edit

According to the http://wiki.ros.org/gmapping page, you must generate the odom->base_link transform. You need to do this multiple times per second. Section 2 on that page says:

"To use slam_gmapping, you need a mobile robot that provides odometry data and is equipped with a horizontally-mounted, fixed, laser range-finder."

How are you publishing the odom->base_link transform data?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-08-21 08:34:53 -0500 )edit

@Mike Scheutzow im publishing odom =>base_link using this tutorial with rosserial arduino look at line 45-55

iimata gravatar image iimata  ( 2022-08-21 09:07:15 -0500 )edit

@miura i changed it to base_link and im stll getting the same issue

iimata gravatar image iimata  ( 2022-08-21 09:12:11 -0500 )edit

like i said in #q405280 i saw that there are a different in the average rate between map and odom i dont know actually if this causes the drifting

iimata gravatar image iimata  ( 2022-08-21 09:19:14 -0500 )edit

@iimata The tutorial code you link to is only the last part of the story. Where do you get the vx, vy, vth inputs from? What sensor are you using to measure the robot's actual movement?

If your robot has wheel encoder sensors, then the usual approach is to read the amount of wheel rotation, then use that data to calculate the robot's current Twist.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-08-21 12:12:32 -0500 )edit