pythonroslidarslam

Lidar data Graph


SLAM Using RpLiDar and ROS

Hello, I have a table with two columns [Degrees, Distance] and I need to display that info to make a map around my position. Anyone knows a good way to do that, for example every time im in the center and i detect that at 90 degrees is something so i print a dot there.

Im using Ubuntu 18.04 LTS, Python 2.7.15, ROS melodic and RpLidar A2M8

Edit

ax = fig.add_subplot(111, projection="polar")
    ax.scatter(infAng,infDist)
    plt.show()

Im using this to plot my polar coordinate table, but i dont know how to graph this in real time


Solution

  • Your aim is to visualize SLAM and therefore, i assume you want to visualize the particle clouds in real time. The lidar you specify can measure 8000 particles per second. This is not very low and hard to plot with typical python modules such as Matplotlib.

    There are several options to which you can refer to:

    If you want to stick to python, then you can use Mayavi, which is faster compared to Matplotlib. You can find an example repository developed for visualizing KITTI Dataset Lidar data here.