Amcl not working with a predefined map.

asked 2023-04-20 09:29:22 -0500

liam913 gravatar image

updated 2023-04-26 13:27:52 -0500

For context, we are using ROS and RViz for my senior capstone to have a robot autonomously draw. The wheels are being driven by a hard-coded Python script or by robot steering. We are using the RPLIDAR AM18 that is mounted on our robot. We are able to produce a point cloud scan that matches the png image of our real world map near perfect.

The goal for the robot is to have perfect autonomous drawing. It drives with the motors and then there is a servo motor that deploys a pen. As of now, it works great besides AMCL not working properly.

The issue we are facing is that the AMCL is not able to recognize the predefined map. Even when we line the two up it still does not recognize it. We have ensured that that the map and the point cloud are on the same Z-axis. We are unsure what to do now and have tried a variety of ways to attempt to fix it. We do not know if it is a transform error, an odometry error, or an error in one of the config files for either AMCL or the map.

To add, when we drive with robot steering we noticed some issues. When we drive the robot linearly (back and forth), it moves through the point cloud very well, meaning the point cloud stays put while the robot moves in RViz. However, when we turn the robot, the point cloud also spins with it, which should not be happening.

We are somewhat new to ROS so we were wondering if anyone had any input. Message me if you need any files or screenshots.

EDIT: Tried hector_slam instead and it worked.

edit retag flag offensive close merge delete