Quote:
Originally Posted by yash101
Just wondering, how many GP watchdogs are on the cRIO (locked and unlocked)? On the RPi, there is one, that I use to fix hangs and crashes. I am pretty sure there are at least two: network and processor! Also, how does the cRIO boot into safe mode if it corrupted?
|
The cRIO has two types of watchdogs. The system watchdog cannot be modified and makes sure that the DS laptop is still connected and sending packets to the robot. If the laptop runs out of battery, is dropped, or driver station is closed, the robot will automatically disable.
The second type is the user watchdog. This can be configured as an extra safety feature to stop an actuator if your code takes longer than expected to execute or crashes. They are used by default in RobotDrive, or they can be added manually. It's a great safety feature for drive. If your code doesn't update the value set for the drive motors because of an issue, you don't want the robot to continue driving at full speed.
It causes the "robot drive output not update often enough" errors a lot for command based robot programming because if one command is slow to execute, the whole robot code falls apart because the scheduler has to wait for each command to finish executing before it moves on to the next thing.
For this reason, I always put the robot drive code in a separate thread so that if some other command takes a long time and prevents the scheduler from getting to the next command, I don't have issues with drive.