This is the major project of students of ZHCET, AMU under the aegis of MTS AUV ZHCET Club. This repository is an effort to design the first generation of software for Remotely Operated Underwater Vehicle. The software system can be broken down into two major parts; 1). The Vehicle Side and 2). The Base Station Side.
-
The Vehicle Side: The vehicle side of the program is simple, it does two tasks: generate controls for the thrusters and send feedback data ( camera-feed and generated control values) to be displayed back to BS. It contains the following:
|
|
------> Control.py
|
------> cam_vehicle.py- Control.py : This file employs Multithreading in a producer-consumer fashion; here the GUI function is the consumer thread and run function as the producer thread. The run function generates the control and pushes their values on the queue. The thread- safe queue is then accessed by the GUI function which encodes and transmit the data back to BS using UDP protocol.
- cam_vehicle.py: This script uses opencv to capture video frames and send them over to the base station using udp protocol.
-
The Base Station Side: The Base Station contains two scripts; joystickrender.py and opencvserver.py.
- joystickrender.py: This is responsible for displaying the realtime PWM values being generated by the control.py. Future work is needed to transform this into a complete interface.
- opencvserver.py: This is responsible for rendering the camera stream generated and sended by the cam_vehicle.py. Work is needed to integrate this and joystickrender.py into a single file named UIX.py containing all the necessary data and feeds.
-
sudo apt-get install linux-tools-generic
-
sudo modprobe usbip_host
-
sudo nano /etc/modules
-
add
usbip_host
to the end of texts -
lsusb
to see a list of attached USB devices -
sudo usbip list -p -l
-
sudo usbip bind --busid="Bus ID"
enter busid from the above list command -
sudo usbipd
-
On RaspberryPi before using Pip first do
sudo rm /usr/lib/python3.11/EXTERNALLY-MANAGED
-
wget http://raspbian.mirror.net.in/raspbian/raspbian/pool/main/l/linux/usbip_2.0+5.10.158-2+rpi1_armhf.deb
orsudo apt-get install linux-tools-generic hwdata
-
make the folder executable using chmod +x Folder Name
-
sudo apt install ./usbip_2.0+5.10.158-2+rpi1_armhf.deb
-
sudo modprobe vhci-hcd
-
sudo nano /etc/modules
-
add
vhci-hcd
to the end of texts -
sudo usbip attach -r "IP Address" -b "Bus ID"