Files
OpenUxAS/README.md

176 lines
8.4 KiB
Markdown
Raw Permalink Normal View History

# License
2017-10-17 13:59:10 -04:00
*OpenUxAS* is developed by the Air Force Research Laboratory, Aerospace System Directorate, Power and Control Division.
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
The LMCP specification and all source code for *OpenUxAS* is publicly released under the Air Force Open Source Agreement Version 1.0. See LICENSE.md for complete details.
The Air Force Open Source Agreement closely follows the NASA Open Source Agreement Verion 1.3.
**NOTE the terms of the license include registering use of the software by emailing <a href="mailto:afrl.rq.opensource@us.af.mil?subject=OpenUxAS Registration&body=Please register me for use of OpenUxAS. Name: ____________">afrl.rq.opensource@us.af.mil</a>.**
OpenUxAS
========
[![Build Status](https://github.com/afrl-rq/OpenUxAS/workflows/Build/badge.svg)](https://github.com/afrl-rq/OpenUxAS/actions)
UxAS is a collection of modular services that interact via a common message-passing architecture.
Similar in design to Robot Operating System (ROS), each service subscribes to messages in the system and responds to queries.
UxAS uses the open-source library ZeroMQ to connect all services to each other.
The content of each message conforms to the Light-weight Message Control Protocol (LMCP) format.
Software classes providing LMCP message creation, access, and serialization/deserialization are automatically generated from simple XML description documents (see the *LmcpGen* project).
These same XML descriptions detail the exact data fields, units, and default values for each message.
Since all UxAS services communicate with LMCP formatted messages, a developer can quickly determine the input/output data for each service. In a very real sense, the message traffic in the system exposes the interaction of the services that are required to achieve autonomous behavior.
Consider a simple example: the automated construction of the flight pattern to conduct surveillance of geometric lines (e.g. perimeters, roads, coasts).
A “line search task” message describes the line to be imaged and the desired camera angle.
Using this input description, a line search service calculates the appropriate waypoints to achieve the proper view angle.
When the UAV arrives at the first waypoint corresponding to the line search task, the line search service continuously updates the desired camera pointing location to smoothly step the camera along the intended route.
In addition to surveillance pattern automation, UxAS contains services that automate route planning, coordinate behavior among multiple vehicles, connect with external software, validate mission requests, log and diagram message traffic, and optimize task ordering.
In all, UxAS has approximately 30 services.
A core functionality provided by UxAS is the mechanism to calculate near-optimal task allocation across teams of unmanned vehicles.
With a collection of tasks that require servicing and a pool of vehicles available to service those tasks, UxAS is able to determine which vehicle should do which task in the proper order.
This task assignment pipeline is carried out by a series of services working together in a complex sequence.
OpenUxAS is a complex project, so there's a lot to talk about here.
If you want to get started using OpenUxAS as quickly as possible, you can jump to the [quick-start guide](#quick-start).
We've organized this README into sections, to simplify navigation.
*Table of Contents*
1. [Quick Start](#quick-start)
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
2. [Using OpenUxAS](#using)
3. [Developing OpenUxAS](#developing)
4. [Building the Documentation](#docs)
2017-05-30 14:51:32 -04:00
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
Throughout the remainder of the README, we will write commands that you should enter at your Linux command line like this:
OpenUxAS$ command argument
This means that you have changed to the directory `OpenUxAS` and you are going to execute the command `command` with arguments `argument`.
If you would like to copy-paste commands from this README, you should only copy the part that begins after the `$`.
# 1. Quick Start<a name="quick-start" />
2017-05-30 14:51:32 -04:00
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
We've tried to make getting started with OpenUxAS as simple as possible.
Before you begin, you will need:
1. Ubuntu 20.04
2. git
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
Use git to clone this repository:
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
$ git clone https://github.com/afrl-rq/OpenUxAS
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
Then, use the provided `anod` command to fetch and build the dependencies for OpenUxAS and finally to build OpenUxAS:
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
OpenUxAS$ ./anod build uxas
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
Then, use anod to build OpenAMASE, which provides simulation capabilities for OpenUxAS:
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
OpenUxAS$ ./anod build amase
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
Now you can run OpenUxAS examples:
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
OpenUxAS$ ./run-example 02_Example_WaterwaySearch
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
# 2. Using OpenUxAS<a name="using" />
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
If your goal is to experiment with OpenUxAS, the best way to do that is to explore the examples that are provided as part of this repository.
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
First, you will need to build OpenUxAS and OpenAMASE.
You can follow the instructions in [Quick Start](#quick-start), above.
The simplest example is the Hello World example.
You can run the Hello World example like this:
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
OpenUxAS$ ./run-example 01_HelloWorld
Then, you can run other examples like this:
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
OpenUxAS$ ./run-example 02_Example_WaterwaySearch
You can get a list of available examples by running:
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
OpenUxAS$ ./run-example --list
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
# 3. Developing OpenUxAS<a name="developing" />
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
If you wish to develop OpenUxAS, the easiest way to get started is to follow the [Quick Start](#quick-start) instructions, above.
This step is essential because the provided `anod` command will get and install all third-party dependencies needed to build OpenUxAS.
These dependencies are installed locally in the repository.
The Makefile knows how to find them, so you will not have to do any additional configuration of your environment.
Once you have cloned this repository and built OpenUxAS using anod, you can use `make` for incremental builds, like this:
OpenUxAS$ make -j all
The `run-example` and `tests/run-tests` scripts will then select the binary built by `make`, allowing you to see the effects of and test your changes.
## 3.1. IDE Support
If you use [Visual Studio Code](https://code.visualstudio.com/) (VS Code) for development, search paths for IntelliSense have been set so that references to third-party dependencies can be resolved.
Additionally, build and clean tasks have been set up that use the Makefile.
If you use another IDE for development, you will need to configure the IDE so that references to third-party dependencies can be resolved.
These details are out of scope for this README, but will be available on the OpenUxAS documentation site.
## 3.2. Running the Tests
Once you have built OpenUxAS, you can run the tests.
Tests are found under the `tests` directory and are language specific.
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
### 3.2.1. C++ Tests
The C++ tests are found under `tests/cpp`.
You can run these tests like this:
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
OpenUxAS/tests/cpp$ ./run-tests
More information about the C++ tests, including how to develop new tests, is provided in `tests/cpp/README.md`.
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
### 3.2.2. SPARK Proofs
The SPARK proofs can be replayed and compared to prior results using the script found under `tests/proof`, like this:
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
OpenUxAS/tests/proof$ ./run-proofs
## 3.3. Modifying LmcpGen or OpenAMASE
If you need to modify LmcpGen or OpenAMASE to support your OpenUxAS development, the provided `anod` command provides a command to help simplify project setup.
Simply run:
OpenUxAS$ ./anod devel-setup lmcp
or:
OpenUxAS$ ./anod devel-setup amase
Anod will clone the requested repository and place the clone under a new directory named `develop`.
Anod will then use the cloned LmcpGen and/or OpenAMASE repository when doing builds.
Additionally, the `run-example` script will use the cloned OpenAMASE when running examples.
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
# 4. Building the Documentation<a name="docs" />
There are two parts to the OpenUxAS documentation:
1. a user manual;
2. Doxygen-generated reference documentation for the C++ code.
The user manual is written in LaTeX and requires a full TeX distribution to build.
To simplify building the documentation, we have provided a script in `resources` that will attempt to install needed packages on Ubuntu and then build the documentation.
Run it like this:
OpenUxAS$ resources/build_documentation.sh
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
# 5. Troubleshooting<a name="troubleshooting[" />
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
If things seem to be going wrong, all of the scripts offer increased verbosity that might help diagnose problems.
For example, passing `-vv` to the provided `anod` command will cause each command executed by anod to be printed:
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
OpenUxAS$ ./anod -vv build
Bootstrap Integration (#24) * Integrate OpenUxAS-bootstrap into OpenUxAS This commit represents a complete, working integration along with several key enhancements. Note that the README is entirely unchanged and not suitable. ***NOTE: the build will fail currently because of a problem with e3*** e3 provides no way to modify the list of excluded globs for sync_tree; this will need to be fixed. The bootstrap script works and will download and install needed support for anod. The instructions printed at the end of the install are out of date; the user doesn't need to do anything more than call anod with ./anod build uxas The top-level anod script takes care of activating the python venv and then calls the python anod script. The user can also `source anod`, which will then register anod as a shell function, allowing simpler invocation and a working setenv command. Anod's devel setup no longer supports uxas, since that's superfluous. It does support lmcpgen and amase. They are placed in `develop` as before, although finding a better name for the containing directory seems nice. run-example works, as does resources/RunLmcpGen make works VS Code integration works There is definite room for improvement. Specifically, factoring the informtion about repository structure into some central set of includable scripts seems like it should be really useful. Likewise, anod's support should be a real python module so that it's easier to use. Finally, there's no reason not to automatically install the python venv and all needed support the first time anod is invokved (including from make). This would eliminate a needed step by the user. We could still retain the bootstrap script if desired. * Rename and create constants for repo structure This commit reorganizes the directories a bit and introduces better handling of pathnames through constants defined in paths.sh. Unfortunately, because of the way python handles environment variables, (and because we can't necessarily assume that python scripts are always invoked through shell scripts that call paths.sh) we have to duplicate a lot of the path information; this will hopefully be addressed in a future commit. * Refactor infrastructure and add github workflows. OpenUxAS anod support is now a proper python module named `uxas`. Paths within the uxas module are refactored. The module directory under infrastructure/uxas has the expected layout for a python module project and includes a tox.ini file so that tox can be used for development and in CI. infrastructure/install is now a script that calls into python scripts in infrastructure/install-libexec; these are not a proper python module, since that would create a chicken-and-egg problem. There is a tox.ini file here, too, for development and CI. infrastructure/bootstrap is the new bootstrap script, which is less useful now but still usable. Scripts have been updated as needed to take advantage of the uxas python module. In particular, anod and run-example check for the python venv and call into infrastructure/install if needed. * Add Ada support and improve scripts Added support for Ada back in by reactivating and updating install-gnat.py Added Ada build-prove workflow Refactored venv activation to paths.sh Added ensure_gnat, which will check for gnat on the path (via which) or will add a local install of GNAT CE to the path (if it's there) or will offer to install GNAT CE via install-gnat.py This means the user can always choose a different GNAT and it will be used; otherwise, the local install of GNAT CE will be used. Added wrapper shell scripts for the python testing and proof scripts so that the environment can be automatically configured. Updated the C++ workflow Note: sourcing anod and then running anod as a shell function isn't behaving quite right in either bash or zsh (and for different reasons). Needs further investigation. * Add debug output to print commands executed. This should address concern that users won't be able to figure out what the scripts are doing if things break and require manual intervention. Also modify the workflows so that they will run if critical scripts are updated. * Enhance run-example to better search for binaries. run-example now follows similar logic to run-tests in searching for binaries. uxas and uxas-ada are also special-cased so that searching locally and in anod should succeed as expected. The search order is: 1. path (using `which`) 2. local (obj/cpp/uxas or src/ada/uxas-ada) 3. anod (inside uxas-release or uxas-ada-release) run-example also follows similar logic in search for OpenAMASE: 1. specified via argument 2. local (develop/OpenAMASE) 3. anod (inside amse) I believe these have all been tested. Help / error strings have been updated so that they are consistent with the new infrastructure. Debug output has been improved to be more consistent with that provided by e3 (but doesn't actually directly use e3, still). This commit also improves the .gitignore for ada support and updates the Makefile so that it removes the binary on clean. * Update README and scripts. Create a temporary README with testing instructions. Also fix some issues in the debug output of the scripts (the $ was not escaped properly in some instances). * Relativize path to anod in run-example This looks nicer and better supports the common case: in which the user runs run-example from the repo root. * Fix python version in Makefile Makefile was using python to determine the platform; this was one of a few remaining non-python3 uses of `python`. Having fixed it, things seem to work smoothly on a machine where python ≠ python3. * Don't install GNAT CE by default. Most users won't want to build Ada, so offering to install GNAT CE by default is likely to just be confusing. * Change the way Java is installed. Rather than installing Java (OpenJDK 13) by way of anod in the sandbox, instead install Java (OpenJDK 11) by way of apt. This results in Java being available system-wide and avoids having to put ant/java on the path using anod commands for things like generating LMCP. Update workflows to install Java using the appropriate github action. This should reduce the number of spurious build failures we've encountered. * Fix run-example issue for uxas-ada. The shared library for uxas-ada wasn't being placed on the path. Additionally, there was an unconditional and unlogged exit leftover from testing in the python script. * Update anod self-install process to be automatic. Rather than running the install script in interactive mode, give the user a full message up front that explains what will happen, followed by a choice to continue. Then, run the install script in automatic mode. This avoids some confusion identified whereby the script seems to ask multiple times to do things in a way that's not particularly helpful when the expectation is that it will just "take care of things" for the user. * Update the README This new version of the README is tailored to the changes that were made to integrated -bootstrap into this repository. It is intended to be minimal and simple. Detail will be provided later to the documentation site that AFRL is setting up. Once that site is live, links will be made from this README to that site. * Improve script with debug_and_run Rather than printing the string for a command and then separately issuing the command, we pass the string form of the command to a debug print method and then eval the string. This removes duplication and ensures that the printed command really is the command that is executed. * Minor improvements to README Fix a couple of typos.
2021-04-01 15:30:51 -04:00
These commands can be entered manually, hopefully allowing problems to be identified and worked around.