Skip to content

Commit b8428f3

Browse files
authored
Merge pull request #45 from uci-uav-forge/dev
Dev
2 parents a714823 + 58c4ee2 commit b8428f3

33 files changed

Lines changed: 51 additions & 54 deletions

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
include src/odcl/labcolors.npy
1+
include src/uavfpy/odcl/labcolors.npy
22
global-include *.md

docs/ROS.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
The UAVF ROS Package
33
********************
44

5-
The ``uavf`` package in ``main`` is a python package that does not depend on ROS. We do use ROS to orchestrate the mission, so we have a ROS package as well.
5+
The ``uavfpy`` package in ``main`` is a python package that does not depend on ROS. We do use ROS to orchestrate the mission, so we have a ROS package as well.
66

7-
``uavf`` is the name of the ROS package. Its development shares an issue tracker and repository with the main python package, but its development happens on the ``ROS`` and ``ROS-dev`` branches of the repository.
7+
``uavfros`` is the name of the ROS package. Its development shares an issue tracker and repository with the main python package, but its development happens on the ``ROS`` and ``ROS-dev`` branches of the repository.
88

99
Installation
1010
============
@@ -13,7 +13,7 @@ Prerequisites
1313
`````````````
1414
In order to develop packages on ROS, you need a PC equipped with Linux. Any desktop linux platform is suitable, but the easiest by far is Ubuntu. I prefer Ubuntu MATE on the desktop, but you can use a standard Ubuntu, KDE, or whichever flavor you like.
1515

16-
``uavf`` is a ROS package. To install it, you need to have ROS installed and configured. That will not be covered in this documentation; if you are brand new to ROS, I recommend that you go through the ROS tutorial [1]_ before continuing to the next section.
16+
``uavfros`` is a ROS package. To install it, you need to have ROS installed and configured. That will not be covered in this documentation; if you are brand new to ROS, I recommend that you go through the ROS tutorial [1]_ before continuing to the next section.
1717

1818
.. note::
1919

@@ -75,7 +75,7 @@ You will see several new nodes:
7575
This is the simulated PX4, which can be commanded with MAVROS.
7676

7777
Install ``uavf``
78-
````````````````
78+
`````````````````
7979
.. warning::
8080

8181
Because we are using this package from ROS, we need to ensure that we are NOT in any python virtual environment. You can verify this by typing ``which python`` into a terminal window. Make sure that the output is ``/usr/bin/python``.
@@ -115,38 +115,38 @@ Run ``catkin_make`` and source your ``devel/setup.bash`` file:
115115
116116
Make sure you remember to start a ``roscore`` instance in a separate terminal window.
117117

118-
Running a Mission with ``uavf``
119-
===============================
118+
Running a Mission with ``uavfros``
119+
==================================
120120

121-
Until we have viable hardware testing, this section deals with running a simulated mission with ``uavf``.
121+
Until we have viable hardware testing, this section deals with running a simulated mission with ``uavfros``.
122122

123-
Run ``uavf`` Interop
124-
--------------------
123+
Run ``uavfros`` Interop
124+
-----------------------
125125

126126
The interop client is a ros node written in Python. We start it with ``rosrun``.
127127

128128
.. code-block::
129129
130-
rosrun uavf interop
130+
rosrun uavfros interop
131131
132-
Run ``uavf`` Planner
133-
--------------------
132+
Run ``uavfros`` Planner
133+
-----------------------
134134

135135
The navigation node is a ros service node that will generate a new path for the UAV to follow between waypoints.
136136

137137
.. code-block:: bash
138138
139-
rosrun uavf planner
139+
rosrun uavfros planner
140140
141141
142-
Run ``uavf`` GNC
142+
Run ``uavfros`` GNC
143143
----------------
144144

145145
The uavf GNC node is a ros node that will take a computed plan and manage the execution of the plan on the UAV.
146146

147147
.. code-block:: bash
148148
149-
rosrun uavf gnc
149+
rosrun uavfros gnc
150150
151151
152152
.. [1] http://wiki.ros.org/ROS/Tutorials

