carla: Carla vehicle won't Follow waypoints when i apply PID controller
Hi guys i have recently started working on Carla. I m trying to drive my vehicle through custom waypoints which i have saved in a csv file. But when i apply vehicle control using pid to follow those steps my vehicle is unable to follow those way-points.
for i in range(len(wp)-1):
desiredSpeed = 25
waypoint=wp[i]
control = PID.run_step(desiredSpeed,waypoint)
vehicle.apply_control(control)
where `wp` is a list which consist of waypoints through which i wanna drive.
I have plotted the waypoints on the map through which i want to drive.
while these are my PID arguments
args_lateral_dict = {
'K_P': 1,
'K_D': 0.8,
'K_I': 0.8
,'dt': 1.0 / 10.0
}
args_long_dict = {
'K_P': 1,
'K_D': 0.8,
'K_I': 0.8
,'dt': 1.0 / 10.0
}```
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 23 (1 by maintainers)
The issue has been resolved. The problem was that i was getting next waypoint before making it sure that i have reached near target way-point. so i have made the following necessary changes.
I’ve had some experience with this, so here’s my suggestions:
synchronous_mode
, especially if you’re drawing points each tick with the debug helper.PID
with (0,0,0) and then slowly change the values as explained in this link.If you decide to use them, set
dt
to 0.05, since they are tuned for that specific delta time step.Finally, if you do achieve some decent results, make sure to share the values! It would be very valuable for us.