Skip to content

Commit 5483d54

Browse files
authored
Re-implement User Facing API (#69)
* Fixed issue with readme * Integrate HRL Support (#8) * Added missing type hints * Refactored to cleanup message sending and added support to send msg until ack * Added support for new HRL messages * Updated devices to use tuple key and ensure msg target in network * Added requirement to clone repo in readme * Resolved grammatical error * Updated readme to reflect require_ack change * Updated python requirement in readme and updated setup version * Resolved errors in structuring named value int message * Cleaned up readme formatting * Created dependencies section in readme * Update Message Commands and Handlers (#15) * Add HRL Support (#10) * Fixed issue with readme * Integrate HRL Support (#8) * Added missing type hints * Refactored to cleanup message sending and added support to send msg until ack * Added support for new HRL messages * Updated devices to use tuple key and ensure msg target in network * Added requirement to clone repo in readme * Resolved grammatical error * Updated readme to reflect require_ack change * Updated python requirement in readme and updated setup version * Resolved errors in structuring named value int message * Cleaned up readme formatting * Created dependencies section in readme * Removed ros commands, fixed gps, renamed outgoingmsg to agentmsg, fixed ack issue * fixed setup version * Cleaned up debug messages and fixed readme example * Add Param Setting and Reading (#19) * Resolved typo in readme * Re-update send command methods to use timeout instead of infinite loop * Refactored various send message functions into single function * Implemented starter waypoint and mission support * Added mission to agent object * Updated agent to have name field * Rename timeout period in agent * Modified agentmsg to be parent class and updated send method to used full msg * Refactored send message to be more usable and added new commands * Added waypoint and takeoff messages * Added simple takeoff and takeoff command support * Add catches to prevent invalid altitude settings * Code cleanup * Added missing method type hints * Fixed mission init and msgmap init * Updated common messages to use msg timeout * Fixed variable naming in msgs * Updated senders to check ack instead of in retry function * Add support to set parameters * Added support to set parameters and started process of enabling reading parameters * Cleaned up agent and modified parameters stored to be circular buffer * Added interface to read parameters * Removed unused files * Added assertions to message construction to ensure proper msg type is provided * Added debug statements to parameter read method * Resolved bugs in message sending and message map * Wrapped up implementation of initial parameter setting and reading feature * Removed unused comments * Refactored send message implementation to create new thread on call * Refactored parameter implementation to use independent threads * Removed log option and made just debug * Cleaned up parameter read implementation * Update README to Reflect Usage Changes (#31) * Updated readme example to use latest version of pymavswarm * Updated readme example to use latest version of pymavswarm * Resolve param retry error * Fixed incorrect mavlink message sent on takeoff command (#35) * Resolve Takeoff and Acknowledgement Bugs (#37) * Resolved typo in readme * Re-update send command methods to use timeout instead of infinite loop * Refactored various send message functions into single function * Implemented starter waypoint and mission support * Added mission to agent object * Updated agent to have name field * Rename timeout period in agent * Modified agentmsg to be parent class and updated send method to used full msg * Refactored send message to be more usable and added new commands * Added waypoint and takeoff messages * Added simple takeoff and takeoff command support * Add catches to prevent invalid altitude settings * Code cleanup * Added missing method type hints * Fixed mission init and msgmap init * Updated common messages to use msg timeout * Fixed variable naming in msgs * Updated senders to check ack instead of in retry function * Add support to set parameters * Added support to set parameters and started process of enabling reading parameters * Cleaned up agent and modified parameters stored to be circular buffer * Added interface to read parameters * Removed unused files * Added assertions to message construction to ensure proper msg type is provided * Added debug statements to parameter read method * Resolved bugs in message sending and message map * Wrapped up implementation of initial parameter setting and reading feature * Removed unused comments * Refactored send message implementation to create new thread on call * Refactored parameter implementation to use independent threads * Removed log option and made just debug * Cleaned up parameter read implementation * Resolved bugs in message acknowledgement and takeoff * Resolve Disconnect and Reconnect Bug (#40) * Update README Example to Use Latest Usage Changes (#32) * Fixed issue with readme * Integrate HRL Support (#8) * Added missing type hints * Refactored to cleanup message sending and added support to send msg until ack * Added support for new HRL messages * Updated devices to use tuple key and ensure msg target in network * Added requirement to clone repo in readme * Resolved grammatical error * Updated readme to reflect require_ack change * Updated python requirement in readme and updated setup version * Resolved errors in structuring named value int message * Cleaned up readme formatting * Created dependencies section in readme * Update Message Commands and Handlers (#15) * Add HRL Support (#10) * Fixed issue with readme * Integrate HRL Support (#8) * Added missing type hints * Refactored to cleanup message sending and added support to send msg until ack * Added support for new HRL messages * Updated devices to use tuple key and ensure msg target in network * Added requirement to clone repo in readme * Resolved grammatical error * Updated readme to reflect require_ack change * Updated python requirement in readme and updated setup version * Resolved errors in structuring named value int message * Cleaned up readme formatting * Created dependencies section in readme * Removed ros commands, fixed gps, renamed outgoingmsg to agentmsg, fixed ack issue * fixed setup version * Cleaned up debug messages and fixed readme example * Add Param Setting and Reading (#19) * Resolved typo in readme * Re-update send command methods to use timeout instead of infinite loop * Refactored various send message functions into single function * Implemented starter waypoint and mission support * Added mission to agent object * Updated agent to have name field * Rename timeout period in agent * Modified agentmsg to be parent class and updated send method to used full msg * Refactored send message to be more usable and added new commands * Added waypoint and takeoff messages * Added simple takeoff and takeoff command support * Add catches to prevent invalid altitude settings * Code cleanup * Added missing method type hints * Fixed mission init and msgmap init * Updated common messages to use msg timeout * Fixed variable naming in msgs * Updated senders to check ack instead of in retry function * Add support to set parameters * Added support to set parameters and started process of enabling reading parameters * Cleaned up agent and modified parameters stored to be circular buffer * Added interface to read parameters * Removed unused files * Added assertions to message construction to ensure proper msg type is provided * Added debug statements to parameter read method * Resolved bugs in message sending and message map * Wrapped up implementation of initial parameter setting and reading feature * Removed unused comments * Refactored send message implementation to create new thread on call * Refactored parameter implementation to use independent threads * Removed log option and made just debug * Cleaned up parameter read implementation * Update README to Reflect Usage Changes (#31) * Updated readme example to use latest version of pymavswarm * Updated readme example to use latest version of pymavswarm * Finalize Takeoff Command Integration (#36) * Fixed issue with readme * Integrate HRL Support (#8) * Added missing type hints * Refactored to cleanup message sending and added support to send msg until ack * Added support for new HRL messages * Updated devices to use tuple key and ensure msg target in network * Added requirement to clone repo in readme * Resolved grammatical error * Updated readme to reflect require_ack change * Updated python requirement in readme and updated setup version * Resolved errors in structuring named value int message * Cleaned up readme formatting * Created dependencies section in readme * Update Message Commands and Handlers (#15) * Add HRL Support (#10) * Fixed issue with readme * Integrate HRL Support (#8) * Added missing type hints * Refactored to cleanup message sending and added support to send msg until ack * Added support for new HRL messages * Updated devices to use tuple key and ensure msg target in network * Added requirement to clone repo in readme * Resolved grammatical error * Updated readme to reflect require_ack change * Updated python requirement in readme and updated setup version * Resolved errors in structuring named value int message * Cleaned up readme formatting * Created dependencies section in readme * Removed ros commands, fixed gps, renamed outgoingmsg to agentmsg, fixed ack issue * fixed setup version * Cleaned up debug messages and fixed readme example * Add Param Setting and Reading (#19) * Resolved typo in readme * Re-update send command methods to use timeout instead of infinite loop * Refactored various send message functions into single function * Implemented starter waypoint and mission support * Added mission to agent object * Updated agent to have name field * Rename timeout period in agent * Modified agentmsg to be parent class and updated send method to used full msg * Refactored send message to be more usable and added new commands * Added waypoint and takeoff messages * Added simple takeoff and takeoff command support * Add catches to prevent invalid altitude settings * Code cleanup * Added missing method type hints * Fixed mission init and msgmap init * Updated common messages to use msg timeout * Fixed variable naming in msgs * Updated senders to check ack instead of in retry function * Add support to set parameters * Added support to set parameters and started process of enabling reading parameters * Cleaned up agent and modified parameters stored to be circular buffer * Added interface to read parameters * Removed unused files * Added assertions to message construction to ensure proper msg type is provided * Added debug statements to parameter read method * Resolved bugs in message sending and message map * Wrapped up implementation of initial parameter setting and reading feature * Removed unused comments * Refactored send message implementation to create new thread on call * Refactored parameter implementation to use independent threads * Removed log option and made just debug * Cleaned up parameter read implementation * Update README to Reflect Usage Changes (#31) * Updated readme example to use latest version of pymavswarm * Updated readme example to use latest version of pymavswarm * Resolve param retry error * Fixed incorrect mavlink message sent on takeoff command (#35) * Resolve Merge Errors and Acknowledgement Bugs (#38) * Fixed issue with readme * Integrate HRL Support (#8) * Added missing type hints * Refactored to cleanup message sending and added support to send msg until ack * Added support for new HRL messages * Updated devices to use tuple key and ensure msg target in network * Added requirement to clone repo in readme * Resolved grammatical error * Updated readme to reflect require_ack change * Updated python requirement in readme and updated setup version * Resolved errors in structuring named value int message * Cleaned up readme formatting * Created dependencies section in readme * Update Message Commands and Handlers (#15) * Add HRL Support (#10) * Fixed issue with readme * Integrate HRL Support (#8) * Added missing type hints * Refactored to cleanup message sending and added support to send msg until ack * Added support for new HRL messages * Updated devices to use tuple key and ensure msg target in network * Added requirement to clone repo in readme * Resolved grammatical error * Updated readme to reflect require_ack change * Updated python requirement in readme and updated setup version * Resolved errors in structuring named value int message * Cleaned up readme formatting * Created dependencies section in readme * Removed ros commands, fixed gps, renamed outgoingmsg to agentmsg, fixed ack issue * fixed setup version * Cleaned up debug messages and fixed readme example * Add Param Setting and Reading (#19) * Resolved typo in readme * Re-update send command methods to use timeout instead of infinite loop * Refactored various send message functions into single function * Implemented starter waypoint and mission support * Added mission to agent object * Updated agent to have name field * Rename timeout period in agent * Modified agentmsg to be parent class and updated send method to used full msg * Refactored send message to be more usable and added new commands * Added waypoint and takeoff messages * Added simple takeoff and takeoff command support * Add catches to prevent invalid altitude settings * Code cleanup * Added missing method type hints * Fixed mission init and msgmap init * Updated common messages to use msg timeout * Fixed variable naming in msgs * Updated senders to check ack instead of in retry function * Add support to set parameters * Added support to set parameters and started process of enabling reading parameters * Cleaned up agent and modified parameters stored to be circular buffer * Added interface to read parameters * Removed unused files * Added assertions to message construction to ensure proper msg type is provided * Added debug statements to parameter read method * Resolved bugs in message sending and message map * Wrapped up implementation of initial parameter setting and reading feature * Removed unused comments * Refactored send message implementation to create new thread on call * Refactored parameter implementation to use independent threads * Removed log option and made just debug * Cleaned up parameter read implementation * Update README to Reflect Usage Changes (#31) * Updated readme example to use latest version of pymavswarm * Updated readme example to use latest version of pymavswarm * Resolve param retry error * Fixed incorrect mavlink message sent on takeoff command (#35) * Resolve Takeoff and Acknowledgement Bugs (#37) * Resolved typo in readme * Re-update send command methods to use timeout instead of infinite loop * Refactored various send message functions into single function * Implemented starter waypoint and mission support * Added mission to agent object * Updated agent to have name field * Rename timeout period in agent * Modified agentmsg to be parent class and updated send method to used full msg * Refactored send message to be more usable and added new commands * Added waypoint and takeoff messages * Added simple takeoff and takeoff command support * Add catches to prevent invalid altitude settings * Code cleanup * Added missing method type hints * Fixed mission init and msgmap init * Updated common messages to use msg timeout * Fixed variable naming in msgs * Updated senders to check ack instead of in retry function * Add support to set parameters * Added support to set parameters and started process of enabling reading parameters * Cleaned up agent and modified parameters stored to be circular buffer * Added interface to read parameters * Removed unused files * Added assertions to message construction to ensure proper msg type is provided * Added debug statements to parameter read method * Resolved bugs in message sending and message map * Wrapped up implementation of initial parameter setting and reading feature * Removed unused comments * Refactored send message implementation to create new thread on call * Refactored parameter implementation to use independent threads * Removed log option and made just debug * Cleaned up parameter read implementation * Resolved bugs in message acknowledgement and takeoff * Resolved failure to reconnect after disconnect * Added support for live hrl (#44) * Set Home Location (#46) * Update README Example to Use Latest Usage Changes (#32) * Fixed issue with readme * Integrate HRL Support (#8) * Added missing type hints * Refactored to cleanup message sending and added support to send msg until ack * Added support for new HRL messages * Updated devices to use tuple key and ensure msg target in network * Added requirement to clone repo in readme * Resolved grammatical error * Updated readme to reflect require_ack change * Updated python requirement in readme and updated setup version * Resolved errors in structuring named value int message * Cleaned up readme formatting * Created dependencies section in readme * Update Message Commands and Handlers (#15) * Add HRL Support (#10) * Fixed issue with readme * Integrate HRL Support (#8) * Added missing type hints * Refactored to cleanup message sending and added support to send msg until ack * Added support for new HRL messages * Updated devices to use tuple key and ensure msg target in network * Added requirement to clone repo in readme * Resolved grammatical error * Updated readme to reflect require_ack change * Updated python requirement in readme and updated setup version * Resolved errors in structuring named value int message * Cleaned up readme formatting * Created dependencies section in readme * Removed ros commands, fixed gps, renamed outgoingmsg to agentmsg, fixed ack issue * fixed setup version * Cleaned up debug messages and fixed readme example * Add Param Setting and Reading (#19) * Resolved typo in readme * Re-update send command methods to use timeout instead of infinite loop * Refactored various send message functions into single function * Implemented starter waypoint and mission support * Added mission to agent object * Updated agent to have name field * Rename timeout period in agent * Modified agentmsg to be parent class and updated send method to used full msg * Refactored send message to be more usable and added new commands * Added waypoint and takeoff messages * Added simple takeoff and takeoff command support * Add catches to prevent invalid altitude settings * Code cleanup * Added missing method type hints * Fixed mission init and msgmap init * Updated common messages to use msg timeout * Fixed variable naming in msgs * Updated senders to check ack instead of in retry function * Add support to set parameters * Added support to set parameters and started process of enabling reading parameters * Cleaned up agent and modified parameters stored to be circular buffer * Added interface to read parameters * Removed unused files * Added assertions to message construction to ensure proper msg type is provided * Added debug statements to parameter read method * Resolved bugs in message sending and message map * Wrapped up implementation of initial parameter setting and reading feature * Removed unused comments * Refactored send message implementation to create new thread on call * Refactored parameter implementation to use independent threads * Removed log option and made just debug * Cleaned up parameter read implementation * Update README to Reflect Usage Changes (#31) * Updated readme example to use latest version of pymavswarm * Updated readme example to use latest version of pymavswarm * Finalize Takeoff Command Integration (#36) * Fixed issue with readme * Integrate HRL Support (#8) * Added missing type hints * Refactored to cleanup message sending and added support to send msg until ack * Added support for new HRL messages * Updated devices to use tuple key and ensure msg target in network * Added requirement to clone repo in readme * Resolved grammatical error * Updated readme to reflect require_ack change * Updated python requirement in readme and updated setup version * Resolved errors in structuring named value int message * Cleaned up readme formatting * Created dependencies section in readme * Update Message Commands and Handlers (#15) * Add HRL Support (#10) * Fixed issue with readme * Integrate HRL Support (#8) * Added missing type hints * Refactored to cleanup message sending and added support to send msg until ack * Added support for new HRL messages * Updated devices to use tuple key and ensure msg target in network * Added requirement to clone repo in readme * Resolved grammatical error * Updated readme to reflect require_ack change * Updated python requirement in readme and updated setup version * Resolved errors in structuring named value int message * Cleaned up readme formatting * Created dependencies section in readme * Removed ros commands, fixed gps, renamed outgoingmsg to agentmsg, fixed ack issue * fixed setup version * Cleaned up debug messages and fixed readme example * Add Param Setting and Reading (#19) * Resolved typo in readme * Re-update send command methods to use timeout instead of infinite loop * Refactored various send message functions into single function * Implemented starter waypoint and mission support * Added mission to agent object * Updated agent to have name field * Rename timeout period in agent * Modified agentmsg to be parent class and updated send method to used full msg * Refactored send message to be more usable and added new commands * Added waypoint and takeoff messages * Added simple takeoff and takeoff command support * Add catches to prevent invalid altitude settings * Code cleanup * Added missing method type hints * Fixed mission init and msgmap init * Updated common messages to use msg timeout * Fixed variable naming in msgs * Updated senders to check ack instead of in retry function * Add support to set parameters * Added support to set parameters and started process of enabling reading parameters * Cleaned up agent and modified parameters stored to be circular buffer * Added interface to read parameters * Removed unused files * Added assertions to message construction to ensure proper msg type is provided * Added debug statements to parameter read method * Resolved bugs in message sending and message map * Wrapped up implementation of initial parameter setting and reading feature * Removed unused comments * Refactored send message implementation to create new thread on call * Refactored parameter implementation to use independent threads * Removed log option and made just debug * Cleaned up parameter read implementation * Update README to Reflect Usage Changes (#31) * Updated readme example to use latest version of pymavswarm * Updated readme example to use latest version of pymavswarm * Resolve param retry error * Fixed incorrect mavlink message sent on takeoff command (#35) * Resolve Merge Errors and Acknowledgement Bugs (#38) * Fixed issue with readme * Integrate HRL Support (#8) * Added missing type hints * Refactored to cleanup message sending and added support to send msg until ack * Added support for new HRL messages * Updated devices to use tuple key and ensure msg target in network * Added requirement to clone repo in readme * Resolved grammatical error * Updated readme to reflect require_ack change * Updated python requirement in readme and updated setup version * Resolved errors in structuring named value int message * Cleaned up readme formatting * Created dependencies section in readme * Update Message Commands and Handlers (#15) * Add HRL Support (#10) * Fixed issue with readme * Integrate HRL Support (#8) * Added missing type hints * Refactored to cleanup message sending and added support to send msg until ack * Added support for new HRL messages * Updated devices to use tuple key and ensure msg target in network * Added requirement to clone repo in readme * Resolved grammatical error * Updated readme to reflect require_ack change * Updated python requirement in readme and updated setup version * Resolved errors in structuring named value int message * Cleaned up readme formatting * Created dependencies section in readme * Removed ros commands, fixed gps, renamed outgoingmsg to agentmsg, fixed ack issue * fixed setup version * Cleaned up debug messages and fixed readme example * Add Param Setting and Reading (#19) * Resolved typo in readme * Re-update send command methods to use timeout instead of infinite loop * Refactored various send message functions into single function * Implemented starter waypoint and mission support * Added mission to agent object * Updated agent to have name field * Rename timeout period in agent * Modified agentmsg to be parent class and updated send method to used full msg * Refactored send message to be more usable and added new commands * Added waypoint and takeoff messages * Added simple takeoff and takeoff command support * Add catches to prevent invalid altitude settings * Code cleanup * Added missing method type hints * Fixed mission init and msgmap init * Updated common messages to use msg timeout * Fixed variable naming in msgs * Updated senders to check ack instead of in retry function * Add support to set parameters * Added support to set parameters and started process of enabling reading parameters * Cleaned up agent and modified parameters stored to be circular buffer * Added interface to read parameters * Removed unused files * Added assertions to message construction to ensure proper msg type is provided * Added debug statements to parameter read method * Resolved bugs in message sending and message map * Wrapped up implementation of initial parameter setting and reading feature * Removed unused comments * Refactored send message implementation to create new thread on call * Refactored parameter implementation to use independent threads * Removed log option and made just debug * Cleaned up parameter read implementation * Update README to Reflect Usage Changes (#31) * Updated readme example to use latest version of pymavswarm * Updated readme example to use latest version of pymavswarm * Resolve param retry error * Fixed incorrect mavlink message sent on takeoff command (#35) * Resolve Takeoff and Acknowledgement Bugs (#37) * Resolved typo in readme * Re-update send command methods to use timeout instead of infinite loop * Refactored various send message functions into single function * Implemented starter waypoint and mission support * Added mission to agent object * Updated agent to have name field * Rename timeout period in agent * Modified agentmsg to be parent class and updated send method to used full msg * Refactored send message to be more usable and added new commands * Added waypoint and takeoff messages * Added simple takeoff and takeoff command support * Add catches to prevent invalid altitude settings * Code cleanup * Added missing method type hints * Fixed mission init and msgmap init * Updated common messages to use msg timeout * Fixed variable naming in msgs * Updated senders to check ack instead of in retry function * Add support to set parameters * Added support to set parameters and started process of enabling reading parameters * Cleaned up agent and modified parameters stored to be circular buffer * Added interface to read parameters * Removed unused files * Added assertions to message construction to ensure proper msg type is provided * Added debug statements to parameter read method * Resolved bugs in message sending and message map * Wrapped up implementation of initial parameter setting and reading feature * Removed unused comments * Refactored send message implementation to create new thread on call * Refactored parameter implementation to use independent threads * Removed log option and made just debug * Cleaned up parameter read implementation * Resolved bugs in message acknowledgement and takeoff * Added support for resetting the home location of an agent * Cleaned up support for resetting home position * Integrate Support for All-In-One Takeoff Command (#49) * Created skeleton handler for all in one message * Added initial implementation of full takeoff commands * Added takeoff workflow to msg map * Cleaned up support for full takeoff command * Added arming delay and cleaned up msgs to support sequence commands * Add Home Position State (#54) * Added support to trigger home position reading * Reimplemented msg senders to support state change verification (#55) * Integrate Callback Support (#59) * Started process of integrating support for callbacks * Added common state to support observer pattern * Started process of applying code formatting * Continued redoing formatting for state and param * Reformatted Agent class * Started cleaning up mavswarm formatting * Cleaned up mission formatting * Cleaned up waypoint formatting * Refactored getters for mavswarm and started cleaning up connection formatting * Finished adding formatting changes to mavswarm class * Finished formatting and documenting connection class * Added PR template, added new event object, and started writing test cases * Cleaned up templates * Added test cases for mission * Fix message import * Updated states to use new event * Added tests for state * Fixed custom events setter * Resolved bugs in imports * Removed unused test files - to be integrated when sitl support is added * Require change in value to signal change event * Add support for optional context parameters into state objects * Removed unused agent property * Resolve access issues with generic state attributes * Resolved bugs with integration * Started process of integrating error codes into msg response * Added message state notifications * Fixed msg result sending and started integrating msg package support * Resolved bugs with msg packages and cleaned up msg responses * Added missing docstring * Resolved bugs associated with message, param retry * Added formatting * Started process of integrating parameter package and integrated dev container * Fixed import in base init file * Cleaned up dev container and started resolving linting errors * Continued resolving pylint errors * Continued linting process * Started paring down message senders * Started refactoring connection class and added type verification into msgs * Started refactoring senders and receivers into separate classes * continued refactoring process. added support for plugins * Continued refactoring: added thread pool for senders * Added thread pool executor to disconnect * Cleaned up message sending interface * Added copyright to files * Added pydocstyle to dockerfile * Renamed handler files to be more readable * Reconfigured linters continued refactoring process * Finalized senders and continued refactoring * Finalized message senders * Cleaned up message receivers * Started integrating parameter into message senders * Added parameter handling to senders * Lint event * Lint utils * Refactored messages * Updated message senders to use refactored messages * Lint swarm mission * Lint waypoint * Resolve docstring tone * Refactored and linted plugins * Started linting state * Finished linting state * Reconfigured unit tests * Cleaned up devcontainer and agent * Started refactoring process for connection and mavswarm * Refactored connection * Started process of removing message objects * Continued process of removing messages * Refactored send_command to use executor instead of generator * Updated implementation of pre-flight calibration * Added set home and get home commands * Added read parameter support * Resolved bugs in tests and started updating receivers * Integrated notifier dict and added arming example * Save point * Started integrating redirection layer * Resolved bugs associated with arming example * Added flight mode example * Started integrating modern package structure * Added pre-commit config file * Added support for adding custom message callbacks * Removed unused extension * Added missing docstrings * Added check state example and started integrating print statements for classes * Rename message to message * Added tox file * Started contributing guidelines * Cleaned up contributing headers * Fixed checkboxes in PR template * Italicized pr template instructions * Implemented initial version of takeoff sequence and added debug prints for classes * Added example demonstrating takeoff sequence execution * Added mavswarm subclass example * Fixed subclass docstring * Started examples documentation * Added descriptions to examples docs * Integrated support for pipenv * Finished implementation of primary commands * updated tox to test on multiple python versions * Updated response and started set parameter example * Finish set parameter example * cleaned up examples and added examples documentation * Cleaned up issue templates * Removed unnecessary part of header * Added issue template config * Added type aliases for commonly used types * Cleaned up examples, added set mode example, and cleaned up takeoff sequence * implement initial version of companion computer example * Added initial goto example * Cleaned up examples and resolved type errors in mavswarm * Saving point for contributing guidelines * Remove unnecessary type hints * Cleaned up types and continued contributing guidelines * Resolve typos * Added aliases for common callables * Resolve type error * Added support for file logging * Added file logging example * Cleaned up readme * Remove code formatting from headers * Added file logger for messages * Resolved errors in test receivers * Added log parser tool * renamed typing to types * Fixed spelling error * Fixed capitalization in readme
1 parent 36b33d4 commit 5483d54

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+9177
-3016
lines changed

.devcontainer/Dockerfile

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###################################################################
2+
# Base Stage: Includes only the packages required for production
3+
###################################################################
4+
FROM python:3 as base
5+
6+
ENV DEBIAN_FRONTEND=noninteractive
7+
8+
# Update pip to latest version
9+
RUN pip3 install --upgrade pip
10+
11+
# Install all required Python packages
12+
RUN pip3 install \
13+
pandas \
14+
monotonic \
15+
pymavlink \
16+
pyserial
17+
18+
19+
###################################################################
20+
# Development Stage: Creates a development environment
21+
###################################################################
22+
FROM base as development
23+
24+
# Install dev apt packages
25+
RUN apt-get update \
26+
&& apt-get -y install --no-install-recommends \
27+
apt-utils \
28+
python3-dev \
29+
nano \
30+
vim \
31+
git \
32+
&& apt-get autoremove -y \
33+
&& apt-get clean -y \
34+
&& rm -rf /var/lib/apt/lists/*
35+
36+
# Install debugging/linting Python packages
37+
RUN pip3 install \
38+
pipenv \
39+
black \
40+
flake8 \
41+
isort \
42+
pydocstyle \
43+
mypy \
44+
bandit \
45+
coverage \
46+
pre-commit \
47+
tox
48+
49+
ARG USERNAME=developer
50+
ARG USER_UID=1000
51+
ARG USER_GID=$USER_UID
52+
53+
# Add non-root user
54+
RUN groupadd --gid $USER_GID $USERNAME \
55+
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
56+
&& apt-get update \
57+
&& apt-get install -y sudo \
58+
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
59+
&& chmod 0440 /etc/sudoers.d/$USERNAME \
60+
&& rm -rf /var/lib/apt/lists/*
61+
62+
# Add the .local/bin directory to the path
63+
ENV PATH "${PATH}:/home/$USERNAME/.local/bin"

.devcontainer/devcontainer.json

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
"name": "pymavswarm",
3+
"dockerFile": "Dockerfile",
4+
"build": {
5+
"args": {
6+
"WORKSPACE": "${containerWorkspaceFolder}"
7+
}
8+
},
9+
"remoteUser": "developer",
10+
"runArgs": [
11+
"--network=host",
12+
"--cap-add=SYS_PTRACE",
13+
"--security-opt=seccomp:unconfined",
14+
"--security-opt=apparmor:unconfined",
15+
"--volume=/dev:/dev",
16+
"--privileged"
17+
],
18+
"settings": {
19+
"terminal.integrated.profiles.linux": {
20+
"bash": {
21+
"path": "/bin/bash"
22+
}
23+
},
24+
"terminal.integrated.defaultProfile.linux": "bash",
25+
"editor.formatOnSave": true,
26+
"editor.tabSize": 4,
27+
"editor.defaultFormatter": "esbenp.prettier-vscode",
28+
"editor.rulers": [88],
29+
"rewrap.autoWrap.enabled": true,
30+
"rewrap.wrappingColumn": 80,
31+
"rewrap.wholeComment": true,
32+
"python.linting.enabled": true,
33+
"python.linting.flake8Enabled": true,
34+
"python.linting.pylintEnabled": false,
35+
"python.linting.pydocstyleEnabled": true,
36+
"python.linting.mypyEnabled": true,
37+
"python.formatting.provider": "black",
38+
"python.formatting.blackPath": "/usr/local/bin/black",
39+
"python.testing.unittestArgs": [
40+
"-v",
41+
"-s",
42+
"./pymavswarm",
43+
"-p",
44+
"test*.py"
45+
],
46+
"python.testing.pytestEnabled": false,
47+
"python.testing.unittestEnabled": true,
48+
"python.sortImports.args": [
49+
"--profile",
50+
"black",
51+
"--project",
52+
"pymavswarm"
53+
],
54+
"[python]": {
55+
"editor.rulers": [88],
56+
"editor.tabSize": 4,
57+
"editor.defaultFormatter": "ms-python.python",
58+
"editor.codeActionsOnSave": {
59+
"source.organizeImports": true
60+
}
61+
},
62+
"[markdown]": {
63+
"editor.rulers": [80],
64+
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
65+
},
66+
"[dockerfile]": {
67+
"editor.quickSuggestions": {
68+
"strings": true
69+
},
70+
"editor.defaultFormatter": "ms-azuretools.vscode-docker"
71+
},
72+
"[toml]": {
73+
"editor.defaultFormatter": "tamasfe.even-better-toml"
74+
},
75+
"autoDocstring.startOnNewLine": false,
76+
"search.exclude": {
77+
"**/node_modules": true,
78+
"**/bower_components": true,
79+
"**/*.code-search": true,
80+
"**/build": true,
81+
"**/install": true,
82+
"**/log": true
83+
}
84+
},
85+
"extensions": [
86+
"ms-azuretools.vscode-docker",
87+
"ms-python.python",
88+
"njpwerner.autodocstring",
89+
"ms-python.vscode-pylance",
90+
"DavidAnson.vscode-markdownlint",
91+
"esbenp.prettier-vscode",
92+
"LittleFoxTeam.vscode-python-test-adapter",
93+
"tamasfe.even-better-toml"
94+
],
95+
"postStartCommand": "pip3 install -e ."
96+
}