docs/conf.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,10 @@
1515

1616
sys.path.insert(0, os.path.abspath("../src"))
1717
try:
18-
import odcl
18+
import uavfpy
1919
except ImportError:
20-
raise ImportError("Csheck that `odcl` is available to Python.")
21-
try:
22-
import planner
23-
except ImportError:
24-
raise ImportError("Check that `pathplanner` is available to Python.")
20+
raise ImportError("Csheck that `uavfpy` is available to Python.")
21+
2522

2623
# -- Project information -----------------------------------------------------
2724

docs/contributing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ We also keep ROS code separate because `it's good practice to do so anyway <http
231231
:width: 50%
232232
:align: center
233233

234-
So, to avoid development hell, we put the bulk of the functionality into the ``main`` branch, install ``main`` package (and all of its dependencies) onto the vehicle's system python, and then we can just import the ``uavf`` package and use its functionality in our ROS scripts.
234+
So, to avoid development hell, we put the bulk of the functionality into the ``main`` branch, install ``main`` package (and all of its dependencies) onto the vehicle's system python, and then we can just import the :py:package:`uavfpy` package and use its functionality in our ROS scripts.
235235

236236
The Golden Rule of ROS Development
237237
``````````````````````````````````
@@ -310,7 +310,7 @@ Then, call it from the piece of code in the ``ROS`` branch.:
310310

311311
.. code-block:: python
312312
313-
from Pipeline import pipeline
313+
from uavfpy.Pipeline import pipeline
314314
315315
def publish_pixels(pipeline, image):
316316
pixels = pipeline.count_pixels(image)
@@ -342,7 +342,7 @@ Documentation
342342

343343
We have attempted to make writing documentation as easy as possible -- and as close to the codebase as possible! This documentation contains documentation that people have written manually (such as this guide). This manual documentation is written in a format called reStructuredText, which is a commonly-used format for software documentation. To get started writing manual documentation with reStructuredText, read the `reStructuredText Primer <https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`_.
344344

345-
The second type of documentation is the auto-generated documentation. This documentation is generated from in-line comments in the codebase. You don't need to touch anything in the `docs/` folder to write this documentation -- just comment your code, and your comments are added to the API page (:py:mod:`odcl`) automatically. The API page will rebuild itself automatically whenever pushes are made to the ``main`` branch of the repository.
345+
The second type of documentation is the auto-generated documentation. This documentation is generated from in-line comments in the codebase. You don't need to touch anything in the `docs/` folder to write this documentation -- just comment your code, and your comments are added to the API page (:py:package:`uavfpy`) automatically. The API page will rebuild itself automatically whenever pushes are made to the ``main`` branch of the repository.
346346

347347
We use `Sphinx <https://www.sphinx-doc.org/en/master/index.html>`_ and a tool called `Sphinx Autoapi <https://github.com/readthedocs/sphinx-autoapi>`_ to automatically generate descriptions and API documentation for any class or method with a numpy-formatted docstring. This tool automatically parses the codebase.
348348

docs/getting_started.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
Getting Started
33
***************
44

5-
This page is a guide on how get started with the ``uavf`` API.
5+
This page is a guide on how get started with the :py:package:`uavfpy` API.
66

77
Prerequisites
88
=============
99

10-
We have tested the API under linux and MacOS. Development of ``uavf`` is possible under Windows also.
10+
We have tested the API under linux and MacOS. Development of :py:package:`uavfpy` is possible under Windows also.
1111

1212
Our release targets Python 3.8.
1313

1414
.. note::
1515

16-
``odcl`` uses the tflite runtime for inference. You can perform inference on the CPU, but this can be very slow. The vehicle uses the `Coral Edge TPU <https://www.coral.ai/docs/>`_ for on-board acceleration of inferencing.
16+
:py:mod:`uavfpy.odcl` uses the tflite runtime for inference. You can perform inference on the CPU, but this can be very slow. The vehicle uses the `Coral Edge TPU <https://www.coral.ai/docs/>`_ for on-board acceleration of inferencing.
1717

