Closed ywiyogo closed 3 years ago
Hi @ywiyogo , I know what the problem is.
The input of the laser scan matcher includes laser scan and odometry data. Currently, you just use the laser scanner to provide laser scan data. You may need to install the laser scanner on a mobile robot and read the odometry data from the mobile base. The odometry data is used to provide a good initial guess for current pose estimation.
Generally speaking, the TF tree should be map->odom->base_link->laser, wherein the transformation of odom->base_link is provided by a mobile platform. This repo obtains the odometry data by listening to this transformation and uses message filters to synchronize the timestamp of laser scan and odometry data.
Best,
Jian Wen
多谢 @nkuwenjian for the hint!
Since I work with RaspberryPi, I don't have any odometry data. As a workaround, I added the base_link
as the odometry frame in the launch file:
<param name="odom_frame" value="base_link" />
.
I works very well. Can I later push this new launch file to your repo for instance as rplidar.launch
?
Cheers, Yongkie
@ywiyogo ok ^_^
Hi @nkuwenjian ,
I found your repository, and thank you for your work simplifying the laser scan matching libs in one repository. I tested with my bagfile, and it works very good. However, if I cannot work directly with the laserscanner (RPlidar).
Using this modification in the launch file, I only see one update of the occupancy grid map. The scan matcher seems not working.
Could you give me a hint how to see the real time scan matching by integrating the /scan topic directly?
From the visualization of the nodes, topics and the TF tree, these are the differences:
Offline with bagfile:
Online with the laserscan: