The Main Goal

The robot mower project has been frustrating lately. I find myself working on problems that are easy to solve but ultimately unimportant. Like balancing the mower blades.

Problems like these are easy to focus on because solving them creates the illusion of progress. But in the big scheme of things, they’re peripheral to the main goal of the mower project: how do we make an autonomous robot lawn mower?

The robot I’ve built cuts grass autonomously if it has a clear view of the sky. It relies entirely on RTK GNSS to know where it’s at. If you put it under the maple tree in my front lawn, it will lose the RTK fix, and as it exists today, the robot can’t mow my lawn autonomously. So there remains work to do to achieve the primary goal of the mower project.

The robot needs another way to know its position when RTK GNSS isn’t available. That positioning method needs to be at least as accurate as the RTK GNSS position. There are a few ways this could be accomplished.

It’s possible we could rely on wheel encoders and the Pixhawk IMU to estimate the robot’s position by dead reckoning until we reestablish an RTK fix. But the longer you go without an RTK fix, the greater the position drift you’ll have to reconcile once you do reestablish the robot’s actual position.

You could minimize the drift by using some kind of visual odometry with a very high quality IMU. But this only conceals the underlying problem: you still don’t exactly know where the robot is at, and you don’t know when in the future you’ll rediscover its location with a new RTK fix.

Other solutions like LIDAR or depth sensing cameras require a companion computer to analyze the sensor data and send position estimates to the Ardupilot software. Which puts me at a big crossroad.

I’ve really enjoyed running Ardupilot on the Pixhawk due to its simplicity. But adding a companion computer complicates things greatly. If I’m going to be using ROS on the companion computer to do SLAM and send position estimates to Ardupilot, isn’t that just using ROS, but with more steps? I might as well just jump headfirst into trying to figure out ROS if that’s the choice I’m faced with.

The learning curve with Ardupilot was steep, but the learning curve with ROS appears almost insurmountable to me as a mechanical engineer. The upside, though, is that there are some things that you can only do with ROS at the moment, like using LIDAR for position estimation and integrating a depth sensing camera. So the education investment appears worthwhile.

From my cursory research, it appears that a 360° LIDAR sensor would complement the RTK GNSS positioning method very well. When something occludes the robot’s view of the sky, chances are it will be detectable on the LIDAR.

I haven’t even started considering obstacle avoidance. This is something else that ROS also seems to have more capability for than Ardupilot. But that’s a can of worms for another day. Let’s build a robot that can actually mow my lawn before we worry about crashing into my sprinkler system well again.

Can anyone speak to the accuracy of these thoughts? Any ROS users out there willing to chime in?

6 thoughts on “The Main Goal

  1. You’re correct that you’ve probably hit the limit of ardupilot+pixhawk and should bite the bullet and transition to ROS immediately. A 360 lidar will give you easy SLAM and obstacle avoidance with ROS at a decent price, but I would also consider depth cameras like Intel D435i, or even IR cameras like Flir. Many of the cameras come with neural nets out of the box for human detection. For just localization supplementation, look at “tracking” cameras like RealSense T265 (basically built-in visual SLAM.) You’ll also need more compute for these more advanced sensors – something like a Jetson Xavier NX, which is basically made for autonomous vehicles. Look at the MIT RACECARS project for a starting point. Good luck!

    Like

    1. Thanks for the feedback, Dan.

      Do you have any experience using the Intel RealSense T265? I’ve considered it in the past for this project. I like the concept: a black box that gives you position based on imagery. However, I’m concerned that it won’t work all that great outdoors, and that it won’t provide the accuracy I’m after even if it does work outside. Can you speak to these concerns?

      Like

  2. Hi,
    I also built my own mower robot (and it works), but I did not face the same issue.

    Even when my robot is under trees it does not lose RTK fixes, thanks to 2 things I took care about:
    – I am using a good RTK antenna, so a big one (14cm diameter) with low noise figure preamplifiers (<1.5dB).With this antenna I can tolerate a few dB attenuation. If I remember well yours is a smaller antenna, so probably less efficient.
    – I am using the 4 satellite constellations in order to have many satellites with many different angles of view. So I can lose some of them under a tree, but still keep other ones just over the horizon.

    You can also use IMU to keep heading well on a few meters using gyros and accel (it works, I tried it, but you have to build a very precise control loop to avoid drifts at any time; you can achieve mean drift as low as 5cm after 10m). But it is difficult to measure a very precise heading value with magnetometers to correct drifts, in particular with electrical motors working nearby (difficult but achievable with a lot of compensations). Iron parts are also bad for magnetometers, so my mower has few metal and no iron (except the motors themselves of course).

    Sorry for my english, but I'm french!

    Pierre

    Like

    1. I wouldn’t have known you weren’t a native English speaker had you not told me, Pierre!

      I agree about the magnetometer. They cause more issues than they solve in my opinion, at least with the type of robot I’m building. The motors create too much interference for them to be useful.

      What kind of GNSS antenna are you using? I’ve been wondering how much performance improvement I could get by using a better antenna. I might have to give that a try.

      I’ll have to do some “dead reckoning” testing to prove whether or not what I’ve written in this post is actually true. It’s not something I’ve actually tested. I might be surprised!

      Like

  3. Hi,
    I found my antennas (and my ZED-F9P mounted on arduino boards) on ardusimple site https://www.ardusimple.com/product/survey-gnss-multiband-antenna/
    These products are very impressive at reasonnable price.
    Before using RTK my robot was working only with IMU (to follow parallel tracks) and an underground surrounding wire. So I can tell you it is achievable to follow one direction for 10 or 20 meters only with an IMU, but you will need a good control loop (because drifts are the sum of every moment deviation). In particular you will need to measure and compensate for lateral slopes (even gentle) in order to keep your average error to zero.
    This kind of project is very interesting, but not that easy…

    Pierre

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s