Programming a LIDAR onto your computer's mouse pointer to help it map-out an unstructured environment
You can use a code editor of your choice, but I personally find PyCharm very user friendly and easy to use.
- Download the tarball .tar.gz from Here
- Extract the tarball to a directory that supports file execution.For example, if the downloaded version is 1.17.7391, you can extract it to the recommended /opt directory using the following command:
sudo tar -xzf jetbrains-toolbox-1.17.7391.tar.gz -C /
- Switch to the bin subdirectory:
cd /opt/pycharm-*/bin
- Run pycharm.sh from the bin subdirectory:
./pycharm.sh
- Go to your workspace (any folder where you which to maintain this code)
- Open terminal at that location (Right-Click -> Open in Terminal)
- Clone the repostory by pasting the following into the opened terminal:
git clone "https://github.com/PulkitRustagi/Lidar-based-Mapping.git"
- Open terminal (using
Ctrl+Alt+T
) - start PyCharm:
~<path_to_PyCharm_folder>/bin/pycharm.sh
- Open
main.py
script and run to obtain the following output (default map1.png):
- Draw your own map in paint or photoshopor simply download an image that has a white background with black lines on it.
- Save it as a
.png
file in themaps
folder in the workspace. - Go to
env.py
script and change the map name to your newly added map online 9
as shown: - Change the dimensions of the map to the dimennsions of your map image, for example if image is 1200 x 600 pixels, then go in
main.py
toline 8
and change accrodingle as shown(in the order (width,height)) as shown: - Now you should be able to do this for your own custom map when you run
main.py
script