Autopilot RC Rover Track & Field Pacer


I am a Computer science student and track athlete specializing in distance races and have nobody to race because of COVID for awhile. Solo races suck, so I’ve been thinking about a way to make a pacebot from an off-the-shelf RC Car. I was directed here from an RC forum. Here’s that thread if you’re interested.

My plan is to use the PixHawk 4 to control some off-the-shelf RC Car, and write a Mission to run the car around the 400m track at a fixed speed around 20 kph. Doing this for 12.5 laps results in a 15:00 5k. I’m still fuzzy on how exactly I can achieve this kind of bot control. I would really appreciate it if you could point out where I may be going wrong.

  1. Components
    Raspberry Pi x2 ( Have already )

Transmitter $180

Line Sensors: 10$…/dp/B07S612KT1

Off-The-Shelf RC Truck $100

GPS Addition for PixHawk AutoPilot $42…o-m8n-gps.html

  1. Create Mission either with GPS or setup mission to respond to arudino/raspberry pi sensors ( line sensors or position sensors )
  2. Load Firmware into Pixhawk via laptop with Mission Planning software
  3. Bind Pixhawk to RC Car Receiver (not sure exactly how this works)
  4. Start Mission once Car is placed on starting line
  5. Try not to step on the Bot while running

Pixhawk may not bind with off-the-shelf RC cars
GPS may be too imprecise for a small area ( Tracks are approximately 80m x 130m)
Line sensor control does not keep up at speeds around 20 kph
Using a Pre-programmed path without line sensors or GPS may have the car gradually (or not gradually) drift off course each lap even with periodic distance sensors placed around the track to
keep it in line.

Track and Rover

Thanks for any help!

It’s straight forward to add a Flight Controller to an off-the shelf RC vehicle, I have done a couple. You don’t need a Raspberry Pi, this is basic functionality for ArduRover.The Pixhawk 4 will be too large for that vehicle and you may want a better quality vehicle. You don’t need to spend $180 on a Transmitter.

I use Pixracers on Rovers but any of the F4/F7 boards supported are fine for a Rover. These are $50 or less. A GPS module and the RC System and you could be running. Whether standard GPS will keep the vehicle within the track is questionable as the GPS signal on the ground isn’t great but it might be OK. Worth a try before spending money on an alternative system. RTK GPS would be the best choice for this but expensive.

My current driver is a Redcat Racing Gen7 Crawler. It will do 20kph but a Basher type 2wd may be better suited for what you are doing. A $100 vehicle though won’t last.

I have several tracks by me maybe I’ll get the rover out, plan a mission and see how it does :slight_smile:

1 Like

Thanks for saving me a lot of trouble buying nonideal parts. Is $200-250 the range where an RC Vehichle will last a good deal longer?

Do you mean Pixracer like this?
I’m having a lot of trouble finding them for sale online.

You’re definitely right that a good GPS system is expensive. $95 - 2.5m Resolution $275 - 2.5cm Resolution RTK

Cool, let me know if you end up doing that and how it goes.

Yes, that’s the right price range.

I wouldn’t buy that knock-off PixRacer. A better choice would be a Kakute F7 AIO. Everything you need is integrated and it’s small. A bunch of soldering required with these but that’s the hobby.

I’m going to try this Mission at the closest track with not much activity. Should be interesting. Experimenting is what this Rover was built for :grinning:

This is the Rover BTW. I have since added a camera and a 2W VTX for FPV driving just for fun:

Awesome. I’m looking forward to learn how it goes for you :smile: Thanks for the suggestion with the transmitter. That one definitely looks much less sketchy.
I only took the one Electrical Engineering course, so I don’t have any experience soldering. It looks straightforward on all the videos I’ve watched of it, but is there an alternative like breadboards and/or alligator clamps? Was it pretty easy to get started with soldering?

All you need is a steady hand and some practice (before starting in the actual board) and maybe a few more YT videos to get the hang of it.
And lastly, buy yourself a good soldering station, it shall make the difference

1 Like

You will really have to do some soldering in this hobby. There are Flight Controllers with connectors and associated cabling with mating connectors but it’s almost always required to extend or shorten some leads and twisted wires and electrical tape just won’t cut it. What doesn’t work:
Twisted wires w/o solder
Wire nuts
Screw terminal boards
Alligator clips (definitely not)

It’s not difficult to solder but practice is required. get a 60W iron, some small diamter 63/37 (what I lke) solder, a flux pen and a tip cleaner (wet sponge or coiled brass). Solder wick will come in handy until you get the hang of it after you bridge a bunch of small pins and go crazy trying to clear them :grinning:

I’m hoping to get to the track this afternoon. I did some driving around the yard yesterday and 5.6 m/s is pretty fast for this vehicle. It will do it but not sure if will stay on the track. I’ll start at 1/2 that speed and see how she does. Should be fun! The last time I had the Rover out was after I put the FPV gear on it and annoyed the neighbors, and their dogs, during our lock down…

Well Jason this was quite a fun experiment. Staying on the track was not a problem at all but as you will see there is a speed penalty. I’m not sure if it’s because of GPS position update or because the Waypoints as they are approached at speed slow the vehicle down. The result is 10kph is rock solid, 20kph, which it didn’t quite reach, it’s slowing down and speeding up approaching and leaving waypoints. I’ll look into this further as maybe there is improvement to be made. Unfortunately we don;'t have Spline Wayponts as we do in Copter, I think it could be a huge improvement.

