The code base for our submarine project.
Avoid looking at motors.cpp
- OpenCV:
libopencv-dev,python3-opencvetc. - Tkinter:
python3-tk - Pillow:
Pillow(PyPI) - Boost:
libboost-all-dev - WiringPI:
https://github.com/WiringPi/WiringPi/(only on Raspberry PI)
Running the submarine controller:
#Enter build directory
cd build
# Generate the build files (do once unless you added some new files)
# If you are on raspberry PI do this
cmake -D COMPILE_DEFINITIONS=RASPBERRY_PI ..
# If you are not on raspberry PI do this instead
cmake ..
# Build the system (do once unless you changed some files)
make
# Make sure:
# * The Arduino is plugged into your system
# * Port (generally ttyUSB[0-9] or ttyACM[0-9] on linux and COM[0-9] on windows) is not being used by anything else (Close Arduino IDE, for example)
# Then run the controller:
./ControlSubmarine- Avoid editing even a single character without asking us if your first name starts with the letter "Doruk".
- Avoid
using namespacestatements butnamespace x = ...is OK as long as you know what you're doing and it helps the code to be more readable. - Avoid programmatically exiting the program.
- Class declarations and implementations should be in different files.
- Please document lines which include following:
- Binary operations, also called "bit magic"
- Excessive and unreadable use of operators
- Obscure function calls
- Do not call other systems' methods inside one another. All connections should be handled in the main file.
- For the UDP communication, I plan to pack everything to a single set-size array and unpack it on the other side so connection can be easily reloaded from last state because every package is alike.
- Use tabs for indentation, make sure the code is as readable as possible. Use a formatter if possible.
| Part | Size |
|---|---|
| Gyroscope X | 4 |
| Gyroscope Y | 4 |
| Gyroscope Z | 4 |
| Depth | 4 |
| Frame | 62208 |
- Connect the systems
- Implement multithreading
- Implement motor control (Has to be tested in Raspberry PI)
- Handle GPIO pins
- Write the code for arduino