Skip to content

MohammadAmmargk8497/ROV1.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Remotely Operated Underwater Vehicle

9401e3b7-abda-4b59-9359-4a82c22e7b2f 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.

Screenshot 2024-04-16 at 7 59 18 PM
  1. 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.

    IMG_1478

    • cam_vehicle.py: This script uses opencv to capture video frames and send them over to the base station using udp protocol.
  2. 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.

USB forwarding(USB IP)

On the server side(linux):

  1. sudo apt-get install linux-tools-generic

  2. sudo modprobe usbip_host

  3. sudo nano /etc/modules

  4. add usbip_host to the end of texts

  5. lsusb to see a list of attached USB devices

  6. sudo usbip list -p -l

  7. sudo usbip bind --busid="Bus ID" enter busid from the above list command

  8. sudo usbipd

On the client side(rpi):

  1. On RaspberryPi before using Pip first do sudo rm /usr/lib/python3.11/EXTERNALLY-MANAGED

  2. wget http://raspbian.mirror.net.in/raspbian/raspbian/pool/main/l/linux/usbip_2.0+5.10.158-2+rpi1_armhf.deb or sudo apt-get install linux-tools-generic hwdata

  3. make the folder executable using chmod +x Folder Name

  4. sudo apt install ./usbip_2.0+5.10.158-2+rpi1_armhf.deb

  5. sudo modprobe vhci-hcd

  6. sudo nano /etc/modules

  7. add vhci-hcd to the end of texts

  8. sudo usbip attach -r "IP Address" -b "Bus ID"

About

Remotely Operated Vehicle

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages