05-20-2019 06:53 PM
Hi!
I've been doing this project for a course with a classmate and we can't figure it out. I know it's probably supposed to be quite simple, but we've already changed the PID values many times and the car keeps having problems. With a certain configuration (the image attached, which we could not get a printscreen of because we didn't have an internet connection on the computer it was made), the car actually follows the black line decently, but when it gets to a sharp corner, it goes completely bonkers.
Would any of you help us, please? We need some kind of clue on where we need to get with these values...
Kind Regards,
José
05-22-2019 05:17 AM
05-22-2019 05:08 PM - edited 05-22-2019 05:09 PM
Thank you for your reply. I didn't have a way to get the VI, as I was working on it on a computer with no internet connection. Well, here it goes attached.
Also, the black line is the one also attached.
05-24-2019 04:02 AM
EDIT: Sorry, the VI is not that one.
Here is the correct file attached.
05-24-2019 04:13 PM
05-24-2019 06:34 PM
Our goal would be to make the robot complete that path. So far, it follows the line (even though it wobbles/oscillates a little, but not that bad). The problem shows up when the robot gets to one of the two "pointy" curves. It completes one (not great, but serves the purpose), but the other one it doesn't, because it turns to the other way and so it loses track of the line. We were trying to make two case structures and we would switch between the two making noise (plugging the mic). We don't really have any experience in LabView and sutff like that, so this may be a very basic problem to solve, but not to us.
Thank you for your patience.
Greetings
05-25-2019 10:03 AM
I am not surprised that your line following algorithm is struggling with the 2nd pointy section. That is a very sharp turn! Here are two approaches I would take as part of your troubleshooting.
When it comes to using a sensor to switch between 2 different sets of control parameters, using a loud sound is a good idea, but you will need to write the LabVIEW a little differently. Right now you are only checking the sound level once before entering the While Loop that does the line following. As soon as the robot gets into the one of the inner PID loops, it will stay there and not check your sound sensor again. This means that you cannot change your control constants once the robot has started line following. One way to fix this is to move your sound check code inside the PID loop that is doing the line following. Once inside the loop, you can make decisions based on what sound level it detects.
Hope this helps.
Kris
05-25-2019 07:39 PM
Yeah, we tried to set the "39" parameter lower, not higher!
We'll try those tips this week, thank you! Very helpful 🙂