The aim of this project is to build a nerf turret that can do cool stuff. Cool stuff might include:
There is a python server that provides a live stream of the camera located at
server.py. To run, do
FLASK_APP=server.py flask run --host=0.0.0.0from the project directory.
The turret has been constructed, and may be controlled via a USB Xbox 360 Controller. It’s electronics are
spaghetti no longer spaghetti.
The turret can track and attack faces, or an object of a certain color and size. Tracking is currently just done by moving the turret towards the target with movement and flywheel revving speed proportional to target distance.
If not running tracking code, the turret may be operated manually via Xbox controller, or keyboard input to a camera livestream webpage.
Nerf RapidStrike with pusher and flywheel motors hooked up to 7.5V 100W power supply and 5V relay module. Super high torque HS-805BB servos hooked up to 6V 18W power supply. Arduino controls all actuators, and communicates over serial with Raspberry Pi. Raspberry Pi Camera v2 mounted on top of gun. Possibly will be mounted on drum tripod.
All turret actuation is abstracted through the
nerf_turret interface, which is importable as a python module. Do not use
v1_stable_controller_operation, which is deprecated. The current interface contains the following functions:
pan_velocity- Integer in [-127, +127] indicating the horizontal angular velocity of the turret.
tilt_velocity- Integer in [-127, +127] indicating the vertical angular velocity of the turret. Note that if the arguments are not within the specified range, they will be truncated using a bitmask, so they should be clamped before calling if needed.
pan_location- Angle in [-700, +700] to set the turret horizontal rotation.
tilt_location- Angle in [-300, +500] to set the turret vertical rotation.
position- Angle in [-700, +700] to set the turret horizontal rotation.
position- Angle in [-300, +500] to set the turret vertical rotation.
rev_speed- Speed in [0, 200] to set the firing motor at.
num_shots- Integer number of shots to fire.