Does anyone know or have suggestions as to how i can program the bot to help out the driver in opcontrol. So in what ways can programming, help the driver during opcontrol?
Thanks
Does anyone know or have suggestions as to how i can program the bot to help out the driver in opcontrol. So in what ways can programming, help the driver during opcontrol?
Thanks
Opcontol?-please clarify
Operator (driver) control
like driver control, so how can i make things easier for my driver in driver control?
yea so i was wondering as to what i can do for semi-autonomously things?
Macros, or a set of actions run after a button in pressed, are what you are looking for. This would be a function that say, tilts a tray forward then backs away without any driver input. A button press on the controller could call that function, making driving easier.
This removes the human element from the risky manuvers, and helps with reliability and reduces driver error.
You can do different things depending on your design of robot. For example, if you have a DR4B you can have preset heights for the lift for poles, while still having a manual control of your lift. It differs from drivers, like some will want tasks done on their own, others prefer to do on own.
Slew rate drive
20 char
ok guys thanks a lot for the suggestions will for sure take your advice and try to implament it!!
Look up these topics:
PID - guide
Statemachines - example
You can find many VEX programs on github or on the forum for examples.
An extreme example of drivercontrol automation is in our Turning Point showcase, under “Angling Hood”:
You can do different driver control layouts
(i,e; arcade drive, tank, one stick drive one stick lift, etc.)
Here is an explanation of some of the operator control programming “assists” that we used last season: What do you think is a more efficient way to drive your robot? - #37 by _Colossus
Just like others have mentioned, we also used macros and state-machines for tasks like pressing a button once and having our arm move up to a predefined height, or pressing one button and shooting exactly one/two balls.
You might also want to have some programmed “anti-tips”. Don’t allow your robot to change acceleration too rapidly and accidentally tip itself. This might not be necessary depending on your design, but say you have a DR4B. If the lift is all the way extended, your driver won’t be able to know what the exact limit is for changing acceleration while the lift is up, this can cause the robot to tip. So you can fix that by limiting drive speed or direction changes with code. (i.e. rapidly going forward then backward can be limited).
How would you limit the acceleration/deceleration?
With code, remember what acceleration is. A change in velocity. So if your robot has a high velocity (near max) then you can use a non-linear regression for the case when the robot changes direction immediately (from forwards to backwards).
Sorry,I should have been more specific. How would you program that.
You’d need to tune it to your specific robot as some robots are more sensitive to acceleration changes than others and some are more sensitive when the robot is in a certain state (i.e. lift is up, tray is full, etc). A non-linear regression is essentially a cubic or quartic function. So all you’d do is run the controller input value through that function only when the robot is that certain tipping state that I mentioned above when the robot changes direction.
Would it also be possible to add a gyro to automatically prevent tipping.
That’s easier said than done. You’d need to change the orientation of the gyro so that it is mounted vertically on the robot. As for coding that, you’d need an algorithm that understands the relationship between “tip angle” (how far back or front the robot is tipped) and the velocity of the base. Presumably, if the robot is tipping backwards, you’d want the back wheels to spin forward and vice versa for the other scenario. Tuning that would probably be very difficult. Also, you have to consider gyro drift, what if the gyro gets a false reading and randomly tries to anti tip in the middle of a match.