You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have implemented a template that used GPS to record a path and follow it. This is the issue #991 Add gps part and integrate into path_follow template describing the work and what is left to do. This is the branch that implements it 921-gps-logger. As noted in issue #991, there are three steps for getting this merged into the main branch. The first of these steps is included below. As these are merged the list will be updated with testing for the subsequent PRs.
Test refactor of complete.py template (The DNN template)
Success criteria; The refactored complete.py should work the same as the current main branch (no new functionality was added, this is just a refactor).
Any instructions in docs.donkeycar.com should work. If there are discrepancies then we should open an issue to either change the code or update the docs at the time we merge this branch into main.
Report any bugs (add issues in github)
Work with developer to fix bugs and close issues.
do this for the other 2 stages are described in issue #991 as PRs become available.
Experiment with various GPS receiver technologies
compare RTK, RTK with dead reckoning and non-RTK, non-RTK with dead reckoning gps receivers. See this article for how to setup RTK for this purpose
how many laps (how much time) can you go with non-RTK gps before drift inteferes?
Which technologies perform better in a time trial?
what is the highest performing setup?
what is the most cost effective setup?
Improve path follow 1
The current algorithm uses cross-track error and a PID to turn towards line to follow; no heading is involved.
How do optimal PID values vary with velocity?
What recommendations can we make for starting PID values and for a process to identify optimal values?
Observe the behavior of the vehicle if it moves too far way from line to follow; the vehicle will get stuck in a tight turn an never achieve the line to follow. Why does this happen? What changes could be made to recover from this state? See Modify the path_follow algorithm to head back to the path if it gets too far away #1044 for a related project.
The current algorithm uses cross-track error and a PID to turn towards line to follow; no heading is involved.
How could we add in heading?
software only (delta of current and previous GPS location).
Use heading provided by GPS (see GPRMC NMEA message's field 8, Track made good in degrees GPRMC)
hardware 6 axis acc/gyro like MPU6500
This can provide a relative heading at a high refresh rate; so another method that provides the absolute heading would be needed, then this can be used to provide a more accurate heading estimate in between updating the absolute heading.
Once we have heading, we can use more sophisticated path follow algorithms, like pure pursuit.
implement pure pursuit using one or more of the technologies identified in Improve path follow 1&2 and using a constant velocity.
Ideally make this the path follow logic 'pluggable' so that in configuration we can specify a python file that contains the logic, so individuals can develop their own algorithms and use them without having to fork the repo. We do something similar for game controllers where we can configure the code to look in the mycar folder for a custom controller implementation.
how does pure pursuit compare to cross-track error; what are benefits and how are failure modes different?
Pure Pursuit with waypoint velocity
Rather than each waypoint being a simple (x,y) coordinate, add a target velocity to achieve at that waypoint (x, y, velocity).
If wheel encoders are available, then closed loop velocity control can be added to achieve these target velocities.
In the absence of wheel encoders, a software only approach where velocity is calculated from the current and previous pose estimate.
develop a control algorithm to accelerate/decelerate to achieve the target velocity at each waypoint.
how precise does the velocity estimate and control need to be to deliver benefits?
compare this to cross-track/pid and constant velocity pure pursuit;
which can achieve lower (faster) lap times?
Pre-calculate an optimal trajectory
given a map that indicates the driveable area (perhaps as paths for the left and right borders of the track), calculate an optimal path for the vehicle to follow.
try minimizing distance traveled in one lap
try minimizing curvature of path in one lap
try maximizing single-point velocity that can be achieved.
An excellent path forward in order to integrate both heading and IMU functions and possibly wheel encoders with GPS be it just GPS or GPS + RTK.
I presently have a Traxxas E-Maxx Truck chassis running a Rpi 3B+/Robo HAT MM1 M4 configuration. The Robo HAT has a built in MPU9250 at hex address 0x69. Unfortunately it will be difficult to add wheel encoders to my E-Maxx.
However I do have a large 6WD chassis with wheel encoders and a small 6WD chassis with motor wheel encoders. The 6WD chassis are not fast, but I have used both wheel encoders and GPS to validate the path_follow.py template from the DC 921-gps-logger branch.
Here is a link to a video of my Traxxas E-Max running a Sparkfun NEO-M9N GPS with an active antenna on a ground plane. At the time the video was shot the E-Maxx batteries were running low and a cloud cover was coming in as the E-Maxx had performed better during previous runs.
We have implemented a template that used GPS to record a path and follow it. This is the issue #991 Add gps part and integrate into path_follow template describing the work and what is left to do. This is the branch that implements it 921-gps-logger. As noted in issue #991, there are three steps for getting this merged into the main branch. The first of these steps is included below. As these are merged the list will be updated with testing for the subsequent PRs.
Test refactor of complete.py template (The DNN template)
Experiment with various GPS receiver technologies
Improve path follow 1
Improve path follow 2
GPRMC
NMEA message's field 8, Track made good in degrees GPRMC)Improve path follow 3
mycar
folder for a custom controller implementation.Pure Pursuit with waypoint velocity
Pre-calculate an optimal trajectory
The text was updated successfully, but these errors were encountered: