diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml
index 870235f..3980489 100644
--- a/.github/workflows/doc.yml
+++ b/.github/workflows/doc.yml
@@ -20,7 +20,7 @@ jobs:
- uses: ros-tooling/action-ros-ci@0.3.5
id: action_ros_ci_step
with:
- package-name: suave suave_msgs suave_missions suave_metacontrol system_modes mavros mavros_wrapper mros2_reasoner mros2_msgs
+ package-name: suave suave_monitor suave_metrics suave_msgs suave_missions suave_metacontrol system_modes mavros mavros_wrapper mros2_reasoner mros2_msgs
target-ros2-distro: humble
skip-tests: true
vcs-repo-file-url: https://raw.githubusercontent.com/kas-lab/suave/main/suave.rosinstall
diff --git a/.gitignore b/.gitignore
index 88daa43..9bd015a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+docs/source/_autosummary/
docs/build/
!suave_missions/results/seams2023_results.csv
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ec4863b..7e7ac5b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,13 +13,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
2. Added recharge battery task
-3. Added qa_comparison_operator to water_visibility in suave.owl
+4. Added battery_constraint argument to mission [PR #155]
-4. Documentation with sphinx
+5. Added qa_comparison_operator to water_visibility in suave.owl
-5. CI to build sphinx documentation
+6. Documentation with sphinx
-6. Added mission metrics node
+7. CI to build sphinx documentation
+
+8. Added mission metrics node
### Changed
@@ -29,6 +31,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
3. Mission config default parameters
+4. Refactored repository. Created new packages : suave_monitor, and suave_metrics. Moved suave_metacontrol under suave_managing
### Fixed
diff --git a/docs/source/_autosummary/suave.bluerov_gazebo.BlueROVGazebo.rst b/docs/source/_autosummary/suave.bluerov_gazebo.BlueROVGazebo.rst
deleted file mode 100644
index 5712535..0000000
--- a/docs/source/_autosummary/suave.bluerov_gazebo.BlueROVGazebo.rst
+++ /dev/null
@@ -1,37 +0,0 @@
-BlueROVGazebo
-=============
-
-.. currentmodule:: suave.bluerov_gazebo
-
-.. autoclass:: BlueROVGazebo
-
-
-
-
- .. automethod:: __init__
- .. automethod:: convert_gz_to_local_pose
- .. automethod:: gazebo_pos_cb
- .. automethod:: setpoint_position_gz
- .. automethod:: setpoint_position_local
-
-
- .. rubric:: Methods
-
- .. autosummary::
-
- ~BlueROVGazebo.__init__
- ~BlueROVGazebo.convert_gz_to_local_pose
- ~BlueROVGazebo.gazebo_pos_cb
- ~BlueROVGazebo.setpoint_position_gz
- ~BlueROVGazebo.setpoint_position_local
-
-
-
-
-
- .. rubric:: Attributes
-
- .. autosummary::
-
-
-
\ No newline at end of file
diff --git a/docs/source/_autosummary/suave.bluerov_gazebo.rst b/docs/source/_autosummary/suave.bluerov_gazebo.rst
deleted file mode 100644
index 01fc837..0000000
--- a/docs/source/_autosummary/suave.bluerov_gazebo.rst
+++ /dev/null
@@ -1,30 +0,0 @@
-suave.bluerov\_gazebo
-=====================
-
-.. automodule:: suave.bluerov_gazebo
-
-
-
-
-
-
-
-
-
-
-
- .. rubric:: Classes
-
- .. autosummary::
- :toctree:
-
- BlueROVGazebo
-
-
-
-
-
-
-
-
-
diff --git a/docs/source/_autosummary/suave.follow_pipeline_lc.PipelineFollowerLC.rst b/docs/source/_autosummary/suave.follow_pipeline_lc.PipelineFollowerLC.rst
deleted file mode 100644
index ed546e9..0000000
--- a/docs/source/_autosummary/suave.follow_pipeline_lc.PipelineFollowerLC.rst
+++ /dev/null
@@ -1,43 +0,0 @@
-PipelineFollowerLC
-==================
-
-.. currentmodule:: suave.follow_pipeline_lc
-
-.. autoclass:: PipelineFollowerLC
-
-
-
-
- .. automethod:: __init__
- .. automethod:: calc_distance
- .. automethod:: follow_pipeline
- .. automethod:: on_activate
- .. automethod:: on_cleanup
- .. automethod:: on_configure
- .. automethod:: on_deactivate
- .. automethod:: on_shutdown
-
-
- .. rubric:: Methods
-
- .. autosummary::
-
- ~PipelineFollowerLC.__init__
- ~PipelineFollowerLC.calc_distance
- ~PipelineFollowerLC.follow_pipeline
- ~PipelineFollowerLC.on_activate
- ~PipelineFollowerLC.on_cleanup
- ~PipelineFollowerLC.on_configure
- ~PipelineFollowerLC.on_deactivate
- ~PipelineFollowerLC.on_shutdown
-
-
-
-
-
- .. rubric:: Attributes
-
- .. autosummary::
-
-
-
\ No newline at end of file
diff --git a/docs/source/_autosummary/suave.follow_pipeline_lc.main.rst b/docs/source/_autosummary/suave.follow_pipeline_lc.main.rst
deleted file mode 100644
index 348a315..0000000
--- a/docs/source/_autosummary/suave.follow_pipeline_lc.main.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-suave.follow\_pipeline\_lc.main
-===============================
-
-.. currentmodule:: suave.follow_pipeline_lc
-
-.. autofunction:: main
\ No newline at end of file
diff --git a/docs/source/_autosummary/suave.follow_pipeline_lc.rst b/docs/source/_autosummary/suave.follow_pipeline_lc.rst
deleted file mode 100644
index 9a1a2ad..0000000
--- a/docs/source/_autosummary/suave.follow_pipeline_lc.rst
+++ /dev/null
@@ -1,37 +0,0 @@
-suave.follow\_pipeline\_lc
-==========================
-
-.. automodule:: suave.follow_pipeline_lc
-
-
-
-
-
-
-
- .. rubric:: Functions
-
- .. autosummary::
- :toctree:
-
- main
-
-
-
-
-
- .. rubric:: Classes
-
- .. autosummary::
- :toctree:
-
- PipelineFollowerLC
-
-
-
-
-
-
-
-
-
diff --git a/docs/source/_autosummary/suave.pipeline_detection.PipelineDetection.rst b/docs/source/_autosummary/suave.pipeline_detection.PipelineDetection.rst
deleted file mode 100644
index 6b454ac..0000000
--- a/docs/source/_autosummary/suave.pipeline_detection.PipelineDetection.rst
+++ /dev/null
@@ -1,43 +0,0 @@
-PipelineDetection
-=================
-
-.. currentmodule:: suave.pipeline_detection
-
-.. autoclass:: PipelineDetection
-
-
-
-
- .. automethod:: __init__
- .. automethod:: calculate_interpolated_path
- .. automethod:: compare_poses
- .. automethod:: detect_pipeline_cb
- .. automethod:: get_interpolated_path_cb
- .. automethod:: interpolate_line_by_points
- .. automethod:: pipeline_pose_cb
- .. automethod:: sort_pipe_path
-
-
- .. rubric:: Methods
-
- .. autosummary::
-
- ~PipelineDetection.__init__
- ~PipelineDetection.calculate_interpolated_path
- ~PipelineDetection.compare_poses
- ~PipelineDetection.detect_pipeline_cb
- ~PipelineDetection.get_interpolated_path_cb
- ~PipelineDetection.interpolate_line_by_points
- ~PipelineDetection.pipeline_pose_cb
- ~PipelineDetection.sort_pipe_path
-
-
-
-
-
- .. rubric:: Attributes
-
- .. autosummary::
-
-
-
\ No newline at end of file
diff --git a/docs/source/_autosummary/suave.pipeline_detection.main.rst b/docs/source/_autosummary/suave.pipeline_detection.main.rst
deleted file mode 100644
index 6376514..0000000
--- a/docs/source/_autosummary/suave.pipeline_detection.main.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-suave.pipeline\_detection.main
-==============================
-
-.. currentmodule:: suave.pipeline_detection
-
-.. autofunction:: main
\ No newline at end of file
diff --git a/docs/source/_autosummary/suave.pipeline_detection.rst b/docs/source/_autosummary/suave.pipeline_detection.rst
deleted file mode 100644
index 865d5a1..0000000
--- a/docs/source/_autosummary/suave.pipeline_detection.rst
+++ /dev/null
@@ -1,37 +0,0 @@
-suave.pipeline\_detection
-=========================
-
-.. automodule:: suave.pipeline_detection
-
-
-
-
-
-
-
- .. rubric:: Functions
-
- .. autosummary::
- :toctree:
-
- main
-
-
-
-
-
- .. rubric:: Classes
-
- .. autosummary::
- :toctree:
-
- PipelineDetection
-
-
-
-
-
-
-
-
-
diff --git a/docs/source/_autosummary/suave.pipeline_detection_wv.PipelineDetectionWV.rst b/docs/source/_autosummary/suave.pipeline_detection_wv.PipelineDetectionWV.rst
deleted file mode 100644
index 4731798..0000000
--- a/docs/source/_autosummary/suave.pipeline_detection_wv.PipelineDetectionWV.rst
+++ /dev/null
@@ -1,33 +0,0 @@
-PipelineDetectionWV
-===================
-
-.. currentmodule:: suave.pipeline_detection_wv
-
-.. autoclass:: PipelineDetectionWV
-
-
-
-
- .. automethod:: __init__
- .. automethod:: compare_poses
- .. automethod:: diagnostics_cb
-
-
- .. rubric:: Methods
-
- .. autosummary::
-
- ~PipelineDetectionWV.__init__
- ~PipelineDetectionWV.compare_poses
- ~PipelineDetectionWV.diagnostics_cb
-
-
-
-
-
- .. rubric:: Attributes
-
- .. autosummary::
-
-
-
\ No newline at end of file
diff --git a/docs/source/_autosummary/suave.pipeline_detection_wv.main.rst b/docs/source/_autosummary/suave.pipeline_detection_wv.main.rst
deleted file mode 100644
index d52d288..0000000
--- a/docs/source/_autosummary/suave.pipeline_detection_wv.main.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-suave.pipeline\_detection\_wv.main
-==================================
-
-.. currentmodule:: suave.pipeline_detection_wv
-
-.. autofunction:: main
\ No newline at end of file
diff --git a/docs/source/_autosummary/suave.pipeline_detection_wv.rst b/docs/source/_autosummary/suave.pipeline_detection_wv.rst
deleted file mode 100644
index dbc1a7c..0000000
--- a/docs/source/_autosummary/suave.pipeline_detection_wv.rst
+++ /dev/null
@@ -1,37 +0,0 @@
-suave.pipeline\_detection\_wv
-=============================
-
-.. automodule:: suave.pipeline_detection_wv
-
-
-
-
-
-
-
- .. rubric:: Functions
-
- .. autosummary::
- :toctree:
-
- main
-
-
-
-
-
- .. rubric:: Classes
-
- .. autosummary::
- :toctree:
-
- PipelineDetectionWV
-
-
-
-
-
-
-
-
-
diff --git a/docs/source/_autosummary/suave.recover_thrusters_lc.RecoverThrustersLC.rst b/docs/source/_autosummary/suave.recover_thrusters_lc.RecoverThrustersLC.rst
deleted file mode 100644
index 83ed15d..0000000
--- a/docs/source/_autosummary/suave.recover_thrusters_lc.RecoverThrustersLC.rst
+++ /dev/null
@@ -1,43 +0,0 @@
-RecoverThrustersLC
-==================
-
-.. currentmodule:: suave.recover_thrusters_lc
-
-.. autoclass:: RecoverThrustersLC
-
-
-
-
- .. automethod:: __init__
- .. automethod:: call_service
- .. automethod:: on_activate
- .. automethod:: on_cleanup
- .. automethod:: on_configure
- .. automethod:: on_deactivate
- .. automethod:: on_shutdown
- .. automethod:: recover_thrusters
-
-
- .. rubric:: Methods
-
- .. autosummary::
-
- ~RecoverThrustersLC.__init__
- ~RecoverThrustersLC.call_service
- ~RecoverThrustersLC.on_activate
- ~RecoverThrustersLC.on_cleanup
- ~RecoverThrustersLC.on_configure
- ~RecoverThrustersLC.on_deactivate
- ~RecoverThrustersLC.on_shutdown
- ~RecoverThrustersLC.recover_thrusters
-
-
-
-
-
- .. rubric:: Attributes
-
- .. autosummary::
-
-
-
\ No newline at end of file
diff --git a/docs/source/_autosummary/suave.recover_thrusters_lc.main.rst b/docs/source/_autosummary/suave.recover_thrusters_lc.main.rst
deleted file mode 100644
index 913c34f..0000000
--- a/docs/source/_autosummary/suave.recover_thrusters_lc.main.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-suave.recover\_thrusters\_lc.main
-=================================
-
-.. currentmodule:: suave.recover_thrusters_lc
-
-.. autofunction:: main
\ No newline at end of file
diff --git a/docs/source/_autosummary/suave.recover_thrusters_lc.rst b/docs/source/_autosummary/suave.recover_thrusters_lc.rst
deleted file mode 100644
index 10ee4c2..0000000
--- a/docs/source/_autosummary/suave.recover_thrusters_lc.rst
+++ /dev/null
@@ -1,37 +0,0 @@
-suave.recover\_thrusters\_lc
-============================
-
-.. automodule:: suave.recover_thrusters_lc
-
-
-
-
-
-
-
- .. rubric:: Functions
-
- .. autosummary::
- :toctree:
-
- main
-
-
-
-
-
- .. rubric:: Classes
-
- .. autosummary::
- :toctree:
-
- RecoverThrustersLC
-
-
-
-
-
-
-
-
-
diff --git a/docs/source/_autosummary/suave.spiral_search_lc.SpiralSearcherLC.rst b/docs/source/_autosummary/suave.spiral_search_lc.SpiralSearcherLC.rst
deleted file mode 100644
index 72f00bf..0000000
--- a/docs/source/_autosummary/suave.spiral_search_lc.SpiralSearcherLC.rst
+++ /dev/null
@@ -1,43 +0,0 @@
-SpiralSearcherLC
-================
-
-.. currentmodule:: suave.spiral_search_lc
-
-.. autoclass:: SpiralSearcherLC
-
-
-
-
- .. automethod:: __init__
- .. automethod:: on_activate
- .. automethod:: on_cleanup
- .. automethod:: on_configure
- .. automethod:: on_deactivate
- .. automethod:: on_shutdown
- .. automethod:: param_change_callback
- .. automethod:: publish
-
-
- .. rubric:: Methods
-
- .. autosummary::
-
- ~SpiralSearcherLC.__init__
- ~SpiralSearcherLC.on_activate
- ~SpiralSearcherLC.on_cleanup
- ~SpiralSearcherLC.on_configure
- ~SpiralSearcherLC.on_deactivate
- ~SpiralSearcherLC.on_shutdown
- ~SpiralSearcherLC.param_change_callback
- ~SpiralSearcherLC.publish
-
-
-
-
-
- .. rubric:: Attributes
-
- .. autosummary::
-
-
-
\ No newline at end of file
diff --git a/docs/source/_autosummary/suave.spiral_search_lc.main.rst b/docs/source/_autosummary/suave.spiral_search_lc.main.rst
deleted file mode 100644
index a35a6c3..0000000
--- a/docs/source/_autosummary/suave.spiral_search_lc.main.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-suave.spiral\_search\_lc.main
-=============================
-
-.. currentmodule:: suave.spiral_search_lc
-
-.. autofunction:: main
\ No newline at end of file
diff --git a/docs/source/_autosummary/suave.spiral_search_lc.rst b/docs/source/_autosummary/suave.spiral_search_lc.rst
deleted file mode 100644
index ff24033..0000000
--- a/docs/source/_autosummary/suave.spiral_search_lc.rst
+++ /dev/null
@@ -1,38 +0,0 @@
-suave.spiral\_search\_lc
-========================
-
-.. automodule:: suave.spiral_search_lc
-
-
-
-
-
-
-
- .. rubric:: Functions
-
- .. autosummary::
- :toctree:
-
- main
- spiral_points
-
-
-
-
-
- .. rubric:: Classes
-
- .. autosummary::
- :toctree:
-
- SpiralSearcherLC
-
-
-
-
-
-
-
-
-
diff --git a/docs/source/_autosummary/suave.spiral_search_lc.spiral_points.rst b/docs/source/_autosummary/suave.spiral_search_lc.spiral_points.rst
deleted file mode 100644
index e81af25..0000000
--- a/docs/source/_autosummary/suave.spiral_search_lc.spiral_points.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-suave.spiral\_search\_lc.spiral\_points
-=======================================
-
-.. currentmodule:: suave.spiral_search_lc
-
-.. autofunction:: spiral_points
\ No newline at end of file
diff --git a/docs/source/_autosummary/suave.task_bridge.TaskBridge.rst b/docs/source/_autosummary/suave.task_bridge.TaskBridge.rst
deleted file mode 100644
index c40c80b..0000000
--- a/docs/source/_autosummary/suave.task_bridge.TaskBridge.rst
+++ /dev/null
@@ -1,41 +0,0 @@
-TaskBridge
-==========
-
-.. currentmodule:: suave.task_bridge
-
-.. autoclass:: TaskBridge
-
-
-
-
- .. automethod:: __init__
- .. automethod:: call_service
- .. automethod:: forward_task_cancel_request
- .. automethod:: forward_task_request
- .. automethod:: task_cancel_cb
- .. automethod:: task_request
- .. automethod:: task_request_cb
-
-
- .. rubric:: Methods
-
- .. autosummary::
-
- ~TaskBridge.__init__
- ~TaskBridge.call_service
- ~TaskBridge.forward_task_cancel_request
- ~TaskBridge.forward_task_request
- ~TaskBridge.task_cancel_cb
- ~TaskBridge.task_request
- ~TaskBridge.task_request_cb
-
-
-
-
-
- .. rubric:: Attributes
-
- .. autosummary::
-
-
-
\ No newline at end of file
diff --git a/docs/source/_autosummary/suave.task_bridge.rst b/docs/source/_autosummary/suave.task_bridge.rst
deleted file mode 100644
index 0f7a40f..0000000
--- a/docs/source/_autosummary/suave.task_bridge.rst
+++ /dev/null
@@ -1,30 +0,0 @@
-suave.task\_bridge
-==================
-
-.. automodule:: suave.task_bridge
-
-
-
-
-
-
-
-
-
-
-
- .. rubric:: Classes
-
- .. autosummary::
- :toctree:
-
- TaskBridge
-
-
-
-
-
-
-
-
-
diff --git a/docs/source/_autosummary/suave.task_bridge_none.TaskBridgeNone.rst b/docs/source/_autosummary/suave.task_bridge_none.TaskBridgeNone.rst
deleted file mode 100644
index c5941e9..0000000
--- a/docs/source/_autosummary/suave.task_bridge_none.TaskBridgeNone.rst
+++ /dev/null
@@ -1,35 +0,0 @@
-TaskBridgeNone
-==============
-
-.. currentmodule:: suave.task_bridge_none
-
-.. autoclass:: TaskBridgeNone
-
-
-
-
- .. automethod:: __init__
- .. automethod:: call_sysmode_change_mode
- .. automethod:: forward_task_cancel_request
- .. automethod:: forward_task_request
-
-
- .. rubric:: Methods
-
- .. autosummary::
-
- ~TaskBridgeNone.__init__
- ~TaskBridgeNone.call_sysmode_change_mode
- ~TaskBridgeNone.forward_task_cancel_request
- ~TaskBridgeNone.forward_task_request
-
-
-
-
-
- .. rubric:: Attributes
-
- .. autosummary::
-
-
-
\ No newline at end of file
diff --git a/docs/source/_autosummary/suave.task_bridge_none.main.rst b/docs/source/_autosummary/suave.task_bridge_none.main.rst
deleted file mode 100644
index 70006c3..0000000
--- a/docs/source/_autosummary/suave.task_bridge_none.main.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-suave.task\_bridge\_none.main
-=============================
-
-.. currentmodule:: suave.task_bridge_none
-
-.. autofunction:: main
\ No newline at end of file
diff --git a/docs/source/_autosummary/suave.task_bridge_none.rst b/docs/source/_autosummary/suave.task_bridge_none.rst
deleted file mode 100644
index cfd9eff..0000000
--- a/docs/source/_autosummary/suave.task_bridge_none.rst
+++ /dev/null
@@ -1,37 +0,0 @@
-suave.task\_bridge\_none
-========================
-
-.. automodule:: suave.task_bridge_none
-
-
-
-
-
-
-
- .. rubric:: Functions
-
- .. autosummary::
- :toctree:
-
- main
-
-
-
-
-
- .. rubric:: Classes
-
- .. autosummary::
- :toctree:
-
- TaskBridgeNone
-
-
-
-
-
-
-
-
-
diff --git a/docs/source/_autosummary/suave.thruster_monitor.ThrusterMonitor.rst b/docs/source/_autosummary/suave.thruster_monitor.ThrusterMonitor.rst
deleted file mode 100644
index 1bb40ac..0000000
--- a/docs/source/_autosummary/suave.thruster_monitor.ThrusterMonitor.rst
+++ /dev/null
@@ -1,37 +0,0 @@
-ThrusterMonitor
-===============
-
-.. currentmodule:: suave.thruster_monitor
-
-.. autoclass:: ThrusterMonitor
-
-
-
-
- .. automethod:: __init__
- .. automethod:: call_service
- .. automethod:: change_thruster_status
- .. automethod:: read_thruster_events
- .. automethod:: thruster_event_cb
-
-
- .. rubric:: Methods
-
- .. autosummary::
-
- ~ThrusterMonitor.__init__
- ~ThrusterMonitor.call_service
- ~ThrusterMonitor.change_thruster_status
- ~ThrusterMonitor.read_thruster_events
- ~ThrusterMonitor.thruster_event_cb
-
-
-
-
-
- .. rubric:: Attributes
-
- .. autosummary::
-
-
-
\ No newline at end of file
diff --git a/docs/source/_autosummary/suave.thruster_monitor.main.rst b/docs/source/_autosummary/suave.thruster_monitor.main.rst
deleted file mode 100644
index aa0dfd0..0000000
--- a/docs/source/_autosummary/suave.thruster_monitor.main.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-suave.thruster\_monitor.main
-============================
-
-.. currentmodule:: suave.thruster_monitor
-
-.. autofunction:: main
\ No newline at end of file
diff --git a/docs/source/_autosummary/suave.thruster_monitor.rst b/docs/source/_autosummary/suave.thruster_monitor.rst
deleted file mode 100644
index bcf7fab..0000000
--- a/docs/source/_autosummary/suave.thruster_monitor.rst
+++ /dev/null
@@ -1,37 +0,0 @@
-suave.thruster\_monitor
-=======================
-
-.. automodule:: suave.thruster_monitor
-
-
-
-
-
-
-
- .. rubric:: Functions
-
- .. autosummary::
- :toctree:
-
- main
-
-
-
-
-
- .. rubric:: Classes
-
- .. autosummary::
- :toctree:
-
- ThrusterMonitor
-
-
-
-
-
-
-
-
-
diff --git a/docs/source/_autosummary/suave.water_visibility_observer.WaterVisibilityObserver.rst b/docs/source/_autosummary/suave.water_visibility_observer.WaterVisibilityObserver.rst
deleted file mode 100644
index ff25fe0..0000000
--- a/docs/source/_autosummary/suave.water_visibility_observer.WaterVisibilityObserver.rst
+++ /dev/null
@@ -1,31 +0,0 @@
-WaterVisibilityObserver
-=======================
-
-.. currentmodule:: suave.water_visibility_observer
-
-.. autoclass:: WaterVisibilityObserver
-
-
-
-
- .. automethod:: __init__
- .. automethod:: qa_publisher_cb
-
-
- .. rubric:: Methods
-
- .. autosummary::
-
- ~WaterVisibilityObserver.__init__
- ~WaterVisibilityObserver.qa_publisher_cb
-
-
-
-
-
- .. rubric:: Attributes
-
- .. autosummary::
-
-
-
\ No newline at end of file
diff --git a/docs/source/_autosummary/suave.water_visibility_observer.main.rst b/docs/source/_autosummary/suave.water_visibility_observer.main.rst
deleted file mode 100644
index 036a1c7..0000000
--- a/docs/source/_autosummary/suave.water_visibility_observer.main.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-suave.water\_visibility\_observer.main
-======================================
-
-.. currentmodule:: suave.water_visibility_observer
-
-.. autofunction:: main
\ No newline at end of file
diff --git a/docs/source/_autosummary/suave.water_visibility_observer.rst b/docs/source/_autosummary/suave.water_visibility_observer.rst
deleted file mode 100644
index 899732d..0000000
--- a/docs/source/_autosummary/suave.water_visibility_observer.rst
+++ /dev/null
@@ -1,37 +0,0 @@
-suave.water\_visibility\_observer
-=================================
-
-.. automodule:: suave.water_visibility_observer
-
-
-
-
-
-
-
- .. rubric:: Functions
-
- .. autosummary::
- :toctree:
-
- main
-
-
-
-
-
- .. rubric:: Classes
-
- .. autosummary::
- :toctree:
-
- WaterVisibilityObserver
-
-
-
-
-
-
-
-
-
diff --git a/docs/source/api.rst b/docs/source/api.rst
index 27d4f30..493760f 100644
--- a/docs/source/api.rst
+++ b/docs/source/api.rst
@@ -13,8 +13,8 @@ API
suave.spiral_search_lc
suave.task_bridge
suave.task_bridge_none
- suave.thruster_monitor
- suave.water_visibility_observer
+ suave_monitor.thruster_monitor
+ suave_monitor.water_visibility_observer
.. teste
.. ------
diff --git a/suave/launch/mavros.launch.py b/suave/launch/mavros.launch.py
deleted file mode 100644
index 29f51ed..0000000
--- a/suave/launch/mavros.launch.py
+++ /dev/null
@@ -1,71 +0,0 @@
-from ament_index_python.packages import get_package_share_directory
-
-from launch_ros.actions import Node
-from launch import LaunchDescription
-from launch.actions import DeclareLaunchArgument
-from launch.substitutions import LaunchConfiguration
-
-
-def generate_launch_description():
- fcu_url_arg = LaunchConfiguration('fcu_url')
- gcs_url_arg = LaunchConfiguration('gcs_url')
- system_id_arg = LaunchConfiguration('system_id')
- component_id_arg = LaunchConfiguration('component_id')
- tgt_system_arg = LaunchConfiguration('target_system_id')
- tgt_component_arg = LaunchConfiguration('target_component_id')
-
- fcu_url_arg = DeclareLaunchArgument(
- 'fcu_url',
- default_value='udp://:14551@:14555'
- )
-
- gcs_url_arg = DeclareLaunchArgument(
- 'gcs_url',
- default_value='udp://@localhost:14550'
- )
-
- system_id_arg = DeclareLaunchArgument(
- 'system_id',
- default_value='255'
- )
-
- component_id_arg = DeclareLaunchArgument(
- 'component_id',
- default_value='240'
- )
-
- tgt_system_arg = DeclareLaunchArgument(
- 'target_system_id',
- default_value='1'
- )
-
- tgt_component_arg = DeclareLaunchArgument(
- 'target_component_id',
- default_value='1'
- )
-
- mavros_node = Node(
- package='mavros',
- executable='mavros_node',
- arguments=[
- '--ros-args',
- '-p', 'fcu_url:=udp://127.0.0.1:14551@14555'
- ],
- parameters=[{
- 'fcu_url': LaunchConfiguration('fcu_url'),
- 'gcs_url': LaunchConfiguration('gcs_url'),
- 'system_id': LaunchConfiguration('system_id'),
- 'component_id': LaunchConfiguration('component_id'),
- 'target_system_id': LaunchConfiguration('target_system_id'),
- 'target_component_id': LaunchConfiguration('target_component_id'),
- }]
- )
- return LaunchDescription([
- fcu_url_arg,
- gcs_url_arg,
- system_id_arg,
- component_id_arg,
- tgt_system_arg,
- tgt_component_arg,
- mavros_node
- ])
diff --git a/suave/launch/suave.launch.py b/suave/launch/suave.launch.py
index 61f9d0b..d145262 100644
--- a/suave/launch/suave.launch.py
+++ b/suave/launch/suave.launch.py
@@ -26,31 +26,31 @@ def generate_launch_description():
'mission_config.yaml')
water_visibility_node = Node(
- package='suave',
+ package='suave_monitor',
executable='water_visibility_observer',
name='water_visibility_observer_node',
parameters=[mission_config],
)
battery_monitor_node = Node(
- package='suave',
+ package='suave_monitor',
executable='battery_monitor',
name='battery_monitor',
parameters=[mission_config],
)
- pipeline_detection_wv_node = Node(
- package='suave',
- executable='pipeline_detection_wv',
- )
-
thruster_monitor_node = Node(
- package='suave',
+ package='suave_monitor',
executable='thruster_monitor',
name='thruster_monitor',
parameters=[mission_config]
)
+ pipeline_detection_wv_node = Node(
+ package='suave',
+ executable='pipeline_detection_wv',
+ )
+
spiral_search_node = Node(
package='suave',
executable='spiral_search',
diff --git a/suave/setup.py b/suave/setup.py
index 31d67d3..b329fa7 100644
--- a/suave/setup.py
+++ b/suave/setup.py
@@ -27,15 +27,12 @@
# tests_require=['pytest'],
entry_points={
'console_scripts': [
- 'battery_monitor = suave.battery_monitor:main',
'pipeline_detection = suave.pipeline_node:main',
'pipeline_detection_wv = suave.pipeline_detection_wv:main',
'recharge_battery = suave.recharge_battery_lc:main',
'spiral_search = suave.spiral_search_lc:main',
'follow_pipeline = suave.follow_pipeline_lc:main',
- 'thruster_monitor = suave.thruster_monitor:main',
'recover_thrusters = suave.recover_thrusters_lc:main',
- 'water_visibility_observer = suave.water_visibility_observer:main',
'task_bridge_none = suave.task_bridge_none:main',
],
},
diff --git a/suave_metacontrol/config/suave.owl b/suave_managing/suave_metacontrol/config/suave.owl
similarity index 100%
rename from suave_metacontrol/config/suave.owl
rename to suave_managing/suave_metacontrol/config/suave.owl
diff --git a/suave_metacontrol/launch/launch_reasoner.launch.py b/suave_managing/suave_metacontrol/launch/launch_reasoner.launch.py
similarity index 100%
rename from suave_metacontrol/launch/launch_reasoner.launch.py
rename to suave_managing/suave_metacontrol/launch/launch_reasoner.launch.py
diff --git a/suave_metacontrol/launch/metacontrol.launch.py b/suave_managing/suave_metacontrol/launch/metacontrol.launch.py
similarity index 100%
rename from suave_metacontrol/launch/metacontrol.launch.py
rename to suave_managing/suave_metacontrol/launch/metacontrol.launch.py
diff --git a/suave_metacontrol/launch/suave_metacontrol.launch.py b/suave_managing/suave_metacontrol/launch/suave_metacontrol.launch.py
similarity index 100%
rename from suave_metacontrol/launch/suave_metacontrol.launch.py
rename to suave_managing/suave_metacontrol/launch/suave_metacontrol.launch.py
diff --git a/suave_metacontrol/package.xml b/suave_managing/suave_metacontrol/package.xml
similarity index 100%
rename from suave_metacontrol/package.xml
rename to suave_managing/suave_metacontrol/package.xml
diff --git a/suave_metacontrol/resource/suave_metacontrol b/suave_managing/suave_metacontrol/resource/suave_metacontrol
similarity index 100%
rename from suave_metacontrol/resource/suave_metacontrol
rename to suave_managing/suave_metacontrol/resource/suave_metacontrol
diff --git a/suave_metacontrol/setup.cfg b/suave_managing/suave_metacontrol/setup.cfg
similarity index 100%
rename from suave_metacontrol/setup.cfg
rename to suave_managing/suave_metacontrol/setup.cfg
diff --git a/suave_metacontrol/setup.py b/suave_managing/suave_metacontrol/setup.py
similarity index 91%
rename from suave_metacontrol/setup.py
rename to suave_managing/suave_metacontrol/setup.py
index a077447..2bb7b21 100644
--- a/suave_metacontrol/setup.py
+++ b/suave_managing/suave_metacontrol/setup.py
@@ -31,8 +31,6 @@
'suave_reasoner = suave_metacontrol.suave_reasoner:main',
'task_bridge_metacontrol = ' +
' suave_metacontrol.task_bridge_metacontrol:main',
- 'task_bridge_random = ' +
- ' suave_metacontrol.task_bridge_random:main',
],
},
)
diff --git a/suave_metacontrol/suave_metacontrol/__init__.py b/suave_managing/suave_metacontrol/suave_metacontrol/__init__.py
similarity index 100%
rename from suave_metacontrol/suave_metacontrol/__init__.py
rename to suave_managing/suave_metacontrol/suave_metacontrol/__init__.py
diff --git a/suave_metacontrol/suave_metacontrol/suave_reasoner.py b/suave_managing/suave_metacontrol/suave_metacontrol/suave_reasoner.py
similarity index 100%
rename from suave_metacontrol/suave_metacontrol/suave_reasoner.py
rename to suave_managing/suave_metacontrol/suave_metacontrol/suave_reasoner.py
diff --git a/suave_metacontrol/suave_metacontrol/task_bridge_metacontrol.py b/suave_managing/suave_metacontrol/suave_metacontrol/task_bridge_metacontrol.py
similarity index 100%
rename from suave_metacontrol/suave_metacontrol/task_bridge_metacontrol.py
rename to suave_managing/suave_metacontrol/suave_metacontrol/task_bridge_metacontrol.py
diff --git a/suave_metacontrol/test/test_copyright.py b/suave_managing/suave_metacontrol/test/test_copyright.py
similarity index 100%
rename from suave_metacontrol/test/test_copyright.py
rename to suave_managing/suave_metacontrol/test/test_copyright.py
diff --git a/suave_metacontrol/test/test_flake8.py b/suave_managing/suave_metacontrol/test/test_flake8.py
similarity index 100%
rename from suave_metacontrol/test/test_flake8.py
rename to suave_managing/suave_metacontrol/test/test_flake8.py
diff --git a/suave_metacontrol/test/test_pep257.py b/suave_managing/suave_metacontrol/test/test_pep257.py
similarity index 100%
rename from suave_metacontrol/test/test_pep257.py
rename to suave_managing/suave_metacontrol/test/test_pep257.py
diff --git a/suave_managing/suave_random/LICENSE b/suave_managing/suave_random/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/suave_managing/suave_random/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/suave_metacontrol/launch/suave_random.launch.py b/suave_managing/suave_random/launch/suave_random.launch.py
similarity index 78%
rename from suave_metacontrol/launch/suave_random.launch.py
rename to suave_managing/suave_random/launch/suave_random.launch.py
index a84f89b..9b63e8f 100644
--- a/suave_metacontrol/launch/suave_random.launch.py
+++ b/suave_managing/suave_random/launch/suave_random.launch.py
@@ -3,17 +3,13 @@
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
-from launch.actions import DeclareLaunchArgument
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
-from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node
def generate_launch_description():
- time_limit = LaunchConfiguration('time_limit')
-
mission_config = os.path.join(
get_package_share_directory('suave_missions'),
'config',
@@ -21,8 +17,6 @@ def generate_launch_description():
pkg_suave_path = get_package_share_directory(
'suave')
- pkg_suave_metacontrol_path = get_package_share_directory(
- 'suave_metacontrol')
suave_launch_path = os.path.join(
pkg_suave_path,
@@ -36,7 +30,7 @@ def generate_launch_description():
)
task_bridge_node = Node(
- package='suave_metacontrol',
+ package='suave_random',
executable='task_bridge_random',
parameters=[mission_config],
)
diff --git a/suave_managing/suave_random/package.xml b/suave_managing/suave_random/package.xml
new file mode 100644
index 0000000..87a3d05
--- /dev/null
+++ b/suave_managing/suave_random/package.xml
@@ -0,0 +1,18 @@
+
+
+
+ suave_random
+ 0.0.0
+ Implementation of a random managing system for SUAVE
+ gus
+ Apache-2.0
+
+ ament_copyright
+ ament_flake8
+ ament_pep257
+ python3-pytest
+
+
+ ament_python
+
+
diff --git a/suave_managing/suave_random/resource/suave_random b/suave_managing/suave_random/resource/suave_random
new file mode 100644
index 0000000..e69de29
diff --git a/suave_managing/suave_random/setup.cfg b/suave_managing/suave_random/setup.cfg
new file mode 100644
index 0000000..3f0cf46
--- /dev/null
+++ b/suave_managing/suave_random/setup.cfg
@@ -0,0 +1,4 @@
+[develop]
+script_dir=$base/lib/suave_random
+[install]
+install_scripts=$base/lib/suave_random
diff --git a/suave_managing/suave_random/setup.py b/suave_managing/suave_random/setup.py
new file mode 100644
index 0000000..2b495e3
--- /dev/null
+++ b/suave_managing/suave_random/setup.py
@@ -0,0 +1,31 @@
+import os
+from glob import glob
+from setuptools import find_packages, setup
+
+package_name = 'suave_random'
+
+setup(
+ name=package_name,
+ version='0.0.0',
+ packages=find_packages(exclude=['test']),
+ data_files=[
+ ('share/ament_index/resource_index/packages',
+ ['resource/' + package_name]),
+ ('share/' + package_name, ['package.xml']),
+ (os.path.join('share', package_name, 'launch'),
+ glob('launch/*launch.[pxy][yma]*')),
+ ],
+ install_requires=['setuptools'],
+ zip_safe=True,
+ maintainer='gus',
+ maintainer_email='g.rezendesilva@tudelft.nl',
+ description='Implementation of a random managing system for SUAVE',
+ license='Apache-2.0',
+ tests_require=['pytest'],
+ entry_points={
+ 'console_scripts': [
+ 'task_bridge_random = ' +
+ ' suave_random.task_bridge_random:main',
+ ],
+ },
+)
diff --git a/suave_managing/suave_random/suave_random/__init__.py b/suave_managing/suave_random/suave_random/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/suave_metacontrol/suave_metacontrol/task_bridge_random.py b/suave_managing/suave_random/suave_random/task_bridge_random.py
similarity index 93%
rename from suave_metacontrol/suave_metacontrol/task_bridge_random.py
rename to suave_managing/suave_random/suave_random/task_bridge_random.py
index 666c5f1..50dc9d5 100644
--- a/suave_metacontrol/suave_metacontrol/task_bridge_random.py
+++ b/suave_managing/suave_random/suave_random/task_bridge_random.py
@@ -4,9 +4,7 @@
import sys
from rclpy.executors import MultiThreadedExecutor
-from rclpy.callback_groups import MutuallyExclusiveCallbackGroup
from suave.task_bridge_none import TaskBridgeNone
-from system_modes_msgs.srv import ChangeMode
from system_modes_msgs.srv import GetAvailableModes
@@ -51,7 +49,6 @@ def forward_task_request(self, function):
modes_cli, GetAvailableModes.Request()).available_modes
)
- cli = self.sm_cli_dict[function]
return self.call_sysmode_change_mode(function, mode_name)
diff --git a/suave_managing/suave_random/test/test_copyright.py b/suave_managing/suave_random/test/test_copyright.py
new file mode 100644
index 0000000..97a3919
--- /dev/null
+++ b/suave_managing/suave_random/test/test_copyright.py
@@ -0,0 +1,25 @@
+# Copyright 2015 Open Source Robotics Foundation, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from ament_copyright.main import main
+import pytest
+
+
+# Remove the `skip` decorator once the source file(s) have a copyright header
+@pytest.mark.skip(reason='No copyright header has been placed in the generated source file.')
+@pytest.mark.copyright
+@pytest.mark.linter
+def test_copyright():
+ rc = main(argv=['.', 'test'])
+ assert rc == 0, 'Found errors'
diff --git a/suave_managing/suave_random/test/test_flake8.py b/suave_managing/suave_random/test/test_flake8.py
new file mode 100644
index 0000000..27ee107
--- /dev/null
+++ b/suave_managing/suave_random/test/test_flake8.py
@@ -0,0 +1,25 @@
+# Copyright 2017 Open Source Robotics Foundation, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from ament_flake8.main import main_with_errors
+import pytest
+
+
+@pytest.mark.flake8
+@pytest.mark.linter
+def test_flake8():
+ rc, errors = main_with_errors(argv=[])
+ assert rc == 0, \
+ 'Found %d code style errors / warnings:\n' % len(errors) + \
+ '\n'.join(errors)
diff --git a/suave_managing/suave_random/test/test_pep257.py b/suave_managing/suave_random/test/test_pep257.py
new file mode 100644
index 0000000..b234a38
--- /dev/null
+++ b/suave_managing/suave_random/test/test_pep257.py
@@ -0,0 +1,23 @@
+# Copyright 2015 Open Source Robotics Foundation, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from ament_pep257.main import main
+import pytest
+
+
+@pytest.mark.linter
+@pytest.mark.pep257
+def test_pep257():
+ rc = main(argv=['.', 'test'])
+ assert rc == 0, 'Found code style errors / warnings'
diff --git a/suave_metacontrol/suave_metacontrol/fake_managed_system.py b/suave_metacontrol/suave_metacontrol/fake_managed_system.py
deleted file mode 100755
index 5192354..0000000
--- a/suave_metacontrol/suave_metacontrol/fake_managed_system.py
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/usr/bin/env python
-import sys
-
-import rclpy
-from rclpy.node import Node
-from rclpy.action import ActionClient
-from mros2_msgs.action import ControlQos
-from diagnostic_msgs.msg import DiagnosticArray
-from diagnostic_msgs.msg import DiagnosticStatus
-from diagnostic_msgs.msg import KeyValue
-
-import threading
-
-
-class FakeManagedSystem(Node):
-
- def __init__(self):
- super().__init__('mock')
-
- self._action_client = ActionClient(self, ControlQos, '/mros/objective')
-
- self.diagnostics_publisher = self.create_publisher(
- DiagnosticArray, '/diagnostics', 10)
-
- timer_period = 4.0 # seconds
- self.timer = self.create_timer(timer_period, self.timer_callback)
-
- self.water_visibility = 3.5
- self.water_visibility_delta = -0.1
-
- def set_objectives(self):
- self.get_logger().info('Waiting for server')
- self._action_client.wait_for_server()
-
- mock_goal_msg = ControlQos.Goal()
-
- mock_goal_msg.qos_expected.objective_type = "f_generate_search_path"
- mock_goal_msg.qos_expected.objective_id = "obj_search_{:.0f}".format(
- self.get_clock().now().to_msg().sec / 10)
- mock_goal_msg.qos_expected.selected_mode = ""
- nfr = KeyValue()
- nfr.key = "water_visibility"
- nfr.value = str(0.35)
- mock_goal_msg.qos_expected.qos.append(nfr)
-
- self.get_logger().info(
- 'Sending goal {0}'.format(
- mock_goal_msg.qos_expected.objective_type))
- future = self._action_client.send_goal_async(
- mock_goal_msg, feedback_callback=self.feedback_callback)
- self.get_logger().info('Goal Sent!!!')
-
- timer = self.create_rate(0.1)
- timer.sleep()
-
- self.get_logger().info('%%%%CANCEL GOAL')
- handle = future.result()
- cancel_future = handle.cancel_goal_async()
- rclpy.spin_until_future_complete(self, cancel_future)
- fake_goal_msg = ControlQos.Goal()
- fake_goal_msg.qos_expected.objective_type = "f_fake"
- fake_goal_msg.qos_expected.objective_id = "obj_fake_{:.0f}".format(
- self.get_clock().now().to_msg().sec / 10)
- fake_goal_msg.qos_expected.selected_mode = ""
- nfr2 = KeyValue()
- nfr2.key = "mockiness"
- nfr2.value = str(0.8)
- fake_goal_msg.qos_expected.qos.append(nfr2)
-
- self.get_logger().info(
- 'Sending goal {0}'.format(
- fake_goal_msg.qos_expected.objective_type))
- self._action_client.send_goal_async(
- fake_goal_msg, feedback_callback=self.feedback_callback)
- self.get_logger().info('Goal Sent!!!')
-
- def feedback_callback(self, feedback_msg):
- feedback = feedback_msg.feedback
- self.get_logger().info(">> Feedback received:")
- self.get_logger().info(
- ' Solving: {0} of type {1}'.format(
- feedback.qos_status.objective_id,
- feedback.qos_status.objective_type))
- self.get_logger().info(
- ' Objective status: {0}'.format(
- feedback.qos_status.objective_status))
- self.get_logger().info(' QAs Status: ')
- for qos in feedback.qos_status.qos:
- self.get_logger().info(
- ' Key: {0} - Value {1}'.format(qos.key, qos.value))
- self.get_logger().info(
- ' Current Function Grounding: {0}'.format(
- feedback.qos_status.selected_mode))
-
- def timer_callback(self):
- if self.water_visibility <= 1.25 or self.water_visibility > 3.75:
- self.water_visibility_delta = -self.water_visibility_delta
-
- diag_msg = DiagnosticArray()
- diag_msg.header.stamp = self.get_clock().now().to_msg()
- status_msg = DiagnosticStatus()
- status_msg.level = DiagnosticStatus.OK
- status_msg.name = ""
- key_value = KeyValue()
- key_value.key = "water_visibility"
- key_value.value = str(self.water_visibility)
- status_msg.values.append(key_value)
- status_msg.message = "QA status"
- diag_msg.status.append(status_msg)
-
- self.diagnostics_publisher.publish(diag_msg)
-
- self.water_visibility += self.water_visibility_delta
-
-
-def main():
- print("Starting fake managed system node")
-
- rclpy.init(args=sys.argv)
-
- managed_system = FakeManagedSystem()
- thread = threading.Thread(
- target=rclpy.spin, args=(managed_system, ), daemon=True)
- thread.start()
- managed_system.set_objectives()
-
- thread.join()
- managed_system.destroy_node()
- rclpy.shutdown()
diff --git a/suave_metrics/LICENSE b/suave_metrics/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/suave_metrics/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/suave_metrics/package.xml b/suave_metrics/package.xml
new file mode 100644
index 0000000..2762065
--- /dev/null
+++ b/suave_metrics/package.xml
@@ -0,0 +1,24 @@
+
+
+
+ suave_metrics
+ 0.0.0
+ Package for collecting metrics of SUAVE
+ gus
+ Apache-2.0
+
+ ament_copyright
+ ament_flake8
+ ament_pep257
+ python3-pytest
+
+ mavros
+ mavros_msgs
+ rclpy
+ std_msgs
+ geometry_msgs
+
+
+ ament_python
+
+
diff --git a/suave_metrics/resource/suave_metrics b/suave_metrics/resource/suave_metrics
new file mode 100644
index 0000000..e69de29
diff --git a/suave_metrics/setup.cfg b/suave_metrics/setup.cfg
new file mode 100644
index 0000000..51375b2
--- /dev/null
+++ b/suave_metrics/setup.cfg
@@ -0,0 +1,4 @@
+[develop]
+script_dir=$base/lib/suave_metrics
+[install]
+install_scripts=$base/lib/suave_metrics
diff --git a/suave_metrics/setup.py b/suave_metrics/setup.py
new file mode 100644
index 0000000..fa6e76c
--- /dev/null
+++ b/suave_metrics/setup.py
@@ -0,0 +1,26 @@
+from setuptools import find_packages, setup
+
+package_name = 'suave_metrics'
+
+setup(
+ name=package_name,
+ version='0.0.0',
+ packages=find_packages(exclude=['test']),
+ data_files=[
+ ('share/ament_index/resource_index/packages',
+ ['resource/' + package_name]),
+ ('share/' + package_name, ['package.xml']),
+ ],
+ install_requires=['setuptools'],
+ zip_safe=True,
+ maintainer='gus',
+ maintainer_email='g.rezendesilva@tudelft.nl',
+ description='Package for collecting metrics of SUAVE',
+ license='Apache-2.0',
+ tests_require=['pytest'],
+ entry_points={
+ 'console_scripts': [
+ 'mission_metrics = suave_metrics.mission_metrics:main'
+ ],
+ },
+)
diff --git a/suave_metrics/suave_metrics/__init__.py b/suave_metrics/suave_metrics/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/suave_missions/suave_missions/mission_metrics.py b/suave_metrics/suave_metrics/mission_metrics.py
similarity index 100%
rename from suave_missions/suave_missions/mission_metrics.py
rename to suave_metrics/suave_metrics/mission_metrics.py
diff --git a/suave_metrics/test/test_copyright.py b/suave_metrics/test/test_copyright.py
new file mode 100644
index 0000000..97a3919
--- /dev/null
+++ b/suave_metrics/test/test_copyright.py
@@ -0,0 +1,25 @@
+# Copyright 2015 Open Source Robotics Foundation, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from ament_copyright.main import main
+import pytest
+
+
+# Remove the `skip` decorator once the source file(s) have a copyright header
+@pytest.mark.skip(reason='No copyright header has been placed in the generated source file.')
+@pytest.mark.copyright
+@pytest.mark.linter
+def test_copyright():
+ rc = main(argv=['.', 'test'])
+ assert rc == 0, 'Found errors'
diff --git a/suave_metrics/test/test_flake8.py b/suave_metrics/test/test_flake8.py
new file mode 100644
index 0000000..27ee107
--- /dev/null
+++ b/suave_metrics/test/test_flake8.py
@@ -0,0 +1,25 @@
+# Copyright 2017 Open Source Robotics Foundation, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from ament_flake8.main import main_with_errors
+import pytest
+
+
+@pytest.mark.flake8
+@pytest.mark.linter
+def test_flake8():
+ rc, errors = main_with_errors(argv=[])
+ assert rc == 0, \
+ 'Found %d code style errors / warnings:\n' % len(errors) + \
+ '\n'.join(errors)
diff --git a/suave_metrics/test/test_pep257.py b/suave_metrics/test/test_pep257.py
new file mode 100644
index 0000000..b234a38
--- /dev/null
+++ b/suave_metrics/test/test_pep257.py
@@ -0,0 +1,23 @@
+# Copyright 2015 Open Source Robotics Foundation, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from ament_pep257.main import main
+import pytest
+
+
+@pytest.mark.linter
+@pytest.mark.pep257
+def test_pep257():
+ rc = main(argv=['.', 'test'])
+ assert rc == 0, 'Found code style errors / warnings'
diff --git a/suave_missions/launch/mission.launch.py b/suave_missions/launch/mission.launch.py
index 146c192..d394673 100644
--- a/suave_missions/launch/mission.launch.py
+++ b/suave_missions/launch/mission.launch.py
@@ -61,7 +61,7 @@ def generate_launch_description():
)
mission_metrics_node = Node(
- package='suave_missions',
+ package='suave_metrics',
executable='mission_metrics',
name='mission_metrics',
parameters=[mission_config, {
@@ -72,7 +72,7 @@ def generate_launch_description():
)
mission_metrics_node_override = Node(
- package='suave_missions',
+ package='suave_metrics',
executable='mission_metrics',
name='mission_metrics',
parameters=[mission_config, {
@@ -110,8 +110,10 @@ def generate_launch_description():
'suave_metacontrol.launch.py'
)
+ pkg_suave_random_path = get_package_share_directory(
+ 'suave_random')
suave_random_launch_path = os.path.join(
- pkg_suave_metacontrol_path,
+ pkg_suave_random_path,
'launch',
'suave_random.launch.py'
)
diff --git a/suave_missions/setup.py b/suave_missions/setup.py
index 4bdb44d..a560dec 100644
--- a/suave_missions/setup.py
+++ b/suave_missions/setup.py
@@ -30,7 +30,6 @@
'suave_missions.const_dist_mission:main',
'time_constrained_mission = ' +
'suave_missions.time_constrained_mission:main',
- 'mission_metrics = suave_missions.mission_metrics:main',
],
},
)
diff --git a/suave_monitor/LICENSE b/suave_monitor/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/suave_monitor/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/suave_monitor/package.xml b/suave_monitor/package.xml
new file mode 100644
index 0000000..9f26a53
--- /dev/null
+++ b/suave_monitor/package.xml
@@ -0,0 +1,23 @@
+
+
+
+ suave_monitor
+ 0.0.0
+ Monitor nodes for SUAVE
+ gus
+ Apache-2.0
+
+ ament_copyright
+ ament_flake8
+ ament_pep257
+ python3-pytest
+
+ diagnostic_msgs
+ mavros_msgs
+ std_msgs
+ rcl_interfaces
+
+
+ ament_python
+
+
diff --git a/suave_monitor/resource/suave_monitor b/suave_monitor/resource/suave_monitor
new file mode 100644
index 0000000..e69de29
diff --git a/suave_monitor/setup.cfg b/suave_monitor/setup.cfg
new file mode 100644
index 0000000..1c89fe2
--- /dev/null
+++ b/suave_monitor/setup.cfg
@@ -0,0 +1,4 @@
+[develop]
+script_dir=$base/lib/suave_monitor
+[install]
+install_scripts=$base/lib/suave_monitor
diff --git a/suave_monitor/setup.py b/suave_monitor/setup.py
new file mode 100644
index 0000000..432c736
--- /dev/null
+++ b/suave_monitor/setup.py
@@ -0,0 +1,28 @@
+from setuptools import find_packages, setup
+
+package_name = 'suave_monitor'
+
+setup(
+ name=package_name,
+ version='0.0.0',
+ packages=find_packages(exclude=['test']),
+ data_files=[
+ ('share/ament_index/resource_index/packages',
+ ['resource/' + package_name]),
+ ('share/' + package_name, ['package.xml']),
+ ],
+ install_requires=['setuptools'],
+ zip_safe=True,
+ maintainer='gus',
+ maintainer_email='g.rezendesilva@tudelft.nl',
+ description='Monitor nodes for SUAVE',
+ license='Apache-2.0',
+ tests_require=['pytest'],
+ entry_points={
+ 'console_scripts': [
+ 'thruster_monitor = suave_monitor.thruster_monitor:main',
+ 'battery_monitor = suave_monitor.battery_monitor:main',
+ 'water_visibility_observer = suave_monitor.water_visibility_observer:main',
+ ],
+ },
+)
diff --git a/suave_monitor/suave_monitor/__init__.py b/suave_monitor/suave_monitor/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/suave/suave/battery_monitor.py b/suave_monitor/suave_monitor/battery_monitor.py
similarity index 100%
rename from suave/suave/battery_monitor.py
rename to suave_monitor/suave_monitor/battery_monitor.py
diff --git a/suave/suave/thruster_monitor.py b/suave_monitor/suave_monitor/thruster_monitor.py
similarity index 100%
rename from suave/suave/thruster_monitor.py
rename to suave_monitor/suave_monitor/thruster_monitor.py
diff --git a/suave/suave/water_visibility_observer.py b/suave_monitor/suave_monitor/water_visibility_observer.py
similarity index 97%
rename from suave/suave/water_visibility_observer.py
rename to suave_monitor/suave_monitor/water_visibility_observer.py
index 3d7b325..73681bb 100755
--- a/suave/suave/water_visibility_observer.py
+++ b/suave_monitor/suave_monitor/water_visibility_observer.py
@@ -16,7 +16,7 @@ class WaterVisibilityObserver(Node):
def __init__(self):
super().__init__('water_visibility')
- self.declare_parameter('qa_publishing_period', 1.0)
+ self.declare_parameter('qa_publishing_period', 0.2)
self.declare_parameter('water_visibility_period', 150)
self.declare_parameter('water_visibility_min', 1.25)
self.declare_parameter('water_visibility_max', 3.75)
diff --git a/suave_monitor/test/test_copyright.py b/suave_monitor/test/test_copyright.py
new file mode 100644
index 0000000..97a3919
--- /dev/null
+++ b/suave_monitor/test/test_copyright.py
@@ -0,0 +1,25 @@
+# Copyright 2015 Open Source Robotics Foundation, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from ament_copyright.main import main
+import pytest
+
+
+# Remove the `skip` decorator once the source file(s) have a copyright header
+@pytest.mark.skip(reason='No copyright header has been placed in the generated source file.')
+@pytest.mark.copyright
+@pytest.mark.linter
+def test_copyright():
+ rc = main(argv=['.', 'test'])
+ assert rc == 0, 'Found errors'
diff --git a/suave_monitor/test/test_flake8.py b/suave_monitor/test/test_flake8.py
new file mode 100644
index 0000000..27ee107
--- /dev/null
+++ b/suave_monitor/test/test_flake8.py
@@ -0,0 +1,25 @@
+# Copyright 2017 Open Source Robotics Foundation, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from ament_flake8.main import main_with_errors
+import pytest
+
+
+@pytest.mark.flake8
+@pytest.mark.linter
+def test_flake8():
+ rc, errors = main_with_errors(argv=[])
+ assert rc == 0, \
+ 'Found %d code style errors / warnings:\n' % len(errors) + \
+ '\n'.join(errors)
diff --git a/suave_monitor/test/test_pep257.py b/suave_monitor/test/test_pep257.py
new file mode 100644
index 0000000..b234a38
--- /dev/null
+++ b/suave_monitor/test/test_pep257.py
@@ -0,0 +1,23 @@
+# Copyright 2015 Open Source Robotics Foundation, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from ament_pep257.main import main
+import pytest
+
+
+@pytest.mark.linter
+@pytest.mark.pep257
+def test_pep257():
+ rc = main(argv=['.', 'test'])
+ assert rc == 0, 'Found code style errors / warnings'