An open API service indexing awesome lists of open source software.

https://github.com/egebilecen/eb-python

Compilation of my utility classes and wrappers.
https://github.com/egebilecen/eb-python

Last synced: 29 days ago
JSON representation

Compilation of my utility classes and wrappers.

Awesome Lists containing this project

README

        

This repo contains many utility classes/wrappers to work with Drones that uses MAVLink, image processing, servo and ESC motor control on Raspberry PI and getting data from some sensors along other stuff such as UDP server/client, I2C wrapper, getting frame from camera using opencv etc.
(More detailed information about classes and methods can be found in eb folder and it's subfolders. **Only external dependencies** are written across all documentation.)

# libs.txt
Consists the links of the libraries that is needed for my classes to work. Be sure to check below class briefs because not all of the libraries are needed if you are not going to use every class.

# Brief of Main Classes
(Those classes are located under "eb/" folder.)



camera.py

* Captures the frame(s) from connected camera device asynchronously.



compass.py

* Consists methods to work with compass degrees.



convert.py

* Consists methods to convert values. Such as converting byte array to ascii.



file.py

* Consists methods to work with files. Such as listing files in a directory.



i2c.py

* Depends on smbus2.
* Consists methods to work with I2C communication protocol.



logger.py

* Consists methods to print debug messages. Can also save logs into a file.



math.py

* Consists methods to work with 2D points and basic value manipulation.



method.py

* Consists methods to work with methods. Such as executing given method in background, calling the same function until it returns (or NOT returns) the desired value with an option to timeout and delay the execution of the same method after each try, calling the same function X times, etc...



serialport.py

* Depends on pyserial.
* Consists methods to work with serialport.



time.py

* Consists methods to get timestamp, date, clock, etc...



udp_client.py

* Consists methods to connect to a UDP server. (Automatically responds to any "ping" message from server with "pong". You may want to uncomment that line.)



udp_server.py

* Consists methods to create a UDP server. (Automatically sends "ping" message to all sockets in specified time interval to check whether they are disconnected.)

# Brief of Mavlink Classes
(Those classes are located under "eb/mavlink/" folder.)



_action.py

* Consists methods that requires drone to take an action. Such as going to GPS coordinates, landing, arming, etc... (Changing desired speed(s), yaw and things similar to these also counts as an action. At least for me. :P)



_control.py

* Consists methods to control drone position, altitude, etc...



_mission.py

* Companion computer controlled mission system. Allows user to execute python scripts while being allowed to control drone position. Drone will be held in it's present GPS coordinates while executing mission script.
* Note: This class doesn't load any mission(s) to drone.



_telemetry.py

* Consists methods to get drone's various informations. Such as GPS position, last heartbeat, arm status, flight mode etc...



convert.py

* Consists methods to convert enum numbers to string or a custom class representative value.



vehicle.py

* Depends on pymavlink.
* Initializes the connection between vehicle and computer. It keeps parsing specific mavlink messages in background.
* Consists various methods to communicate with flight controller.



math.py

* Consists methods to work with GPS coordinates. Such as calculating lat, lon position of the drone from heading and distance, getting relative heading between two GPS coordinates, calculating distance between two GPS coordinates etc...



helper.py

* Depends on pymavlink.
* Consists methods to get constants that is defined by pymavlink with more ease.



reference.py

* pymavlink's mavutil constants and methods reference. And some other references.

# Brief of MavROS Classes
(Those classes are located under "eb/mavros/" folder.)



drone.py

* Under testing...

# Brief of Image Processing Classes
(Those classes are located under "eb/image_processing/" folder.)



color.py

* Consists class definations for color types to make working with them easier.



define.py

* Consists definations for specific colors in specific color spaces. Such as RED color values in HSV color space.



detection.py

* Consists methods to detect specific things on a frame. Such as blob detection, corner detection, circle detection, etc...



image.py

* Consists methods to work with images. For example encoding raw image to .JPG format.



util.py

* Consists utility methods to make working on image processing easier. Such as filtering neighbor points, extracting information from point list (such as compass bearing between camera center point and the target point), getting closest point to the center, etc...

# Brief of Raspberry Classes
(Those classes are located under "eb/raspberry/" folder.)



motor/esc.py

* Class for control a brushless motor via ESC.



motor/servo.py

* Class for control a servo motor.

# Brief of Sensor Classes
(Those classes are located under "eb/sensor/" folder.)



All of the sensor classes are written for getting data. Please see the respective files for the sensor.