But here is the data:
10kph KMZ (this is impressive):

10kph Mission Planner (note the speed):

20kph KMZ (still impressive):

20kph Mission Planner (the speed problem is realized):

1 Like

That’s so cool. Thanks for testing it out. Too bad that it starts to mess up at the required speeds. I wonder if a higher resolution GPS system would work better or if there is way to completely fix the throttle at a certain speed regardless of the waypoints or maybe use less waypoints at the expense of the car bouncing around between the lanes on the curves. What GPS system did you use on your redcat for the track today?

Maybe I have to give on the RC Car and just save for a drone instead. This kind of a thing would be pretty simple for a copter with autopilot then right? Are there good drones that hold 20kph for 15 minutes straight? I guess I’d have to go do some research on that. It would still be sooo much cooler for the system to be an RC Car.

No way to fix the speed accurately really it’s dependent on several factors. Multi rotors do the same thing but with Spline Waypoints it’s much smoother. I could run a multirotor around the track, I have a few of those. Less Waypoints might help but you need them to stay in the lane. If I ran 10 laps of the track you would see what I mean. I can run a Mission around my house one day and the next day it hits the car, a bush or the house. Standard GPS on the ground isn’t that good. The GPS is a M8N which is typical in the hobby.

Back to the multirotor. I have one that would easily do 20kph (much faster actually) and run for ~30 minutes but it’s a pretty large quad. And I’m not sure I would want to be running under it. A smaller one I have will go faster yet but only run for ~12 minutes.

You could try WP_SPEED_MIN set to WP_SPEED set to your target pace. However, there is a bug in the code that makes the rover randomly back up indefinitely when WP_SPEED_MIN is > 0

Backup meaning reverse?

Haha that’s an interesting bug. With the multirotor, I suppose you could have it start 10m ahead or so and shine a line laser at the ground, so its not directly above you, but yeah it’s probably going to be a little annoying with stirring up the air and the noise. Is RTK better than M8N for GPS? GPS might be out then if it can’t be done consistently. Does the Mission Planner/ F7 Transmitter Board allow for a Rasbperry Pi to provide extra data on how to drive the car? A couple line sensors placed on the car or a camera with a line following algorithm on the car could provide that information.

RTK can be cm level accuracy. There are 2 ways to implement it. The most common is to have an RTK GPS module on the craft and at the base station. The base station learns it’s position accurately (this takes time) and sends corrections via telemetry to the craft module. Another option is to use an Ntrip server from a local fixed station then you don’t need the base station GPS module. Depending on where you are this service can for a fee or free. It’s free here and there is actually a station just a couple km from that track. But, I don’t have RTK GPS module for the Rover, they are expensive,

So, if you wanted to really get into it you could come up with a workable solution. There are automated machines for athletic field painting that are GPS based so it’s possible to do accurately. Snails pace for those though I imagine.

Yes, there are other tracking technologies. You can read about them here:

I am in the process of testing a Rover based on the Traxxas Slash/raptor with an LCG chassis and its working pretty great. I’ve gotten to 15mph (25kph) so far and that was offroad. You dont need the brushless VXL version for your target speeds.

Throttle and turn tuning will help a lot and there are a lot of parameters you can play with to get your cornering speed where it needs to be. I was having trouble hitting higher speeds with ardupilot at times so I have also played with PX4. Ardupilot is more capable and what I’ll settle on, but PX4 was easier to get speed out of quickly. You just have to make sure you’ve got your max throttle percent parameter set correctly.

I also used a pixhawk 4 mini with the pixhawk 4 GPS and its been great. The GPS chip is supposed to be accurate under a meter. If you want centimeter accuracy your need the here2+.

Here’s the pixhawk4 mini shown in the enclosure

I had a similar style vehicle as my 1st Rover. It performed pretty well but I realized I didn’t need speed so built the next one on a Crawler chassis. I found tuning navigation to be rather easy with ArduRover but at speed positioning becomes critical. 1m on the ground can be huge unlike in the air where it’s not significant at all. I have tried waypoint learning in an attempt to improve this (rather than pick waypoints from a map) but the next day or even the next hour the GPS positioning accuracy can bite you. But I was happy with how it performed on the track, pretty much on the line I plotted.

Yeah your on track performance is beautiful.

My ultimate goal for this is to see how far I can push the speed boundaries. I’ll swap in a brushless setup and some aerodynamics with sticky tires to try and get in the 50-60mph range.

Without reverse/braking it makes a good lap time really hard.

That should be fun. I went the other way and replaced the motor with a sensored Brushless and geared it down for better slow speed performance. It still didn’t work that well so sold it and got the crawler. One thing you might run into is GPS position update rate relative to speed. I actually see this on some fast quads I have while trying to run high speed missions. Not sure how the PX4 flight stack handles it but on Ardupilot you can over run this, then EKF is unhappy and it may Failsafe. At least that’s one theory I have.

Didn’t think of that and good point. I’ll push the brushed setup to 30ish before doing the swap in that event.

Have you ever gotten “follow” mode to work?