slam.net icon indicating copy to clipboard operation
slam.net copied to clipboard

How to use in robot

Open FireSon opened this issue 1 year ago • 2 comments

Hi Mikki, As a c# programmer looking for a way to navigate my robot I found your repository. Unfortunately I do not have much experience with slam and navigating robots, so I was wondering if the source code of your robot is also available somewhere? It would be nice to know how slam is used by the robot and how you would update the map with lidar information and how you calculate the position of the robot after driving. I am looking to use it for a lawnmower where the map can basically be fixed, use a mowing pattern en move the mower over the map and stop at the edges of the lawn. How would you for instance handle the navigation if for instance something was left on the lawn which would not be on the map, and use the map for object avoidance. Noidea if that is something your robot handles as well... Hope to hear from you! Regards, Jan

FireSon avatar Sep 03 '22 16:09 FireSon

Hi @FireSon The thing is that I don't yet want to publish the whole robot code because it is a competition robot and that would give away the advantage. That competition was put on hold during covid times and I don't know if it will continue, so I wait a bit. Generally speaking - if you are still learning, you would be safer to pick some robotic navigation platform or library because they have examples and support. Downside is a steep learning curve, but understanding some other guy code has also a learning curve :) Anyway, most known robotic platform is ROS: https://www.ros.org Have you had look at it?

Now, to your application: SLAM stands for simultaneous localization and mapping. As I understand you do mapping once and then 99% of time you localize. It makes me think it's not the most efficient solution. If lawn is bumpy and is surrounded by plants with leaves, then lidar may get quite bad measurements. Lidar may not work under bright sunlight also. Maybe you should look at GPS-RTK instead? It is a precise positioning technology. You could draw your lawn area over geographical map and tell the robot to stay within that area. This is how many commercial lawnmowers work. Then you can use lidar for simple obstacle detection and avoidance. It doesn't even need to be scanning lidar - you can use a few forward looking lidars or ultrasonic sensors.

mikkleini avatar Sep 04 '22 07:09 mikkleini

Hi Mikki, Thanks for the quick and extensive response, much appreciated! You make me curious as to which type of contest your robot is participating in! Very interesting :-) and I understand that you cannot share the code!

I know what slam is, watched multiple ROS & ROS2 video's, and I am aware of the GPS-RTK way of navigating. Beside the costs of GPS-RTK, my garden also has multiple trees and very small corridors where navigation with GPS is probably difficult. There are also many 'side obstacles' like small walls with 90 degree angles where navigating with a lidar makes more sense. I also would like to use a (depth) camera in order to detect the edge of the lawn. The mower is also equipped with a gyroscoop, which I would like to use for filtering/correcting the lidar. Every time the mower starts, it would drive around the lawn by using odometry, the camera and lidar in order to 'validate' the map and the edge of the lawn. Once the perimeter has been set, the mower should drive in a pattern to cover all the inside of the lawn by using the map and use a compass (and lidar) for a straight line. Since the perimeter has already been mowed, the remaining accuracy of this pattern around the edge would be 20 cm. Since I do not have any 'real life' experience, I still have some hope that the odometry, camera and lidar would be sufficient for navigating. The lidar I have is a LD06 which works pretty well. How well it works in my garden I will test in the next weeks, I just did my first driving test yesterday. There are multiple fixed object in my garden which could be used with the lidar and do some triangulation to determine the position of the mower. Also the camera could identify the position by recognising characteristic elements in the garden. Well if your code comes available I would like to have a look at it. Also if you have some pointers with your experience as to navigating a robot please let me know 👍

FireSon avatar Sep 05 '22 07:09 FireSon