10-11-2013 06:38 PM
I have a left and right distance with respect to the wall. I drive a fixed linear velocity forwards. Now I want to keep the robot in the middle of the the walls. However I can only apply a angular velocity. How the robot works physically is a blackbox
What I have:
What I need
What I want
So what I done now is the following,
I compute the error = distance_left - distance_right, since I want the difference to be zero. I then use a PID controller. From the PID I retrieve a certain effort. Since the mapping from the difference in distance (the error) to the angle is a blackbox, I interpret the effort as the angle we want to drive. However since I need to give a angular velocity rather then a angular position I compute the derivative to retrieve the angular velocity.
I'm wondering two things, is it correct what I am doing? Secondly is there maybe a better aproach, since this one does not seem to work very well (proberbly because it is also hard to tune the PID gains correctly plus the noise which is caused by computing the derivative)?
10-14-2013 02:58 AM
Hello WG,
How did you retrieve your PID-parameters?
Did you test your code in a simulated environment?
Can you share any of your current LabVIEW code?
How do you communicate with the robot (wi-fi?) or is your code running on the robot itself?
Or in other words: what kind of robot are you using?
When playing around with control algorythms, it can be useful to first start with simple P-controller.
This will allow you to see and tune what the link should be between your effort and the wanted angular velocity.