Hello fellow Vex users! I just was wondering if anyone has had my same issue. My robot works perfectly fine, but when I move the robot tens to move by itself. So if anyone has had this same issue please respond. Thank You!
Can you write a better description of what is going on? What do you mean by “when I move the robot”?
Can you give a general description of the robot? What sensors are on the robot?
As a novice I once programmed the robot to move based on the controller’s gyroscope/accelerometer, so tipping the controller moved the robot. Perhaps thats why? More info is needed otherwise.
It may have something to do with your joystick. With the slightest deviation from the center, it will give a motor value. i.e. If your stick is slightly forward on channel two, it will do that command in a very low power.
In order to fix this, our mentor advised us to set a deadline for the sticks. It does the job well.
If you think it’s an issue with your program, I would suggest posting your code (use the code tags by clicking the button “</>”). Chances are it’s just the joysticks, as they will almost never read exactly 0 when in the middle. So, as has already been suggested, you can add a dead zone to the joysticks, and you may also want to calibrate the joystick:
Also, building a deadzone is reasonably simple, something a little like this:
const int DeadzoneValue = 25; if(abs(vexRT[Ch2] > DeadzoneValue) motor[drive] = vexRT[Ch2] else motor[drive] = 0;
Speaking of semi-autopilot… So a robot driving itself is more efficient then a human driver and accurate if you put the time in, such as in autonomous, as long as the field does not dramatically change. So I realize that this strategy would be impossible for the end of the game when the balls are knocked down but at the beginning of the game it seems that a robot that drives itself would score higher until the robot is knocked off course or the balls are disrupted… But I have not heard of anyone trying to do that strategy before so here is my question: is there a fault in my logic that renders this strategy useless and has anyone tried this strategy ?
I think this would have to go pretty quickly, as the stack of balls are very fragile and get knocked down early in the match.
Seems like this comes up from time to time - how autonomous should be better than driving, but the reality is well-practiced drivers always are able to be more reliable than an autonomous routine. That’s just how it’s always worked out.
I like that your username makes this question somewhat ironic.
Also might be best to start a new thread as this is not really relevant to the discussion of this thread
Just a note: the joysticks set whatever their original position is to 0. If you move the joystick all the way to the to then that position will be 0, and what’s supposed to be 0 on the joystick (its resting position) will be -127. So be careful not to move the joysticks around when you connect!
I recommend trying to calibrate your vex controller to see if it helps. http://www.education.rec.ri.cmu.edu/products/cortex_video_trainer/lesson/media_files/VEXnet_joystick_calibration.pdf