Launching a preloaded map in RViz along with Hector SLAM and RPLidar gives different coordinates each time.

asked 2021-12-30 06:29:15 -0600

androadi gravatar image

updated 2021-12-30 06:30:54 -0600

I have run Hector SLAM tutorial launch file along with RPLidar launch file as is normal to form the map initially, and I save it using map_server. I also record the topic /poseupdate using rosbag and convert it into CSV file. The field pose pose position x and field pose pose position y are what I assume to be the 2D coordinates x and y on the map. Later, having the RPLidar at the same exact location, I load the saved map using map_server and launch the two files mentioned above. I record the /poseupdate topic again and convert it into csv file. The x and y values do not match at all. I ran the setup using the same map and starting at the same place several times and each time the values I get are completely unrelated to any of the set of values that I got before.

Are my assumptions right on how I get the coordinate values? How do I get to have a map with a constant set of coordinates that I can use later?

My setup: I am trying to create an AGV (Automated Guided Vehicle). I am using a Raspberry Pi 4b (4 GB) with Ubuntu 18.04 and ROS Melodic, and I am primarily operating the Pi via SSH on my PC. The RPLidar is connected to the Pi via the USB breakout board that comes with it. My PC has Ubuntu 20.04 and ROS Noetic. The Raspberry Pi is the master on ROS network and my PC is subscribed to it.

edit retag flag offensive close merge delete