RPLidar to scan to pointcloud

Hi all

I have bought a RPLidar m8, All i want to do is to create a 2d point cloud to determine the GLS and to get the measurements
of buildings, interior only,
What software can read the RPLidar and save as a xyz or las file
I tried hector slam but i can’t seem to get it working
Any ideas and help will be appreciated

Hello @Brian1984 !

Welcome to the forum. I haven’t worked with Lidars but, I’ll let you here some material to interface it with ROS and do the 2D mapping:

I hope this could help you :grin:

1 Like

Good day
Thank you for the reply.
The software you sent the video on will work, but I’m struggling to find the setup file
to download, or is the a special way to get the software?

Regards

Hello @Brian1984 !

Did you check the github account inside the video? https://github.com/robopeak/rplidar_ros

Hope this could help you :grin:

1 Like

Good day

I managed to get rviz working on win 10

But how do i get the rplidar connected to read points and display then in rviz

my com port is com3, ros comes standard with com 1131 i think, how do i change it in ros?

I’ve looked all over the internet but most of this is still very new.

Also when i have the lidar connected is there a way to export the points to las or xyz format

Help will be much appreciated

This is the message i get with the command:
roslaunch rplidar_ros view_rplidar.launch and
roslaunch rplidar_ros rplidar.launch

Hello @Brian1984 !

You should check that the .launch file is inside the launch folder that should be inside the rplidar_ros package. Could you send me the package repository for review please?

Are you connecting the lidar via USB to the computer? To find out which port you are using and then tell the script which port to listen to, check the following material.

1 Like

Good day

After the whole day i managed to get to how it comes together
what i don’t get is to create a catkin work space and to clone the rplidar_ros-master file
so that ros can actually run it.

How do get the package repository?

I am connecting via usb,
sorry I’m new to this, I might ask some stupid questions.

Hi @Brian1984 !

Well, you’re in the right place then.
The first thing is to create the workspace, basically it’s a folder where you’ll store your whole project. Initially, you create the folder with a called “src”, inside it you will initialize all the others using “catkin_make”.
Once you have this ready you can add or create your own packages. These go inside the “src” folder. To clone repositories to your project, you position yourself inside “src” and use some command like “git clone https://github.com/Slamtec/rplidar_ros”. Once this is done, you must perform the “catkin_make” again. This is for ROS to find and relate your packages to your workspace. These packages probably require dependencies that you need to install.

Visit following Website for more details about RPLIDAR:

If you have any other questions, you can ask.

Hi
Sorry for being a pain.

Please see attached screenshots of what i encounter.
I might miss something or I’m doing something wrong.
Do you maybe know if ubuntu is easier to use, but will it take the same amount of data to download ros on windows. Maybe it’ll be better to switch.

Of course, working with ROS at ubuntu will always be much better. As far as I can see you have an error in the directories, you should check the steps of creating folders (workspace). Try to follow these steps in ubuntu and tell me how you’re doing.

Good day

I have installed Ubuntu, having ros running and i get rviz going
BUT now i can’t seem to give permission to read the rplidar


Please give advise.
Are there any complete tutorials on doing rplidar on ros?

Regards

Hi !

As I told you before, every time you add a package to the “src” folder, you need to go back to the main directory and run:

catkin_make

In this way, ROS will know where these packages are and you will be able to use them. Similarly, if you have permission problems working with the port, try the following:

sudo chmod 666 /dev/ttyUSB0

If you want a tutorial, then follow the example in the link I gave you before: https://github.com/robopeak/rplidar_ros/wiki

Good day

Ok i got it working, can see points in rviz
But when trying to run slam i get the following error attached screenshot
It’s still a bit greek but getting there

Any advise?

Thank you for your patience

What command are you running and in what order?

Good day
I do as follows:

cd ~/catkin_ws
devel/setup.bash
sudo chmod 666 /dev/ttyUSB0
launch hector_slam_launch tutorial.launch
or
cd ~/catkin_ws
devel/setup.bash

sudo chmod 666 /dev/ttyUSB0
launch hector_slam_launch tutorial.launch

Okay, let’s do some basic testing, the error says it’s not detecting your packages.
First, make sure you compile the whole project:

cd ~/catkin_ws
catkin_make

Then, pay attention to the way you write commands, you must use this command to locate nodes inside the packets and run them in the terminal:

roslaunch

Third, let’s check through a simple TAB whether ROS can detect the commands (don’t forget to source each terminal or add the command line to your ./.bashrc):

echo “source ~/catkin_ws/devel/setup.bash” >> ~/.bashrc (With this command you won’t have to place it on every terminal you open).
roslaunch
roslaunch hector_

Now press TAB TAB, if everything works, the terminal should complete the package name

roslaunch hector_slam_launch tut

Now press TAB TAB, if everything works, the terminal should fill in the name of the launcher automatically. Once it is complete, you can press ENTER and verify that everything runs normally.

Let me know if this helps,

Greetings.
Carlos.

Good day

I’ve re installed everything, i can launch Hector Slam ,
no errors but the only thing this pops up and is showing no map on Hector slam

any ideas?

regards
Brian

Hello @Brian1984 !

Great to hear that, for that specific error, please check this.

Hope this could help you!

I would like to thank you for such an opportunity letting me to leave a short answer. You need to clearly understand that www.customcollegeessays.com/university-essays is what is needed for your blog!