mirror of
https://github.com/AdaCore/OpenUxAS.git
synced 2026-02-12 13:07:16 -08:00
* Intermediate progress * Update run-example Delaying while OpenAMASE opens appears to be important. It takes a while for OpenAMASE to actually open, and the user is supposed to click on the run button before OpenUxAS instances start. The five seconds offered by some examples is insufficient, and may not be guaranteed in any case. We make the delay configurable, so that the user can remove or adjust it, as needed. We also make sure that we kill off forked subprocesses and report if we're unable to do so. * Rename the Ada Waterway Search example Suggesting this naming convention so that we can create other examples that use the Ada UxAS more easily. * Add two additional configs Configs for Examples 03 and 05 * Update config for example 03 This should work out of the box on modern Linux. * Add config-driven delay after OpenAMASE starts This is important for the Ada example, although it may be related to the way in which we implemented it. * Enhance run-example - Fix error when OpenAMASE does not run - Handle Ctrl-C gracefully (shut down all subprocesses) - Allow a relative or absolute path to the example to be specified - this is nice, because then tab-complete works * Add missing example configs Also make sure that each ends with a newline (nice for `cat`). * Use Test_SimulationTime service to sync with AMASE Removes the need for any timeout to start UxAS instances. * Fix example 05_AssignTasks Adding the Test_SimulationTime service + a longer timeout on task assignment allows the example to run correctly.
Waterway Search Example
This is an example of running UxAS service that communicates to the Amase simulation in order to generate plans and an assignment for one of two UAVs to monitor a waterway. For more background see the file 'doc/UxAS_UserManual.pdf'
Files:
cfg_WaterwaySearch.xml- This isrunUxAS_WaterwaySearch.sh-runAMASE_WaterwaySearch.sh-Scenario_WaterwaySearch.xml-MessagesToSend/- most of the messages in this directory are explained in the document,WaterwayExample_MessageFLow.pdf. A few are explained below:MessagesToSend/LINE_Waterway_Deschutes.kml- a 'kml' file from Google Earth, used to define the line search task.MessagesToSend/KmlToBoundariesTasks.WaterwaySearch.py- a python script that process the kml file and generates LMCP messages for the example.
Running the Example:
- open a ternimal window in the directory: "examples/02_Example_WaterwaySearch/"
- enter the command:
./runAMASE_WaterwaySearch.sh - start the Amase simulation (i.e. push the play button)
- open another ternimal window in the directory: "examples/02_Example_WaterwaySearch/"
- enter the command:
./runUxAS_WaterwaySearch.sh
What Happens?
- When the Amase simulation starts, two UAVs will be initialized and begin loitering about to different loactions. Note: Amase uses NASA Worldwind for background imagery. If no imagery is available, Amase's background will be black.
- .3 seconds after UxAS starts a line representing the LineSearchTask will appear in Amase
- 5 seconds after UxAS start an AutomationRequest is sent to UxAS which kick off the mission
- Once the plans have been calculated and a UAV is assigned to perform the LineSearchTask, waypoints will be displayed in Amase and the UAV will start following them.
- When the UAV reaches the first waypoint of the LineSearchTask, its sensor will move to follow the river.
Things to Try:
- Edit the file, 'Scenario_WaterwaySearch.xml' and change locations of the UAV so the assignment calculation produces different results.