isar 1.30.1__tar.gz → 1.30.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of isar might be problematic. Click here for more details.
- isar-1.30.3/.env.test +3 -0
- {isar-1.30.1 → isar-1.30.3}/.github/workflows/pythonpackage.yml +1 -0
- {isar-1.30.1 → isar-1.30.3}/PKG-INFO +18 -5
- {isar-1.30.1 → isar-1.30.3}/README.md +17 -3
- {isar-1.30.1 → isar-1.30.3}/pyproject.toml +0 -1
- {isar-1.30.1 → isar-1.30.3}/requirements.txt +21 -21
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/settings.py +7 -26
- {isar-1.30.1 → isar-1.30.3}/src/isar/modules.py +0 -7
- {isar-1.30.1 → isar-1.30.3}/src/isar/robot/robot_start_mission.py +14 -2
- {isar-1.30.1 → isar-1.30.3}/src/isar/robot/robot_status.py +5 -3
- {isar-1.30.1 → isar-1.30.3}/src/isar/script.py +0 -1
- isar-1.30.1/src/isar/state_machine/states/robot_standing_still.py → isar-1.30.3/src/isar/state_machine/generic_states/idle.py +51 -18
- isar-1.30.1/src/isar/state_machine/states/monitor.py → isar-1.30.3/src/isar/state_machine/generic_states/ongoing_mission.py +64 -26
- isar-1.30.1/src/isar/state_machine/states/offline.py → isar-1.30.3/src/isar/state_machine/generic_states/robot_unavailable.py +21 -7
- {isar-1.30.1 → isar-1.30.3}/src/isar/state_machine/state_machine.py +9 -0
- isar-1.30.3/src/isar/state_machine/states/await_next_mission.py +20 -0
- isar-1.30.3/src/isar/state_machine/states/blocked_protective_stop.py +24 -0
- isar-1.30.3/src/isar/state_machine/states/home.py +19 -0
- isar-1.30.3/src/isar/state_machine/states/monitor.py +24 -0
- isar-1.30.3/src/isar/state_machine/states/offline.py +22 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/state_machine/states/paused.py +1 -1
- isar-1.30.3/src/isar/state_machine/states/returning_home.py +24 -0
- isar-1.30.3/src/isar/state_machine/states/robot_standing_still.py +20 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/state_machine/transitions/mission.py +1 -1
- {isar-1.30.1 → isar-1.30.3}/src/isar.egg-info/PKG-INFO +18 -5
- {isar-1.30.1 → isar-1.30.3}/src/isar.egg-info/SOURCES.txt +15 -13
- {isar-1.30.1 → isar-1.30.3}/src/isar.egg-info/requires.txt +0 -1
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/robot_interface.py +15 -7
- {isar-1.30.1 → isar-1.30.3}/tests/conftest.py +7 -13
- {isar-1.30.1 → isar-1.30.3}/tests/isar/apis/scheduler/test_scheduler_router.py +25 -23
- {isar-1.30.1 → isar-1.30.3}/tests/isar/apis/security/test_authentication.py +2 -2
- {isar-1.30.1 → isar-1.30.3}/tests/isar/services/utilities/test_scheduling_utilities.py +3 -3
- {isar-1.30.1 → isar-1.30.3}/tests/isar/state_machine/states/test_monitor.py +3 -3
- {isar-1.30.1 → isar-1.30.3}/tests/isar/state_machine/test_state_machine.py +36 -30
- {isar-1.30.1 → isar-1.30.3}/tests/isar/storage/test_uploader.py +3 -3
- {isar-1.30.1/tests/mocks → isar-1.30.3/tests/test_double}/blob_storage.py +2 -2
- isar-1.30.3/tests/test_double/mission_definition.py +77 -0
- {isar-1.30.1/tests/mocks → isar-1.30.3/tests/test_double}/mqtt_client.py +1 -1
- {isar-1.30.1/tests/mocks → isar-1.30.3/tests/test_double}/pose.py +1 -1
- {isar-1.30.1/tests/mocks → isar-1.30.3/tests/test_double}/request.py +1 -1
- {isar-1.30.1/tests/mocks → isar-1.30.3/tests/test_double}/robot_interface.py +9 -9
- {isar-1.30.1/tests/mocks → isar-1.30.3/tests/test_double}/status.py +1 -1
- {isar-1.30.1/tests/mocks → isar-1.30.3/tests/test_double}/task.py +1 -1
- {isar-1.30.1/tests/mocks → isar-1.30.3/tests/test_double}/token.py +1 -1
- isar-1.30.1/src/isar/config/settings.env +0 -23
- isar-1.30.1/src/isar/state_machine/states/await_next_mission.py +0 -92
- isar-1.30.1/src/isar/state_machine/states/blocked_protective_stop.py +0 -50
- isar-1.30.1/src/isar/state_machine/states/home.py +0 -87
- isar-1.30.1/src/isar/state_machine/states/returning_home.py +0 -187
- isar-1.30.1/src/isar/storage/slimm_storage.py +0 -190
- isar-1.30.1/tests/mocks/mission_definition.py +0 -77
- {isar-1.30.1 → isar-1.30.3}/.dockerignore +0 -0
- {isar-1.30.1 → isar-1.30.3}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {isar-1.30.1 → isar-1.30.3}/.github/ISSUE_TEMPLATE/feature.md +0 -0
- {isar-1.30.1 → isar-1.30.3}/.github/ISSUE_TEMPLATE/improvement.md +0 -0
- {isar-1.30.1 → isar-1.30.3}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {isar-1.30.1 → isar-1.30.3}/.github/release.yml +0 -0
- {isar-1.30.1 → isar-1.30.3}/.github/workflows/compile_requirements.yml +0 -0
- {isar-1.30.1 → isar-1.30.3}/.github/workflows/project_automations.yml +0 -0
- {isar-1.30.1 → isar-1.30.3}/.github/workflows/pythonpublish.yml +0 -0
- {isar-1.30.1 → isar-1.30.3}/.github/workflows/stale.yml +0 -0
- {isar-1.30.1 → isar-1.30.3}/.gitignore +0 -0
- {isar-1.30.1 → isar-1.30.3}/.pre-commit-config.yaml +0 -0
- {isar-1.30.1 → isar-1.30.3}/LICENSE +0 -0
- {isar-1.30.1 → isar-1.30.3}/SECURITY.md +0 -0
- {isar-1.30.1 → isar-1.30.3}/docs/Makefile +0 -0
- {isar-1.30.1 → isar-1.30.3}/docs/full_state_machine_diagram.png +0 -0
- {isar-1.30.1 → isar-1.30.3}/docs/make.bat +0 -0
- {isar-1.30.1 → isar-1.30.3}/docs/mission_state_machine_diagram.png +0 -0
- {isar-1.30.1 → isar-1.30.3}/docs/robot_status_state_machine_diagram.png +0 -0
- {isar-1.30.1 → isar-1.30.3}/docs/rst_processing.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/docs/source/conf.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/docs/source/index.rst +0 -0
- {isar-1.30.1 → isar-1.30.3}/docs/source/readme_link.md +0 -0
- {isar-1.30.1 → isar-1.30.3}/docs/update_state_diagram.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/main.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/radixconfig.yml +0 -0
- {isar-1.30.1 → isar-1.30.3}/setup.cfg +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/apis/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/apis/api.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/apis/models/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/apis/models/models.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/apis/models/start_mission_definition.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/apis/robot_control/robot_controller.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/apis/schedule/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/apis/schedule/scheduling_controller.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/apis/security/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/apis/security/authentication.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/certs/ca-cert.pem +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/configuration_error.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/keyvault/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/keyvault/keyvault_error.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/keyvault/keyvault_service.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/log.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/logging.conf +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/maps/JSP1_intermediate_deck.json +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/maps/JSP1_weather_deck.json +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/maps/default_map.json +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/maps/klab_b.json +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/maps/klab_compressor.json +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/maps/klab_turtlebot.json +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/maps/turtleworld.json +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/predefined_mission_definition/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/predefined_mission_definition/default_exr.json +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/predefined_mission_definition/default_mission.json +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/predefined_mission_definition/default_turtlebot.json +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/predefined_missions/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/predefined_missions/default.json +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/config/predefined_missions/default_turtlebot.json +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/mission_planner/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/mission_planner/local_planner.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/mission_planner/mission_planner_interface.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/mission_planner/sequential_task_selector.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/mission_planner/task_selector_interface.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/models/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/models/communication/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/models/communication/message.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/models/communication/queues/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/models/communication/queues/events.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/models/communication/queues/queue_io.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/models/communication/queues/queue_timeout_error.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/models/communication/queues/queue_utils.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/models/communication/queues/status_queue.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/models/mission_metadata/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/robot/robot.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/robot/robot_stop_mission.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/robot/robot_task_status.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/services/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/services/auth/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/services/auth/azure_credentials.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/services/service_connections/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/services/service_connections/mqtt/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/services/service_connections/mqtt/mqtt_client.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/services/service_connections/mqtt/robot_heartbeat_publisher.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/services/service_connections/mqtt/robot_info_publisher.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/services/service_connections/request_handler.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/services/service_connections/stid/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/services/utilities/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/services/utilities/queue_utilities.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/services/utilities/robot_utilities.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/services/utilities/scheduling_utilities.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/services/utilities/threaded_request.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/state_machine/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/state_machine/states/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/state_machine/states/stopping.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/state_machine/states/unknown_status.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/state_machine/states_enum.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/state_machine/transitions/functions/fail_mission.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/state_machine/transitions/functions/finish_mission.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/state_machine/transitions/functions/pause.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/state_machine/transitions/functions/resume.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/state_machine/transitions/functions/return_home.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/state_machine/transitions/functions/robot_status.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/state_machine/transitions/functions/start_mission.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/state_machine/transitions/functions/stop.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/state_machine/transitions/functions/utils.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/state_machine/transitions/return_home.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/state_machine/transitions/robot_status.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/storage/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/storage/blob_storage.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/storage/local_storage.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/storage/storage_interface.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/storage/uploader.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar/storage/utilities.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar.egg-info/dependency_links.txt +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar.egg-info/entry_points.txt +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/isar.egg-info/top_level.txt +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/models/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/models/exceptions/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/models/exceptions/robot_exceptions.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/models/initialize/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/models/inspection/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/models/inspection/inspection.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/models/mission/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/models/mission/mission.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/models/mission/status.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/models/mission/task.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/models/robots/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/models/robots/battery_state.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/models/robots/media.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/models/robots/robot_model.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/telemetry/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/telemetry/mqtt_client.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/telemetry/payloads.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/test_robot_interface.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/utilities/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/utilities/json_service.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/src/robot_interface/utilities/uuid_string_factory.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/integration/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/integration/turtlebot/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/integration/turtlebot/config/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/integration/turtlebot/config/maps/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/integration/turtlebot/config/maps/turtleworld.json +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/integration/turtlebot/config/missions/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/integration/turtlebot/config/missions/default.json +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/integration/turtlebot/test_successful_mission.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/apis/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/apis/models/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/apis/models/example_mission_definition.json +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/apis/models/test_start_mission_definition.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/apis/scheduler/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/apis/security/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/mission/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/mission/test_mission.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/models/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/models/communication/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/models/communication/test_queues.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/services/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/services/readers/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/services/readers/test_mission_reader.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/services/service_connections/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/services/service_connections/echo/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/services/service_connections/test_base_request_handler.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/services/utilities/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/services/utilities/test_queue_utilities.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/state_machine/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/state_machine/states/__init__.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/isar/storage/test_blob_storage.py +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/test_data/test_map_config/test_map_config.json +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/test_data/test_mission_not_working.json +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/test_data/test_mission_working.json +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/test_data/test_mission_working_no_tasks.json +0 -0
- {isar-1.30.1 → isar-1.30.3}/tests/test_data/test_thermal_image_mission.json +0 -0
- {isar-1.30.1/tests/mocks → isar-1.30.3/tests/test_double}/__init__.py +0 -0
isar-1.30.3/.env.test
ADDED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: isar
|
|
3
|
-
Version: 1.30.
|
|
3
|
+
Version: 1.30.3
|
|
4
4
|
Summary: Integration and Supervisory control of Autonomous Robots
|
|
5
5
|
Author-email: Equinor ASA <fg_robots_dev@equinor.com>
|
|
6
6
|
License: Eclipse Public License version 2.0
|
|
@@ -132,7 +132,6 @@ Requires-Dist: isort; extra == "dev"
|
|
|
132
132
|
Requires-Dist: mypy; extra == "dev"
|
|
133
133
|
Requires-Dist: pip-tools; extra == "dev"
|
|
134
134
|
Requires-Dist: pre-commit; extra == "dev"
|
|
135
|
-
Requires-Dist: pytest-dotenv; extra == "dev"
|
|
136
135
|
Requires-Dist: pytest-mock; extra == "dev"
|
|
137
136
|
Requires-Dist: pytest-xdist; extra == "dev"
|
|
138
137
|
Requires-Dist: pytest; extra == "dev"
|
|
@@ -236,7 +235,7 @@ ISAR_DEFAULT_MAP = turtleworld
|
|
|
236
235
|
To run ISAR:
|
|
237
236
|
|
|
238
237
|
```bash
|
|
239
|
-
|
|
238
|
+
isar-start
|
|
240
239
|
```
|
|
241
240
|
|
|
242
241
|
Note, running the full system requires that an implementation of a robot has been installed. See
|
|
@@ -281,6 +280,20 @@ There are two methods of specifying configuration.
|
|
|
281
280
|
By adding environment variables with the prefix `ISAR_` to the [settings.env](./src/isar/config/settings.env) file
|
|
282
281
|
the configuration variables will be overwritten by the values in this file.
|
|
283
282
|
|
|
283
|
+
### Setup for testing
|
|
284
|
+
To be able to execute the tests you need to set the `ISAR_ENV` environment variable beforehand. Depending on your operating system and the command line you are using you can use one of the following commands:
|
|
285
|
+
|
|
286
|
+
**Bash/Zsh**
|
|
287
|
+
```bash
|
|
288
|
+
export ISAR_ENV=test
|
|
289
|
+
```
|
|
290
|
+
**Windows Command prompt**
|
|
291
|
+
```cmd
|
|
292
|
+
set ISAR_ENV=test
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
Remember to set `ISAR_ENV` back to `None` when you want to run `isar-start` afterwards.
|
|
296
|
+
|
|
284
297
|
### Running tests
|
|
285
298
|
|
|
286
299
|
After following the steps in [Development](#install), you can run the tests:
|
|
@@ -375,10 +388,10 @@ overriding the configuration through an environment variable. It accepts a json
|
|
|
375
388
|
in the list to retrieve the corresponding handler. The current options are
|
|
376
389
|
|
|
377
390
|
```
|
|
378
|
-
ISAR_STORAGE = '["local", "blob"
|
|
391
|
+
ISAR_STORAGE = '["local", "blob"]'
|
|
379
392
|
```
|
|
380
393
|
|
|
381
|
-
Note that the `blob`
|
|
394
|
+
Note that the `blob` option requires special configuration to authenticate to these endpoints.
|
|
382
395
|
|
|
383
396
|
### Implement your own storage module
|
|
384
397
|
|
|
@@ -94,7 +94,7 @@ ISAR_DEFAULT_MAP = turtleworld
|
|
|
94
94
|
To run ISAR:
|
|
95
95
|
|
|
96
96
|
```bash
|
|
97
|
-
|
|
97
|
+
isar-start
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
Note, running the full system requires that an implementation of a robot has been installed. See
|
|
@@ -139,6 +139,20 @@ There are two methods of specifying configuration.
|
|
|
139
139
|
By adding environment variables with the prefix `ISAR_` to the [settings.env](./src/isar/config/settings.env) file
|
|
140
140
|
the configuration variables will be overwritten by the values in this file.
|
|
141
141
|
|
|
142
|
+
### Setup for testing
|
|
143
|
+
To be able to execute the tests you need to set the `ISAR_ENV` environment variable beforehand. Depending on your operating system and the command line you are using you can use one of the following commands:
|
|
144
|
+
|
|
145
|
+
**Bash/Zsh**
|
|
146
|
+
```bash
|
|
147
|
+
export ISAR_ENV=test
|
|
148
|
+
```
|
|
149
|
+
**Windows Command prompt**
|
|
150
|
+
```cmd
|
|
151
|
+
set ISAR_ENV=test
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Remember to set `ISAR_ENV` back to `None` when you want to run `isar-start` afterwards.
|
|
155
|
+
|
|
142
156
|
### Running tests
|
|
143
157
|
|
|
144
158
|
After following the steps in [Development](#install), you can run the tests:
|
|
@@ -233,10 +247,10 @@ overriding the configuration through an environment variable. It accepts a json
|
|
|
233
247
|
in the list to retrieve the corresponding handler. The current options are
|
|
234
248
|
|
|
235
249
|
```
|
|
236
|
-
ISAR_STORAGE = '["local", "blob"
|
|
250
|
+
ISAR_STORAGE = '["local", "blob"]'
|
|
237
251
|
```
|
|
238
252
|
|
|
239
|
-
Note that the `blob`
|
|
253
|
+
Note that the `blob` option requires special configuration to authenticate to these endpoints.
|
|
240
254
|
|
|
241
255
|
### Implement your own storage module
|
|
242
256
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
#
|
|
5
5
|
# pip-compile --output-file=requirements.txt pyproject.toml
|
|
6
6
|
#
|
|
7
|
-
alitra==1.1.
|
|
7
|
+
alitra==1.1.5
|
|
8
8
|
# via isar (pyproject.toml)
|
|
9
9
|
annotated-types==0.7.0
|
|
10
10
|
# via pydantic
|
|
@@ -12,7 +12,7 @@ anyio==4.9.0
|
|
|
12
12
|
# via
|
|
13
13
|
# httpx
|
|
14
14
|
# starlette
|
|
15
|
-
azure-core==1.
|
|
15
|
+
azure-core==1.35.0
|
|
16
16
|
# via
|
|
17
17
|
# azure-identity
|
|
18
18
|
# azure-keyvault-secrets
|
|
@@ -22,7 +22,7 @@ azure-identity==1.23.0
|
|
|
22
22
|
# via
|
|
23
23
|
# isar (pyproject.toml)
|
|
24
24
|
# opencensus-ext-azure
|
|
25
|
-
azure-keyvault-secrets==4.
|
|
25
|
+
azure-keyvault-secrets==4.10.0
|
|
26
26
|
# via isar (pyproject.toml)
|
|
27
27
|
azure-storage-blob==12.25.1
|
|
28
28
|
# via isar (pyproject.toml)
|
|
@@ -30,7 +30,7 @@ backoff==2.2.1
|
|
|
30
30
|
# via isar (pyproject.toml)
|
|
31
31
|
cachetools==5.5.2
|
|
32
32
|
# via google-auth
|
|
33
|
-
certifi==2025.
|
|
33
|
+
certifi==2025.6.15
|
|
34
34
|
# via
|
|
35
35
|
# httpcore
|
|
36
36
|
# httpx
|
|
@@ -43,7 +43,7 @@ click==8.2.1
|
|
|
43
43
|
# via
|
|
44
44
|
# isar (pyproject.toml)
|
|
45
45
|
# uvicorn
|
|
46
|
-
cryptography==45.0.
|
|
46
|
+
cryptography==45.0.5
|
|
47
47
|
# via
|
|
48
48
|
# azure-identity
|
|
49
49
|
# azure-storage-blob
|
|
@@ -54,17 +54,17 @@ dacite==1.9.2
|
|
|
54
54
|
# via
|
|
55
55
|
# alitra
|
|
56
56
|
# isar (pyproject.toml)
|
|
57
|
-
dependency-injector==4.
|
|
57
|
+
dependency-injector==4.48.1
|
|
58
58
|
# via isar (pyproject.toml)
|
|
59
|
-
fastapi==0.115.
|
|
59
|
+
fastapi==0.115.14
|
|
60
60
|
# via
|
|
61
61
|
# fastapi-azure-auth
|
|
62
62
|
# isar (pyproject.toml)
|
|
63
63
|
fastapi-azure-auth==5.1.1
|
|
64
64
|
# via isar (pyproject.toml)
|
|
65
|
-
google-api-core==2.
|
|
65
|
+
google-api-core==2.25.1
|
|
66
66
|
# via opencensus
|
|
67
|
-
google-auth==2.40.
|
|
67
|
+
google-auth==2.40.3
|
|
68
68
|
# via google-api-core
|
|
69
69
|
googleapis-common-protos==1.70.0
|
|
70
70
|
# via google-api-core
|
|
@@ -91,7 +91,7 @@ msal==1.32.3
|
|
|
91
91
|
# msal-extensions
|
|
92
92
|
msal-extensions==1.3.1
|
|
93
93
|
# via azure-identity
|
|
94
|
-
numpy==2.
|
|
94
|
+
numpy==2.3.1
|
|
95
95
|
# via
|
|
96
96
|
# alitra
|
|
97
97
|
# isar (pyproject.toml)
|
|
@@ -103,7 +103,7 @@ opencensus==0.11.4
|
|
|
103
103
|
# opencensus-ext-requests
|
|
104
104
|
opencensus-context==0.1.3
|
|
105
105
|
# via opencensus
|
|
106
|
-
opencensus-ext-azure==1.1.
|
|
106
|
+
opencensus-ext-azure==1.1.15
|
|
107
107
|
# via isar (pyproject.toml)
|
|
108
108
|
opencensus-ext-logging==0.1.1
|
|
109
109
|
# via isar (pyproject.toml)
|
|
@@ -113,7 +113,7 @@ paho-mqtt==2.1.0
|
|
|
113
113
|
# via isar (pyproject.toml)
|
|
114
114
|
proto-plus==1.26.1
|
|
115
115
|
# via google-api-core
|
|
116
|
-
protobuf==6.31.
|
|
116
|
+
protobuf==6.31.1
|
|
117
117
|
# via
|
|
118
118
|
# google-api-core
|
|
119
119
|
# googleapis-common-protos
|
|
@@ -128,27 +128,27 @@ pyasn1-modules==0.4.2
|
|
|
128
128
|
# via google-auth
|
|
129
129
|
pycparser==2.22
|
|
130
130
|
# via cffi
|
|
131
|
-
pydantic==2.11.
|
|
131
|
+
pydantic==2.11.7
|
|
132
132
|
# via
|
|
133
133
|
# fastapi
|
|
134
134
|
# isar (pyproject.toml)
|
|
135
135
|
# pydantic-settings
|
|
136
136
|
pydantic-core==2.33.2
|
|
137
137
|
# via pydantic
|
|
138
|
-
pydantic-settings==2.
|
|
138
|
+
pydantic-settings==2.10.1
|
|
139
139
|
# via isar (pyproject.toml)
|
|
140
140
|
pyjwt[crypto]==2.10.1
|
|
141
141
|
# via
|
|
142
142
|
# fastapi-azure-auth
|
|
143
143
|
# isar (pyproject.toml)
|
|
144
144
|
# msal
|
|
145
|
-
python-dotenv==1.1.
|
|
145
|
+
python-dotenv==1.1.1
|
|
146
146
|
# via
|
|
147
147
|
# isar (pyproject.toml)
|
|
148
148
|
# pydantic-settings
|
|
149
149
|
pyyaml==6.0.2
|
|
150
150
|
# via isar (pyproject.toml)
|
|
151
|
-
requests==2.32.
|
|
151
|
+
requests==2.32.4
|
|
152
152
|
# via
|
|
153
153
|
# azure-core
|
|
154
154
|
# google-api-core
|
|
@@ -161,7 +161,7 @@ requests-toolbelt==1.0.0
|
|
|
161
161
|
# via isar (pyproject.toml)
|
|
162
162
|
rsa==4.9.1
|
|
163
163
|
# via google-auth
|
|
164
|
-
scipy==1.
|
|
164
|
+
scipy==1.16.0
|
|
165
165
|
# via alitra
|
|
166
166
|
six==1.17.0
|
|
167
167
|
# via
|
|
@@ -172,9 +172,9 @@ sniffio==1.3.1
|
|
|
172
172
|
# via anyio
|
|
173
173
|
starlette==0.46.2
|
|
174
174
|
# via fastapi
|
|
175
|
-
transitions==0.9.
|
|
175
|
+
transitions==0.9.3
|
|
176
176
|
# via isar (pyproject.toml)
|
|
177
|
-
typing-extensions==4.
|
|
177
|
+
typing-extensions==4.14.0
|
|
178
178
|
# via
|
|
179
179
|
# azure-core
|
|
180
180
|
# azure-identity
|
|
@@ -188,9 +188,9 @@ typing-inspection==0.4.1
|
|
|
188
188
|
# via
|
|
189
189
|
# pydantic
|
|
190
190
|
# pydantic-settings
|
|
191
|
-
urllib3==2.
|
|
191
|
+
urllib3==2.5.0
|
|
192
192
|
# via requests
|
|
193
|
-
uvicorn==0.
|
|
193
|
+
uvicorn==0.35.0
|
|
194
194
|
# via isar (pyproject.toml)
|
|
195
195
|
wrapt==1.17.2
|
|
196
196
|
# via opencensus-ext-requests
|
|
@@ -12,15 +12,6 @@ from robot_interface.telemetry.payloads import DocumentInfo
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class Settings(BaseSettings):
|
|
15
|
-
def __init__(self) -> None:
|
|
16
|
-
try:
|
|
17
|
-
source = files("isar").joinpath("config").joinpath("settings.env")
|
|
18
|
-
with as_file(source) as eml:
|
|
19
|
-
env_file = eml
|
|
20
|
-
except ModuleNotFoundError:
|
|
21
|
-
env_file = None
|
|
22
|
-
super().__init__(_env_file=env_file)
|
|
23
|
-
|
|
24
15
|
# Determines which robot package ISAR will attempt to import
|
|
25
16
|
# Name must match with an installed python package in the local environment
|
|
26
17
|
ROBOT_PACKAGE: str = Field(default="isar_robot")
|
|
@@ -75,6 +66,7 @@ class Settings(BaseSettings):
|
|
|
75
66
|
ROBOT_HEARTBEAT_PUBLISH_INTERVAL: float = Field(default=1)
|
|
76
67
|
ROBOT_INFO_PUBLISH_INTERVAL: float = Field(default=5)
|
|
77
68
|
ROBOT_API_STATUS_POLL_INTERVAL: float = Field(default=5)
|
|
69
|
+
THREAD_CHECK_INTERVAL: float = Field(default=0.01)
|
|
78
70
|
|
|
79
71
|
# FastAPI host
|
|
80
72
|
API_HOST_VIEWED_EXTERNALLY: str = Field(default="0.0.0.0")
|
|
@@ -98,7 +90,6 @@ class Settings(BaseSettings):
|
|
|
98
90
|
# Selecting a different storage module than local may require certain access rights
|
|
99
91
|
STORAGE_LOCAL_ENABLED: bool = Field(default=True)
|
|
100
92
|
STORAGE_BLOB_ENABLED: bool = Field(default=False)
|
|
101
|
-
STORAGE_SLIMM_ENABLED: bool = Field(default=False)
|
|
102
93
|
|
|
103
94
|
# Determines whether the MQTT publishing module should be enabled or not
|
|
104
95
|
# The publishing module will attempt to connect to the MQTT broker configured in
|
|
@@ -153,21 +144,6 @@ class Settings(BaseSettings):
|
|
|
153
144
|
# Name of blob container in Azure Blob Storage [slimm test]
|
|
154
145
|
BLOB_CONTAINER: str = Field(default="test")
|
|
155
146
|
|
|
156
|
-
# Client ID for SLIMM App Registration
|
|
157
|
-
SLIMM_CLIENT_ID: str = Field(default="c630ca4d-d8d6-45ab-8cc6-68a363d0de9e")
|
|
158
|
-
|
|
159
|
-
# Scope for access to SLIMM Ingestion API
|
|
160
|
-
SLIMM_APP_SCOPE: str = Field(default=".default")
|
|
161
|
-
|
|
162
|
-
# URL for SLIMM endpoint
|
|
163
|
-
SLIMM_API_URL: str = Field(
|
|
164
|
-
default="https://scinspectioningestapitest.azurewebsites.net/Ingest"
|
|
165
|
-
)
|
|
166
|
-
|
|
167
|
-
# Whether the results should be copied directly into the SLIMM datalake or only the
|
|
168
|
-
# metadata
|
|
169
|
-
COPY_FILES_TO_SLIMM_DATALAKE: bool = Field(default=False)
|
|
170
|
-
|
|
171
147
|
# The configuration of this section is tightly coupled with the metadata that is
|
|
172
148
|
# submitted with the results once they have been uploaded.
|
|
173
149
|
|
|
@@ -298,7 +274,12 @@ class Settings(BaseSettings):
|
|
|
298
274
|
)
|
|
299
275
|
|
|
300
276
|
|
|
301
|
-
|
|
277
|
+
env = os.environ.get("ISAR_ENV")
|
|
278
|
+
|
|
279
|
+
if env == "test":
|
|
280
|
+
load_dotenv(".env.test", override=True)
|
|
281
|
+
else:
|
|
282
|
+
load_dotenv()
|
|
302
283
|
settings = Settings()
|
|
303
284
|
|
|
304
285
|
|
|
@@ -14,13 +14,11 @@ from isar.mission_planner.sequential_task_selector import SequentialTaskSelector
|
|
|
14
14
|
from isar.mission_planner.task_selector_interface import TaskSelectorInterface
|
|
15
15
|
from isar.models.communication.queues.events import Events, SharedState
|
|
16
16
|
from isar.robot.robot import Robot
|
|
17
|
-
from isar.services.service_connections.request_handler import RequestHandler
|
|
18
17
|
from isar.services.utilities.robot_utilities import RobotUtilities
|
|
19
18
|
from isar.services.utilities.scheduling_utilities import SchedulingUtilities
|
|
20
19
|
from isar.state_machine.state_machine import StateMachine
|
|
21
20
|
from isar.storage.blob_storage import BlobStorage
|
|
22
21
|
from isar.storage.local_storage import LocalStorage
|
|
23
|
-
from isar.storage.slimm_storage import SlimmStorage
|
|
24
22
|
from isar.storage.uploader import Uploader
|
|
25
23
|
from robot_interface.telemetry.mqtt_client import MqttPublisher
|
|
26
24
|
|
|
@@ -77,11 +75,6 @@ class ApplicationContainer(containers.DeclarativeContainer):
|
|
|
77
75
|
if settings.STORAGE_BLOB_ENABLED:
|
|
78
76
|
blob_storage = providers.Singleton(BlobStorage, keyvault=keyvault)
|
|
79
77
|
storage_handlers_temp.append(blob_storage)
|
|
80
|
-
if settings.STORAGE_SLIMM_ENABLED:
|
|
81
|
-
slimm_storage = providers.Singleton(
|
|
82
|
-
SlimmStorage, request_handler=providers.Singleton(RequestHandler)
|
|
83
|
-
)
|
|
84
|
-
storage_handlers_temp.append(slimm_storage)
|
|
85
78
|
storage_handlers = providers.List(*storage_handlers_temp)
|
|
86
79
|
|
|
87
80
|
# Mqtt client
|
|
@@ -40,6 +40,18 @@ class RobotStartMissionThread(Thread):
|
|
|
40
40
|
return
|
|
41
41
|
try:
|
|
42
42
|
self.robot.initiate_mission(self.mission)
|
|
43
|
+
except RobotInfeasibleMissionException as e:
|
|
44
|
+
self.logger.error(
|
|
45
|
+
f"Mission is infeasible and cannot be scheduled because: {e.error_description}"
|
|
46
|
+
)
|
|
47
|
+
trigger_event(
|
|
48
|
+
self.robot_service_events.mission_failed,
|
|
49
|
+
ErrorMessage(
|
|
50
|
+
error_reason=e.error_reason,
|
|
51
|
+
error_description=e.error_description,
|
|
52
|
+
),
|
|
53
|
+
)
|
|
54
|
+
break
|
|
43
55
|
except RobotException as e:
|
|
44
56
|
retries += 1
|
|
45
57
|
self.logger.warning(
|
|
@@ -48,7 +60,7 @@ class RobotStartMissionThread(Thread):
|
|
|
48
60
|
)
|
|
49
61
|
|
|
50
62
|
if retries >= settings.INITIATE_FAILURE_COUNTER_LIMIT:
|
|
51
|
-
|
|
63
|
+
self.logger.error(
|
|
52
64
|
f"Mission will be cancelled after failing to initiate "
|
|
53
65
|
f"{settings.INITIATE_FAILURE_COUNTER_LIMIT} times because: "
|
|
54
66
|
f"{e.error_description}"
|
|
@@ -58,7 +70,7 @@ class RobotStartMissionThread(Thread):
|
|
|
58
70
|
self.robot_service_events.mission_failed,
|
|
59
71
|
ErrorMessage(
|
|
60
72
|
error_reason=e.error_reason,
|
|
61
|
-
error_description=error_description,
|
|
73
|
+
error_description=e.error_description,
|
|
62
74
|
),
|
|
63
75
|
)
|
|
64
76
|
break
|
|
@@ -40,14 +40,16 @@ class RobotStatusThread(Thread):
|
|
|
40
40
|
if self.signal_thread_quitting.is_set():
|
|
41
41
|
return
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
thread_check_interval = settings.THREAD_CHECK_INTERVAL
|
|
44
|
+
|
|
45
|
+
while not self.signal_thread_quitting.wait(thread_check_interval):
|
|
44
46
|
if not self._is_ready_to_poll_for_status():
|
|
45
47
|
continue
|
|
46
48
|
try:
|
|
47
|
-
|
|
49
|
+
self.last_robot_status_poll_time = time.time()
|
|
48
50
|
|
|
51
|
+
robot_status = self.robot.robot_status()
|
|
49
52
|
update_shared_state(self.shared_state.robot_status, robot_status)
|
|
50
|
-
self.last_robot_status_poll_time = time.time()
|
|
51
53
|
except RobotException as e:
|
|
52
54
|
self.logger.error(f"Failed to retrieve robot status: {e}")
|
|
53
55
|
continue
|
|
@@ -68,7 +68,6 @@ def print_startup_info():
|
|
|
68
68
|
print_setting("Mission planner", settings.MISSION_PLANNER)
|
|
69
69
|
print_setting("Using local storage", settings.STORAGE_LOCAL_ENABLED)
|
|
70
70
|
print_setting("Using blob storage", settings.STORAGE_BLOB_ENABLED)
|
|
71
|
-
print_setting("Using SLIMM storage", settings.STORAGE_SLIMM_ENABLED)
|
|
72
71
|
print_setting("Using async inspection uploading", settings.UPLOAD_INSPECTIONS_ASYNC)
|
|
73
72
|
print_setting("Plant code", settings.PLANT_CODE)
|
|
74
73
|
print_setting("Plant name", settings.PLANT_NAME)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
import time
|
|
3
|
+
from enum import Enum
|
|
3
4
|
from queue import Queue
|
|
4
5
|
from typing import TYPE_CHECKING, Optional
|
|
5
6
|
|
|
6
|
-
from
|
|
7
|
-
|
|
7
|
+
from isar.config.settings import settings
|
|
8
8
|
from isar.models.communication.message import StartMissionMessage
|
|
9
9
|
from isar.models.communication.queues.queue_io import QueueIO
|
|
10
10
|
from isar.models.communication.queues.queue_utils import (
|
|
@@ -18,30 +18,41 @@ if TYPE_CHECKING:
|
|
|
18
18
|
from isar.state_machine.state_machine import StateMachine
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
class
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
class IdleStates(str, Enum):
|
|
22
|
+
AwaitNextMission = "awaitNextMission"
|
|
23
|
+
Home = "home"
|
|
24
|
+
RobotStandingStill = "robotStandingStill"
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
if TYPE_CHECKING:
|
|
28
|
+
from isar.state_machine.state_machine import StateMachine
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class Idle:
|
|
32
|
+
def __init__(
|
|
33
|
+
self,
|
|
34
|
+
state_machine: "StateMachine",
|
|
35
|
+
state: IdleStates,
|
|
36
|
+
) -> None:
|
|
26
37
|
self.state_machine: "StateMachine" = state_machine
|
|
27
38
|
self.logger = logging.getLogger("state_machine")
|
|
28
|
-
self.events =
|
|
39
|
+
self.events = state_machine.events
|
|
29
40
|
self.shared_state = self.state_machine.shared_state
|
|
30
41
|
self.signal_state_machine_to_stop = state_machine.signal_state_machine_to_stop
|
|
42
|
+
self.state: IdleStates = state
|
|
43
|
+
|
|
44
|
+
# Only used for await_next_mission state
|
|
45
|
+
self.entered_time: float = time.time()
|
|
46
|
+
self.return_home_delay: float = settings.RETURN_HOME_DELAY
|
|
31
47
|
|
|
32
48
|
def start(self) -> None:
|
|
33
49
|
self.state_machine.update_state()
|
|
50
|
+
self.entered_time = time.time()
|
|
34
51
|
self._run()
|
|
35
52
|
|
|
36
53
|
def stop(self) -> None:
|
|
37
54
|
return
|
|
38
55
|
|
|
39
|
-
def _check_and_handle_stop_mission_event(self, event: Queue) -> bool:
|
|
40
|
-
if check_for_event(event):
|
|
41
|
-
self.state_machine.stop() # type: ignore
|
|
42
|
-
return True
|
|
43
|
-
return False
|
|
44
|
-
|
|
45
56
|
def _check_and_handle_start_mission_event(
|
|
46
57
|
self, event: Queue[StartMissionMessage]
|
|
47
58
|
) -> bool:
|
|
@@ -63,17 +74,32 @@ class RobotStandingStill(State):
|
|
|
63
74
|
self, event: StatusQueue[RobotStatus]
|
|
64
75
|
) -> bool:
|
|
65
76
|
robot_status: RobotStatus = check_shared_state(event)
|
|
66
|
-
|
|
77
|
+
|
|
78
|
+
expected_robot_status = (
|
|
79
|
+
RobotStatus.Home if self.state == IdleStates.Home else RobotStatus.Available
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
if robot_status != expected_robot_status:
|
|
67
83
|
self.state_machine.robot_status_changed() # type: ignore
|
|
68
84
|
return True
|
|
69
85
|
|
|
70
86
|
return False
|
|
71
87
|
|
|
88
|
+
def _check_and_handle_stop_mission_event(self, event: Queue) -> bool:
|
|
89
|
+
if check_for_event(event):
|
|
90
|
+
self.state_machine.stop() # type: ignore
|
|
91
|
+
return True
|
|
92
|
+
return False
|
|
93
|
+
|
|
94
|
+
def _should_return_home(self) -> bool:
|
|
95
|
+
time_since_entered = time.time() - self.entered_time
|
|
96
|
+
return time_since_entered > self.return_home_delay
|
|
97
|
+
|
|
72
98
|
def _run(self) -> None:
|
|
73
99
|
while True:
|
|
74
100
|
if self.signal_state_machine_to_stop.is_set():
|
|
75
101
|
self.logger.info(
|
|
76
|
-
"Stopping state machine from %s state", self.
|
|
102
|
+
"Stopping state machine from %s state", self.state.name
|
|
77
103
|
)
|
|
78
104
|
break
|
|
79
105
|
|
|
@@ -92,9 +118,16 @@ class RobotStandingStill(State):
|
|
|
92
118
|
):
|
|
93
119
|
break
|
|
94
120
|
|
|
95
|
-
if
|
|
96
|
-
self.
|
|
121
|
+
if (
|
|
122
|
+
self.state != IdleStates.AwaitNextMission
|
|
123
|
+
and self._check_and_handle_robot_status_event(
|
|
124
|
+
self.shared_state.robot_status
|
|
125
|
+
)
|
|
97
126
|
):
|
|
98
127
|
break
|
|
99
128
|
|
|
129
|
+
if self.state == IdleStates.AwaitNextMission and self._should_return_home():
|
|
130
|
+
self.state_machine.request_return_home() # type: ignore
|
|
131
|
+
break
|
|
132
|
+
|
|
100
133
|
time.sleep(self.state_machine.sleep_time)
|