You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
I want to use a Lateral Controller like Stanley or PID for my automated driving car with using Gps Coordinates.
4 views (last 30 days)
Show older comments
I want to use a Lateral Controller for example Stanley or PID for my automated driving car. The Controller must able to correct lateral drive through steering. My inputs should be Gps coordinates from the car and Gps coordinates from my way points. I have seen some examples for lateral controller for automated driving but on these applications are being X Y coordinates. I want to apply it with Gps coordinates in real. Can someone help me please?
Thanks.
16 Comments
Sam Chak
on 1 Apr 2023
Find out (or derive) a set of equations that describes the lateral-directional motion of the car.
The GPS Coordinates shall be used in a path planning algorithm to produce the desired trajectory.
Then, will need see where to inject the reference trajectory into the equations, specifically the controller that needs to generate force required to drive the car.
Ihsan
on 3 Apr 2023
Thanks for your answer!
Do you have any idea, how i can produce a desired trajectory with GPS Coordinates?
Sam Chak
on 3 Apr 2023
A desired trajectory is a sequence of actions or movements to move from a starting point to a desired destination in a given environment or space, while avoiding obstacles or other locomotion constraints.
Finding a trajectory requires path planning techniques. This could be a simple trajectory from point A to point B, provided that the coordinates are available and there are no obstacles present.
What path planning techniques (on the Internet or textbooks) are you considering?
Ihsan
on 3 Apr 2023
I want to have a path with waypoints. The Car should follow the way points and reach the final destination. Should i give the waypoints individually as a matrix or smth like that?
Ihsan
on 3 Apr 2023
I found https://www.youtube.com/watch?v=Yse_YDpmsBM this example. But there are only (X, Y, degree) coordinates. I am getting the gps coordinates from the car and i thinks my way points must be in gps coordinates. Should i convert them to x y coordinates? But i don`t know how.
Sam Chak
on 4 Apr 2023
Edited: Sam Chak
on 4 Apr 2023
In the video, Dr. Carlos Santacruz-Rosero used A* path planner to generate the trajectory. If you want to follow exactly, then look up the A* algorithm in Robotics textbooks or online materials. The trajectory is described in {x, y} coordinate frame.
If your mapping is in 2D and the dynamics of your car is described in {x, y} coordinate frame, then convert the GPS location (latitude, longitude) into (x, y) coordinates, as shown in Robotics textbooks or online materials. Search for the conversion formulas.
Also, find out the technical knowledge and engineering stuff in this book:
Ihsan
on 4 Apr 2023
The position infos, which i get from the car, is described in GPS-Coordinates. I can`t find any application path following with GPS-Coordinates .
Sam Chak
on 4 Apr 2023
Can you check your professor's note or textbook and show the conversion formula?
Ihsan
on 4 Apr 2023
I found the following formula:
x = R * cos(lat) * cos(lon)
y = R * cos(lat) * sin(lon)
z = R *sin(lat)
In that video is the path in 5 Columns described. For example the first row is :
1.75000 3 0 5 0.0833326505152669
If i convert i have x y z so 3 of them. What are the other 2 columns?
Ihsan
on 5 Apr 2023
I found this conversation latlon2local: Convert geographic coordinates to local Cartesian coordinates.
Do you think it is useful for my situation?
I am getting the Gps-Coordinates from my car but here in this command you must have an origin point.
Sam Chak
on 5 Apr 2023
Hi @Ihsan
I didn't watch the entire video. However, if the formulas are correct, then feed in the lan and lon as inputs and you will get the corresponding Cartesian corrdinates.
By the way, I don't have the Automated Driving Toolbox. From the desription of latlon2local() documentation, it should get the job done as expected. Have you tried it?
lat = 0.1;
lon = 0.3;
alt = 0.5;
origin = [42.3648, -71.0214, 10.0];
[xEast, yNorth] = latlon2local(lat, lon, alt, origin)
xEast = 6.0422e+06
yNorth = -1.3470e+06
Ihsan
on 5 Apr 2023
Firstly, I must load a GPS Route. But i don`t know how to create a Gps-Route data. Should i input all points in route manually?
Sam Chak
on 5 Apr 2023
What exactly is the GPS Route for? Why do you want to create the data instead of importing the data from the GPS device?
Ihsan
on 5 Apr 2023
GPS Route is for my ideal path. It will be compared with the GPS Data from the vehicle.
See Also
Categories
Find more on Automated Driving Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)