Software Design
The software driving the robot consists of several, discrete portions to provide reliability and quick development during the highly-constrained timeframe for robot development.
The algorithm for stacking blocks consists of the following portions:
The algorithm for stacking blocks consists of the following portions:
Track Tape
- Using PID control, the robot tracks tape by using certain feedback loops for proportional and differential gain, dependent on the centre of gravity of the robot and the mass moment of inertia. The differential gain of the PID control can be seen in a video from larger oscillations after a turn and much smaller oscillations as the robot travels further along the straight line of the track.
- In addition: turn corners and detect switch triggering with the block depot.
- In addition: turn corners and detect switch triggering with the block depot.
Align with the Block Depot
- Once the robot has detected a switch-triggering event from contact with the block depot, it then performs a blind back-up until the side QRD is triggered by the black tape. After this, the robot then drives forward at an angle until the side switch contacts the depot. It then stops, and blindly rotates backwards until the back of the robot is in contact with the depot. Lastly, the robot applies power to the right wheel until the side once again contacts the depot wall.
Detect a Block
- Once by the stack area, the robot then drives along the side of depot waiting for the micro-switch on the arm of the robot to be triggered.
Final Steps
Pick-up block:
After the micro-switch on the arm is triggered, a small servo mounted on the arm attempts to ensure that the block is completely within the arm of the robot by performing multiple taps on the block. The main arm then closes on the block and lifts it to a level just above the blocks (as determined by the encoder mounted on the lift).
Track Tape
The same algorithm as first described is implemented with the caveat that it is performed until the side QRD is triggered.
Place block
Triggering of the side QRD acts to align the robot in the stacking area at the same position, allowing for blocks to be stacked consistently.
Iterate:
The robot continues the same basic procedure for each block stacked
After the micro-switch on the arm is triggered, a small servo mounted on the arm attempts to ensure that the block is completely within the arm of the robot by performing multiple taps on the block. The main arm then closes on the block and lifts it to a level just above the blocks (as determined by the encoder mounted on the lift).
Track Tape
The same algorithm as first described is implemented with the caveat that it is performed until the side QRD is triggered.
Place block
Triggering of the side QRD acts to align the robot in the stacking area at the same position, allowing for blocks to be stacked consistently.
Iterate:
The robot continues the same basic procedure for each block stacked