1818
The Coral Edge TPU is an ASIC developed by Google specifically designed for accelerating deep learning. If you do not have access to an Edge TPU, you can use the CPU for inference.
1919

@@ -51,10 +51,10 @@ First, we import necessary modules:
5151
.. code-block:: python
5252
5353
# import classes
54-
from odcl.inference import TargetInterpreter, Tiler
55-
from odcl.utils.drawer import TargetDrawer
56-
from odcl.color import Color
57-
from odcl.pipeline import Pipeline
54+
from uavfpy.odcl.inference import TargetInterpreter, Tiler
55+
from uavfpy.odcl.utils.drawer import TargetDrawer
56+
from uavfpy.odcl.color import Color
57+
from uavfpy.odcl.pipeline import Pipeline
5858
import logging, cv2
5959
6060
Then, we set paths to the example data and the models we downloaded. We also want to display logs.
@@ -71,9 +71,9 @@ Then, we set paths to the example data and the models we downloaded. We also wan
7171
format="%(levelname)s:%(processName)s@%(module)s\t%(message)s", level=logging.INFO
7272
)
7373
74-
The :py:class:`odcl.inference.TargetInterpreter` class handles inputs and outputs to the neural network for object detection. We give it paths to the model and labels, tell it whether to run on CPU or TPU, and set the threshold for detection.
74+
The :py:class:`uavfpy.odcl.inference.TargetInterpreter` class handles inputs and outputs to the neural network for object detection. We give it paths to the model and labels, tell it whether to run on CPU or TPU, and set the threshold for detection.
7575

76-
Instantiating a :py:class:`odcl.inference.TargetInterpreter` object takes a while, so this object should be created outside of a loop if latency is at issue.
76+
Instantiating a :py:class:`uavfpy.odcl.inference.TargetInterpreter` object takes a while, so this object should be created outside of a loop if latency is at issue.
7777

7878
.. code-block:: python
7979
@@ -86,13 +86,13 @@ Instantiating a :py:class:`odcl.inference.TargetInterpreter` object takes a whil
8686
order_key="efficientdetd0",
8787
)
8888
89-
Next, we create the :py:class:`odcl.inference.Tiler`, which handles the tiling of the input image. We are dealing with inputs that are very large compared to the inputs of the neural network; the tiler will decompose the image into overlapping tiles, feed the NN, and then parse NN outputs from the respective tiles back into the raw image.
89+
Next, we create the :py:class:`uavfpy.odcl.inference.Tiler`, which handles the tiling of the input image. We are dealing with inputs that are very large compared to the inputs of the neural network; the tiler will decompose the image into overlapping tiles, feed the NN, and then parse NN outputs from the respective tiles back into the raw image.
9090

91-
:py:class:`odcl.color.Color` is a class used to extract color information from found targets. For now, it does not take any arguments.
91+
:py:class:`uavfpy.odcl.color.Color` is a class used to extract color information from found targets. For now, it does not take any arguments.
9292

93-
:py:class:`odcl.utils.drawer.TargetDrawer` is a utility class used to draw bounding boxes. Passing it as an argument will draw bounding boxes on the raw image and store the result into the :py:class:`Pipeline`'s :py:attr:`drawn` attribute. Passing it will also open a window to display targets that were found, along with the shape color-mask. Therefore, it is useful for evaluating the performance of the pipeline in real time.
93+
:py:class:`uavfpy.odcl.utils.drawer.TargetDrawer` is a utility class used to draw bounding boxes. Passing it as an argument will draw bounding boxes on the raw image and store the result into the :py:class:`Pipeline`'s :py:attr:`drawn` attribute. Passing it will also open a window to display targets that were found, along with the shape color-mask. Therefore, it is useful for evaluating the performance of the pipeline in real time.
9494

95-
If a :py:class:`TargetDrawer` is not passed to the :py:class:`odcl.pipeline.Pipeline` constructor, the :py:class:`Pipeline` will not draw bounding boxes on the image, nor will found targets be displayed.
95+
If a :py:class:`TargetDrawer` is not passed to the :py:class:`uavfpy.odcl.pipeline.Pipeline` constructor, the :py:class:`Pipeline` will not draw bounding boxes on the image, nor will found targets be displayed.
9696

