Automatic driving

Hello Brian, all friends, I am working on an autonomous vehicle, I want my vehicle to return to the starting point, I am using version 4.3.10, can I do this, or can you guide me. Thank you.*qwq

there is good news and bad news: The good is: the sourcecode is open to you, and the bad is: you’ll have to do it (with the help of the community of course)


My English is unfortunately poor, do you know which file I have to deal with?

One of these - never digged into the deep myself…

Understand that you’ll have to spend some significant time reading the source code and trying to understand it and how the flow control works in order to undertake this kind of modification. It’s a large and complicated project. But if you’re already working on an autonomous vehicle you’ll probably already have some experience with a large and complicated computer program. I’ve spent several months reading the source code so I understand the flow pretty well. I don’t pretend to understand most of the actual algorithms!

Recorded path returns to the start point through dubins. If it is the same each time, you could add a routine at the end of a field that drives the same recorded path and turn off the return dubin. Or add a dubins return to the end of the field. With the goal point and heading the same as the first point of the field. @torriem Is right, it takes a lot of reading and even more errors. I’ve done a bit of draw in Google earth and drive that path. All in the simulator of course.

@GoRoNb @Torriem @KentStuff, thank you very much for your answers. I recorded the path from the robot in the upper left corner, I will proceed this way, I seem to know all of you since I have been following the subject for 2 years, in fact, I learned a lot thanks to you and Brian’s contributions.
It works in simulation, I hope it will also work in the field, I am making a 4-wheel vehicle with 2 hub motors and 2 wheels, I plan to do the steering with a DC actuator. I will publish photos and videos when finished. I have 2 questions.
1-) When I start driving the path I saved, the automatic section does not work, only the manual section works.
2-) Do you have a suggestion for the vehicle to slow down while turning? For example, while driving at 5km / h, get 2km / h in turns.
Best regards.BLDC

I will answer question number 2. If you are only talking u-turns then yes, this was one of the first modifications that I made. It worked well unless u-turn was canceled. Then it forgot to speed it back up. Just missed that part of the code. If you are speaking of all turns, then best to set a check to read the fartoolspeeds and set a max speed based on these.

1 Like

It gives a warning sound 15 meters before the automatic u-turns, I can reduce the speed of the vehicle by taking it as a reference, but there is no warning sound feature on the recorded road, I think I need to find another solution, there is more work I hope I will be successful.

Best regards

Speed is part of the recorded path. It sets the speed based on the recording. Same with tool on or off. Record it like you want to drive it.

Other option: Turn angle is limited by speed through the radius acceleration check. You could reverse this and control the speed by the angle and the same acceleration check. In other words, speed would be based on the atan2 of the next two points.

1 Like

Thanks to you, I solved the problem, I solved the automatic section problem in my 1st question by changing false-true in the recpath file, thank you.

1 Like