.github/CONTRIBUTING.md

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
# Contributing to pymavswarm
2+
3+
Thank you for considering contributing to `pymavswarm`! This document serves
4+
to provide a set of guidelines for contributing.
5+
6+
Contributions include but are not restricted to:
7+
8+
- Contributing to the `pymavswarm` codebase
9+
- Writing documentation
10+
- Writing tests
11+
- Performing field tests
12+
- Reporting bugs
13+
- Answering [discussion questions](https://github.com/unl-nimbus-lab/pymavswarm/discussions)
14+
15+
## Workflow
16+
17+
- Send all pull requests to the `main` branch (unless otherwise requested)
18+
- Limit each pull request to resolving a single [issue](https://github.com/unl-nimbus-lab/pymavswarm/issues)
19+
- It is your responsibility to ensure that your development branch is up-to-date
20+
with the `main` branch. You may either rebase on `main` or merge `main` into
21+
your development branch.
22+
- Always test and document your code. We also encourage performing field tests
23+
for significant changes.
24+
- Ensure that your changes pass our CI. We will not review your PR until the CI
25+
passes.
26+
27+
## Setting up a local development environment
28+
29+
`pymavswarm` provides two ways to configure a local development environment:
30+
31+
1. Using our [VSCode development container](https://code.visualstudio.com/docs/remote/containers)
32+
2. Using [Pipenv](https://pipenv.pypa.io/en/latest/)
33+
34+
A VSCode development container has been provided to offer a fully sandboxed
35+
development environment. This environment includes all development Python
36+
packages (e.g., `pre-commit`) used by the `pymavswarm` development team and
37+
utilizes a variety of VSCode packages that make it easy to run tests and to
38+
ensure that all style conventions are followed. Follow the instructions
39+
[here](https://code.visualstudio.com/docs/remote/containers) to learn how to
40+
install and launch development containers using VSCode. Once these steps have
41+
been completed, launch the `pymavswarm` project using the provided development
42+
image. Launching the development image will also install `pymavswarm` in
43+
editable mode.
44+
45+
A `Pipfile` has also been provided to enable support for creating and managing
46+
a [virtual environment](https://virtualenv.pypa.io/en/latest/) using
47+
[Pipenv](https://pipenv.pypa.io/en/latest/). To use a virtual environment,
48+
first ensure that `pipenv` has been [installed](https://pipenv.pypa.io/en/latest/).
49+
After successfully installing `pipenv`, navigate to the base `pymavswarm/`
50+
directory:
51+
52+
```bash
53+
cd path/to/pymavswarm/
54+
```
55+
56+
Next, install the project dependencies:
57+
58+
```bash
59+
pipenv install --dev
60+
```
61+
62+
We also recommend installing `pymavswarm` in editable mode:
63+
64+
```bash
65+
pip3 install -e .
66+
```
67+
68+
Finally, launch the virtual environment:
69+
70+
```bash
71+
pipenv shell
72+
```
73+
74+
At this point, running the project tests should work and pass (in both the
75+
development container and the virtual environment):
76+
77+
```bash
78+
python3 -m unittest
79+
```
80+
81+
## Coding guidelines
82+
83+
The following section documents the `pymavswarm` coding guidelines (e.g.,
84+
styling, convention, etc.)
85+
86+
### Linting
87+
88+
`pymavswarm` uses `pre-commit` to run code formatting checks such as `black`,
89+
`flake8`, `pydocstyle`, and `isort`. If you have installed the project
90+
using one of our recommended local development configurations, you may run
91+
`pre-commit` using the following command:
92+
93+
```bash
94+
pre-commit run --all-files
95+
```
96+
97+
We *strongly* recommend running `pre-commit` before committing your code to
98+
ensure that your commit follows our code style conventions. Any warnings from
99+
these checks will cause the CI to fail.
100+
101+
### Type hints
102+
103+
`pymavswarm` uses [PEP 484](https://peps.python.org/pep-0484/) type-hints. Any
104+
new development should use type hints. When using type-hints, it is preferred
105+
that built-in types are used (see [PEP 585](https://peps.python.org/pep-0585/)).
106+
The `Optional` type-hint should be avoided in favor of `| None`. For example,
107+
rather than
108+
109+
```python
110+
from typing import Optional
111+
112+
agent_location: Optional[Location] = None
113+
```
114+
115+
You should use
116+
117+
```python
118+
from __future__ import annotations
119+
120+
agent_location: Location | None = None
121+
```
122+
123+
Commonly used types will appear in `pymavswarm._types`. These should be used
124+
where applicable.
125+
126+
## Writing documentation
127+
128+
`pymavswarm` uses Sphinx to generate online developer documentation from
129+
docstrings. Broadly, docstrings should adhere to
130+
[PEP 257](https://peps.python.org/pep-0257/), unless otherwise specified.
131+
132+
All docstrings should use triple quotation marks. Multi-line docstrings should
133+
start on new-lines. Parameters and their types should be prefaced with `:param`
134+
and `:type`, respectively. All methods should have a short summary. An extended
135+
summary should be used when an in-depth explanation of a method is required.
136+
137+
The following example demonstrates the Sphinx markdown conventions used by
138+
`pymavswarm`:
139+
140+
```python
141+
def compute_location(current_location: Location | None = None) -> Location | None:
142+
"""
143+
Demonstrate how to write a docstring.
144+
145+
Docstrings are a great way to add developer documentation.
146+
147+
:param current_location: current location of an agent, defaults to None
148+
:type current_location: Location | None, optional
149+
:return: computed agent location
150+
:rtype: Location | None
151+
"""
152+
return current_location
153+
```
154+
155+
### Testing
156+
157+
Unit tests should be implemented using `unittest`. Unit tests should be
158+
implemented whenever possible. Functional tests should be named `def test_*`.
159+
It is suggested that field tests are also performed when adding a code
160+
contribution; however, this is not required (we understand that not everyone
161+
has a fleet of drones laying around).
162+
163+
## Support
164+
165+
If you have questions regarding your contribution, please create a new
166+
discussion post on the `pymavswarm` [Discussions](https://github.com/unl-nimbus-lab/pymavswarm/discussions)
167+
board.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,43 @@
11
---
22
name: Bug report
3-
about: Create a report to help us improve
4-
title: ''
5-
labels: bug
6-
assignees: ''
3+
about: Create a bug report
4+
title: "[BUG]: "
5+
labels: "bug"
6+
assignees: ""
77

88
---
99

10-
**Describe the bug**
11-
A clear and concise description of what the bug is.
10+
## Describe the bug
1211

13-
**To Reproduce**
14-
Steps to reproduce the behavior:
15-
1. Go to '...'
16-
2. Click on '....'
17-
3. Scroll down to '....'
18-
4. See error
12+
*A clear and concise description of what the bug is.*
1913

20-
**Expected behavior**
21-
A clear and concise description of what you expected to happen.
14+
## To Reproduce
2215

23-
**Screenshots**
24-
If applicable, add screenshots to help explain your problem.
16+
*Steps to reproduce the behavior:*
2517

26-
**Desktop (please complete the following information):**
27-
- OS: [e.g. iOS]
28-
- Browser [e.g. chrome, safari]
29-
- Version [e.g. 22]
18+
1. *Go to '...'*
19+
2. *Click on '....'*
20+
3. *Scroll down to '....'*
21+
4. *See error*
3022

31-
**Smartphone (please complete the following information):**
32-
- Device: [e.g. iPhone6]
33-
- OS: [e.g. iOS8.1]
34-
- Browser [e.g. stock browser, safari]
35-
- Version [e.g. 22]
23+
## Expected behavior
3624

37-
**Additional context**
38-
Add any other context about the problem here.
25+
*A clear and concise description of what you expected to happen.*
26+
27+
## Screenshots
28+
29+
*If applicable, provide the traceback for the error. Ensure that this traceback
30+
is provided using code formatting.*
31+
32+
## Project Version
33+
34+
*Provide the version that the issue occurred on (e.g. 0.1.0)*
35+
36+
## Desktop
37+
38+
*Please provide information regarding hardware platform that this error
39+
occurred on (e.g., Raspberry Pi 4 running Ubuntu 22.04)*
40+
41+
## Additional context
42+
43+
*Add any other context about the problem here.*

0 commit comments

Comments
 (0)