9797
.. code-block:: python
9898
@@ -108,7 +108,7 @@ If a :py:class:`TargetDrawer` is not passed to the :py:class:`odcl.pipeline.Pipe
108108
# create the pipeline object
109109
pipeline = Pipeline(interpreter, tiler, color, drawer)
110110
111-
The :py:meth:`odcl.pipeline.Pipeline.run` method takes an image and returns a list of found targets.
111+
The :py:meth:`uavfpy.odcl.pipeline.Pipeline.run` method takes an image and returns a list of found targets.
112112

113113
.. code-block:: python
114114

docs/overview.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ Purpose of This Software
1212

1313
This package is a collection of tools for UCI's competition team at the `AUVSI SUAS <https://www.auvsi-suas.org/>`_. The AUVSI SUAS is a student competition in which an Autonomous Aerial System navigates through waypoints, avoids other vehicles and static obstacles, identifies and submits objects on the ground, and performs mapping tasks.
1414

15-
This package contains python modules for:
15+
This :py:package:`uavfpy` contains python modules for:
1616

17-
* Autonomous Navigation (``planner``)
18-
* Object Detection, Classification, and Localization (``odcl``)
19-
* Interoperability with the AUVSI SUAS (``interop``)
17+
* Autonomous Navigation (:py:mod:`uavfpy.planner`)
18+
* Object Detection, Classification, and Localization (:py:mod:`uavfpy.odcl`)
19+
* Interoperability with the AUVSI SUAS
2020

2121
This package is intended to be deployed both on the vehicle and on the ground station. To orchestrate the mission and manage communications between the vehicle and the ground, we use `ROS Noetic <http://wiki.ros.org/noetic>`_.
2222

@@ -63,8 +63,8 @@ Repository Structure
6363

6464
Therefore, there are two branches in the repository:
6565

66-
* ``main`` -- contains the python package
67-
* ``ROS`` -- contains the ROS package
66+
* ``main`` -- contains the ``uavf`` python package
67+
* ``ROS`` -- contains the ``rosuavf`` ROS package
6868

6969
The development of these two branches are kept *entirely separate*.
7070

@@ -74,7 +74,7 @@ To install the package to system python (e.g., on board the UAV or on the Ground
7474
7575
pip install git+https://github.com/uci-uav-forge/uavf.git
7676
77-
outside of a virtual environment. This will install the ``uavf`` package into the system python. Then, from ``catkin_ws/src``, we run:
77+
outside of a virtual environment. This will install the :py:package:`uavfpy` package into the system python. Then, from ``catkin_ws/src``, we run:
7878

7979
.. code-block:: bash
8080
@@ -84,4 +84,4 @@ outside of a virtual environment. This will install the ``uavf`` package into th
8484
8585
catkin make
8686
87-
to checkout the ROS package and build it. Inside of the ROS software, we can import the python package and use its APIs.
87+
to checkout the ROS package and build it. Inside of the ROS software, we can import :py:package:`uavfpy` and use its APIs.

setup.cfg

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[metadata]
2-
name = odcl
3-
version = attr: odcl.__version__
2+
name = uavfpy
3+
version = attr: uavfpy.__version__
44
author = Mike Sutherland, An Dang, & the UAV Forge Team
55
author_email = msutherl@uci.edu
6-
url = https://uci-uav-forge.github.io/odcl/
7-
description = "UCI UAV Forge's Object Detection, Classification, and Localization Framework"
6+
url = https://uci-uav-forge.github.io/uavf/
7+
description = "UCI UAV Forge's Software for the AUVSI Student Unmanned Aerial Systems competition"
88
long_description = file: README.md
99
long_description_content_type = text/markdown
10-
keywords = object detection, uav
10+
keywords = object detection, uav, path planning
1111
license = MIT
1212
classifiers =
1313
Programming Language :: Python :: 3.7

src/odcl/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/odcl/version.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/uavfpy/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.1.0"

0 commit comments

Comments
 (0)