Rosanswers logo

Hello everyone..

With the laser_scan_matcher class, I can see the movements on the rviz screen with the lidar.

Since I don't have encoder data, I want to navigate with lidar for now.

I need odometry and lidar data to be able to navigate. But since I don't have encoder data, I want to give lidar position as odometry, and I want to do navigation with lidar. How can I do that?

I mapped with gmapping.

Likewise, I saved my map with gmapping and using map_server.

Now I need to get the position of my robot with amcl, but for now I need to navigate with lidar since I don't have motors with encoder.

I have an arduino board in the system that controls the motors. and i check this board with diff_drive. ı use diff_drive ; https://github.com/jfstepha/differential-drive In summary ; I know there is good encoder data, good mapping and good lidar data for the most accurate navigation process. But for now I don't have encoder data, so I just want to navigate using gmapping and lidar ( laser_scan_matcher ).

but I don't know how to make amcl/move_base together with laser_scan_matcher.

I will be glad if you help.

Originally posted by wgsu on ROS Answers with karma: 1 on 2021-07-05

Post score: 0

Original comments

Comment by Mike Scheutzow on 2021-07-05:\

  1. Please tell us what your TF frame names are from map->base_scan.
  2. Is your map a very simple one? The standard gmapping package wants odometry and laser_scan as input. How did you provide the odometry data during gmapping?

Comment by wgsu on 2021-07-05:
Let me explain like this; I have manual encoder sensors at hand. i.e. I don't have a motor with internal encoder data.

I also added an encoder manually to go beyond this problem. These are the encoder sensors I added manually: link text

However, there were some breaks between the discs. For this reason, my encoder values ​​are wrong. For example, correct data was coming before the encoder sensors broke. I'm listening to the topic /odom now but the data is coming back wrong. For this reason, I want to act according to lidar.


1 Answer 1


Rosanswers logo

I would approach the problem like this: You need both amcl and laser_scan_matcher (lsm). I will assume that your TF tree looks like this:


You use lsm to calculate the odom->base_link transform. This means you configure the fixed_frame to "odom" and publish the time-stamped transform so that amcl can use it. If you have no sensors to help, you'll have to disable all the predictors for lsm. Configure amcl in the normal way to calculate the map->odom transform.

Originally posted by Mike Scheutzow with karma: 4903 on 2021-07-05

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by Mike Scheutzow on 2021-07-05:
It's not clear to me that there's much benefit to using the same scan data as input to both lsm and amcl. The quality of the result may be just as good if you simply use amcl and set odom->base_link transform to a constant.

Comment by wgsu on 2021-07-06:
My friend, there is one point we disagree on. If my encoder values ​​were working properly anyway, I would not be looking for such a method. I just want to temporarily navigate, at least with lsm. I will change this system when I buy a motor with encoder in the future. so I will try to navigate according to encoder data. but FOR NOW I just want to use amcl and move_base with lidar data.

I'm researching the steps I need to do for this. so I am researching which parameters should I change or set for navigation with lsm.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.