Quote:
Originally Posted by Geek 2.0
I have yet to try this, but I'm curious...
I want to control the facing direction of the robot with a gyro and PID AND I want to control the travel direction of the robot with an accelerometer and PID.
Will these two PIDs fight each other? If so, how would I program around that? Also, what's a good way to program it, considering I can only use one pidWrite() function per class?
|
I guess I'm a bit confused as to what you are using your sensors for. Using a PID with a gyroscope as feedback to control what direction your robot is definitely possible. As far as the accelerometer as a feedback sensor into a PID control loop, what exactly are you trying to control, direction of travel? Accelerometers pose an interesting control problem due to their sensitivity to noise including noise from vibrations in which a first robot has many. This can of course be overcome but I guess I'm confused as to what the accel will be helping control... Not saying you are wrong or that it won't work but to help you more I could use a bit more info.
__________________
FIRST Mid-Atlantic Volunteer (2012-present)
Team 1014 Alumni (2004-2005)
Team 1712 Mentor (2011-2015)