diff --git a/.gitmodules b/.gitmodules index ff4affd519c3cc791c3cfb8922c575b2dc4aeecd..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "external/range-v3"] - path = external/range-v3 - url = https://github.com/ericniebler/range-v3.git diff --git a/CMakeLists.txt b/CMakeLists.txt index e796c7fb18491a95d16bc6a8eb77b4bcb56281cd..42074e06fbd1edc3e4a64445afe0f3cc68ebed47 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,26 +30,10 @@ armarx_find_package(PUBLIC Ceres QUIET) armarx_find_package(PUBLIC VTK QUIET) armarx_find_package(PUBLIC SemanticObjectRelations QUIET) armarx_find_package(PUBLIC OpenCV QUIET) # Required as RobotAPI is a legacy project. - +armarx_find_package(PUBLIC range-v3 QUIET) add_subdirectory(etc) -set(RANGES_VERBOSE_BUILD OFF) -set(RANGES_RELEASE_BUILD ON) -set(RANGES_CXX_STD 17) -add_subdirectory(external) - - -#include(FetchContent) - -#FetchContent_Declare( -# range_v3 -# GIT_REPOSITORY https://github.com/ericniebler/range-v3.git -# GIT_TAG 0.11.0 -#) -#FetchContent_MakeAvailable(range_v3) - - # FetchContent_Declare( # inotify_cpp # GIT_REPOSITORY https://github.com/erikzenker/inotify-cpp.git diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt deleted file mode 100644 index c7c484845661b8d61259f71230391460c1b7e480..0000000000000000000000000000000000000000 --- a/external/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_subdirectory(range-v3) diff --git a/external/range-v3 b/external/range-v3 deleted file mode 160000 index 0487cca29e352e8f16bbd91fda38e76e39a0ed28..0000000000000000000000000000000000000000 --- a/external/range-v3 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0487cca29e352e8f16bbd91fda38e76e39a0ed28 diff --git a/scenarios/Armar3Navigation/Armar3Navigation.scx b/scenarios/Armar3Navigation/Armar3Navigation.scx new file mode 100644 index 0000000000000000000000000000000000000000..332097d81b81222d34b63c3b9c43784df3fcde8e --- /dev/null +++ b/scenarios/Armar3Navigation/Armar3Navigation.scx @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<scenario name="Armar3Navigation" creation="2022-02-17.16:27:09" globalConfigName="./config/global.cfg" package="armarx_navigation" deploymentType="local" nodeName="NodeMain"> + <application name="navigation_memory" instance="" package="armarx_navigation" nodeName="" enabled="true" iceAutoRestart="false"/> +</scenario> + diff --git a/scenarios/Armar3Navigation/config/global.cfg b/scenarios/Armar3Navigation/config/global.cfg new file mode 100644 index 0000000000000000000000000000000000000000..fe2ccd2498c3375c0219cb13f002373570ed2bc0 --- /dev/null +++ b/scenarios/Armar3Navigation/config/global.cfg @@ -0,0 +1,4 @@ +# ================================================================== +# Global Config from Scenario Armar3Navigation +# ================================================================== + diff --git a/scenarios/Armar3Navigation/config/navigation_memory.cfg b/scenarios/Armar3Navigation/config/navigation_memory.cfg new file mode 100644 index 0000000000000000000000000000000000000000..d7c7f81e031de80a1b103ce42fac0ea2e9e4a44f --- /dev/null +++ b/scenarios/Armar3Navigation/config/navigation_memory.cfg @@ -0,0 +1,409 @@ +# ================================================================== +# navigation_memory properties +# ================================================================== + +# ArmarX.AdditionalPackages: List of additional ArmarX packages which should be in the list of default packages. If you have custom packages, which should be found by the gui or other apps, specify them here. Comma separated List. +# Attributes: +# - Default: Default value not mapped. +# - Case sensitivity: yes +# - Required: no +# ArmarX.AdditionalPackages = Default value not mapped. + + +# ArmarX.ApplicationName: Application name +# Attributes: +# - Default: "" +# - Case sensitivity: yes +# - Required: no +# ArmarX.ApplicationName = "" + + +# ArmarX.CachePath: Path for cache files. If relative path AND env. variable ARMARX_CONFIG_DIR is set, the cache path will be made relative to ARMARX_CONFIG_DIR. Otherwise if relative it will be relative to the default ArmarX config dir (${ARMARX_WORKSPACE}/armarx_config) +# Attributes: +# - Default: mongo/.cache +# - Case sensitivity: yes +# - Required: no +# ArmarX.CachePath = mongo/.cache + + +# ArmarX.Config: Comma-separated list of configuration files +# Attributes: +# - Default: "" +# - Case sensitivity: yes +# - Required: no +# ArmarX.Config = "" + + +# ArmarX.DataPath: Semicolon-separated search list for data files +# Attributes: +# - Default: "" +# - Case sensitivity: yes +# - Required: no +# ArmarX.DataPath = "" + + +# ArmarX.DefaultPackages: List of ArmarX packages which are accessible by default. Comma separated List. If you want to add your own packages and use all default ArmarX packages, use the property 'AdditionalPackages'. +# Attributes: +# - Default: Default value not mapped. +# - Case sensitivity: yes +# - Required: no +# ArmarX.DefaultPackages = Default value not mapped. + + +# ArmarX.DependenciesConfig: Path to the (usually generated) config file containing all data paths of all dependent projects. This property usually does not need to be edited. +# Attributes: +# - Default: ./config/dependencies.cfg +# - Case sensitivity: yes +# - Required: no +# ArmarX.DependenciesConfig = ./config/dependencies.cfg + + +# ArmarX.DisableLogging: Turn logging off in whole application +# Attributes: +# - Default: false +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.DisableLogging = false + + +# ArmarX.EnableProfiling: Enable profiling of CPU load produced by this application +# Attributes: +# - Default: false +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.EnableProfiling = false + + +# ArmarX.LoadLibraries: Libraries to load at start up of the application. Must be enabled by the Application with enableLibLoading(). Format: PackageName:LibraryName;... or /absolute/path/to/library;... +# Attributes: +# - Default: "" +# - Case sensitivity: yes +# - Required: no +# ArmarX.LoadLibraries = "" + + +# ArmarX.LoggingGroup: The logging group is transmitted with every ArmarX log message over Ice in order to group the message in the GUI. +# Attributes: +# - Default: "" +# - Case sensitivity: yes +# - Required: no +# ArmarX.LoggingGroup = "" + + +# ArmarX.NavigationMemory.ArVizStorageName: Name of the ArViz storage +# Attributes: +# - Default: ArVizStorage +# - Case sensitivity: yes +# - Required: no +# ArmarX.NavigationMemory.ArVizStorageName = ArVizStorage + + +# ArmarX.NavigationMemory.ArVizTopicName: Name of the ArViz topic +# Attributes: +# - Default: ArVizTopic +# - Case sensitivity: yes +# - Required: no +# ArmarX.NavigationMemory.ArVizTopicName = ArVizTopic + + +# ArmarX.NavigationMemory.EnableProfiling: enable profiler which is used for logging performance events +# Attributes: +# - Default: false +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.NavigationMemory.EnableProfiling = false + + +# ArmarX.NavigationMemory.MinimumLoggingLevel: Local logging level only for this component +# Attributes: +# - Default: Undefined +# - Case sensitivity: yes +# - Required: no +# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} +# ArmarX.NavigationMemory.MinimumLoggingLevel = Undefined + + +# ArmarX.NavigationMemory.ObjectName: Name of IceGrid well-known object +# Attributes: +# - Default: "" +# - Case sensitivity: yes +# - Required: no +# ArmarX.NavigationMemory.ObjectName = "" + + +# ArmarX.NavigationMemory.RemoteGuiName: Name of the remote gui provider +# Attributes: +# - Default: RemoteGuiProvider +# - Case sensitivity: yes +# - Required: no +# ArmarX.NavigationMemory.RemoteGuiName = RemoteGuiProvider + + +# ArmarX.NavigationMemory.mem.MemoryName: Name of this memory server. +# Attributes: +# - Default: Navigation +# - Case sensitivity: yes +# - Required: no +# ArmarX.NavigationMemory.mem.MemoryName = Navigation + + +# ArmarX.NavigationMemory.mem.ltm..buffer.storeFreq: Frequency to store the buffer to the LTM in Hz. +# Attributes: +# - Default: 10 +# - Case sensitivity: yes +# - Required: no +# ArmarX.NavigationMemory.mem.ltm..buffer.storeFreq = 10 + + +# ArmarX.NavigationMemory.mem.ltm.depthImageExtractor.Enabled: +# Attributes: +# - Default: true +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.NavigationMemory.mem.ltm.depthImageExtractor.Enabled = true + + +# ArmarX.NavigationMemory.mem.ltm.enabled: +# Attributes: +# - Default: false +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.NavigationMemory.mem.ltm.enabled = false + + +# ArmarX.NavigationMemory.mem.ltm.exrConverter.Enabled: +# Attributes: +# - Default: true +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.NavigationMemory.mem.ltm.exrConverter.Enabled = true + + +# ArmarX.NavigationMemory.mem.ltm.imageExtractor.Enabled: +# Attributes: +# - Default: true +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.NavigationMemory.mem.ltm.imageExtractor.Enabled = true + + +# ArmarX.NavigationMemory.mem.ltm.memFreqFilter.Enabled: +# Attributes: +# - Default: false +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.NavigationMemory.mem.ltm.memFreqFilter.Enabled = false + + +# ArmarX.NavigationMemory.mem.ltm.memFreqFilter.WaitingTime: Waiting time in MS after each LTM update. +# Attributes: +# - Default: -1 +# - Case sensitivity: yes +# - Required: no +# ArmarX.NavigationMemory.mem.ltm.memFreqFilter.WaitingTime = -1 + + +# ArmarX.NavigationMemory.mem.ltm.pngConverter.Enabled: +# Attributes: +# - Default: true +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.NavigationMemory.mem.ltm.pngConverter.Enabled = true + + +# ArmarX.NavigationMemory.mem.ltm.sizeToCompressDataInMegaBytes: The size in MB to compress away the current export. Exports are numbered (lower number means newer). +# Attributes: +# - Default: 1024 +# - Case sensitivity: yes +# - Required: no +# ArmarX.NavigationMemory.mem.ltm.sizeToCompressDataInMegaBytes = 1024 + + +# ArmarX.NavigationMemory.mem.ltm.snapEqFilter.Enabled: +# Attributes: +# - Default: false +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.NavigationMemory.mem.ltm.snapEqFilter.Enabled = false + + +# ArmarX.NavigationMemory.mem.ltm.snapEqFilter.MaxWaitingTime: Max Waiting time in MS after each Entity update. +# Attributes: +# - Default: -1 +# - Case sensitivity: yes +# - Required: no +# ArmarX.NavigationMemory.mem.ltm.snapEqFilter.MaxWaitingTime = -1 + + +# ArmarX.NavigationMemory.mem.ltm.snapFreqFilter.Enabled: +# Attributes: +# - Default: false +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.NavigationMemory.mem.ltm.snapFreqFilter.Enabled = false + + +# ArmarX.NavigationMemory.mem.ltm.snapFreqFilter.WaitingTime: Waiting time in MS after each Entity update. +# Attributes: +# - Default: -1 +# - Case sensitivity: yes +# - Required: no +# ArmarX.NavigationMemory.mem.ltm.snapFreqFilter.WaitingTime = -1 + + +# ArmarX.NavigationMemory.mem.ltm.storagepath: The path to the memory storage (the memory will be stored in a seperate subfolder). +# Attributes: +# - Default: Default value not mapped. +# - Case sensitivity: yes +# - Required: no +# ArmarX.NavigationMemory.mem.ltm.storagepath = Default value not mapped. + + +# ArmarX.NavigationMemory.mns.MemoryNameSystemEnabled: Whether to use (and depend on) the Memory Name System (MNS). +# Set to false to use this memory as a stand-alone. +# Attributes: +# - Default: true +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.NavigationMemory.mns.MemoryNameSystemEnabled = true + + +# ArmarX.NavigationMemory.mns.MemoryNameSystemName: Name of the Memory Name System (MNS) component. +# Attributes: +# - Default: MemoryNameSystem +# - Case sensitivity: yes +# - Required: no +# ArmarX.NavigationMemory.mns.MemoryNameSystemName = MemoryNameSystem + + +# ArmarX.NavigationMemory.p.locationGraph.visuFrequency: Visualization frequeny of locations and graph edges [Hz]. +# Attributes: +# - Default: 2 +# - Case sensitivity: yes +# - Required: no +# ArmarX.NavigationMemory.p.locationGraph.visuFrequency = 2 + + +# ArmarX.NavigationMemory.p.locationGraph.visuGraphEdges: Enable visualization of navigation graph edges. +# Attributes: +# - Default: true +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.NavigationMemory.p.locationGraph.visuGraphEdges = true + + +# ArmarX.NavigationMemory.p.locationGraph.visuLocation: Enable visualization of locations. +# Attributes: +# - Default: true +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.NavigationMemory.p.locationGraph.visuLocation = true + + +# ArmarX.NavigationMemory.p.snapshotToLoad: Memory snapshot to load at start up +# (e.g. 'PriorKnowledgeData/navigation-graphs/snapshot'). +# Attributes: +# - Default: "" +# - Case sensitivity: yes +# - Required: no +ArmarX.NavigationMemory.p.snapshotToLoad = "./PriorKnowledgeData/navigation-graphs/KitchenKK" + + +# ArmarX.NavigationMemory.tpc.pub.MemoryListener: Name of the `MemoryListener` topic to publish data to. +# Attributes: +# - Default: MemoryUpdates +# - Case sensitivity: yes +# - Required: no +# ArmarX.NavigationMemory.tpc.pub.MemoryListener = MemoryUpdates + + +# ArmarX.NavigationMemory.tpc.sub.MemoryListener: Name of the `MemoryListener` topic to subscribe to. +# Attributes: +# - Default: MemoryUpdates +# - Case sensitivity: yes +# - Required: no +# ArmarX.NavigationMemory.tpc.sub.MemoryListener = MemoryUpdates + + +# ArmarX.RedirectStdout: Redirect std::cout and std::cerr to ArmarXLog +# Attributes: +# - Default: true +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.RedirectStdout = true + + +# ArmarX.RemoteHandlesDeletionTimeout: The timeout (in ms) before a remote handle deletes the managed object after the use count reached 0. This time can be used by a client to increment the count again (may be required when transmitting remote handles) +# Attributes: +# - Default: 3000 +# - Case sensitivity: yes +# - Required: no +# ArmarX.RemoteHandlesDeletionTimeout = 3000 + + +# ArmarX.SecondsStartupDelay: The startup will be delayed by this number of seconds (useful for debugging) +# Attributes: +# - Default: 0 +# - Case sensitivity: yes +# - Required: no +# ArmarX.SecondsStartupDelay = 0 + + +# ArmarX.StartDebuggerOnCrash: If this application crashes (segmentation fault) qtcreator will attach to this process and start the debugger. +# Attributes: +# - Default: false +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.StartDebuggerOnCrash = false + + +# ArmarX.ThreadPoolSize: Size of the ArmarX ThreadPool that is always running. +# Attributes: +# - Default: 1 +# - Case sensitivity: yes +# - Required: no +# ArmarX.ThreadPoolSize = 1 + + +# ArmarX.TopicSuffix: Suffix appended to all topic names for outgoing topics. This is mainly used to direct all topics to another name for TopicReplaying purposes. +# Attributes: +# - Default: "" +# - Case sensitivity: yes +# - Required: no +# ArmarX.TopicSuffix = "" + + +# ArmarX.UseTimeServer: Enable using a global Timeserver (e.g. from ArmarXSimulator) +# Attributes: +# - Default: false +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.UseTimeServer = false + + +# ArmarX.Verbosity: Global logging level for whole application +# Attributes: +# - Default: Info +# - Case sensitivity: yes +# - Required: no +# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} +# ArmarX.Verbosity = Info + + diff --git a/source/armarx/navigation/components/Navigator/Navigator.cpp b/source/armarx/navigation/components/Navigator/Navigator.cpp index 10f866548c0a334d30cf94f3f844a1dbd5d468bf..61dafd8ed539e2d57b912199f1f0e41fa63941ec 100644 --- a/source/armarx/navigation/components/Navigator/Navigator.cpp +++ b/source/armarx/navigation/components/Navigator/Navigator.cpp @@ -458,6 +458,8 @@ namespace armarx::navigation::components // Add a required property. // def->required(properties.boxLayerName, "p.box.LayerName", "Name of the box layer in ArViz."); + def->optional(params.robotName, "p.robotName"); + // Add an optionalproperty. def->optional(params.occupiedGridThreshold, "p.occupancy_grid.occopied_threshold", diff --git a/source/armarx/navigation/core/CMakeLists.txt b/source/armarx/navigation/core/CMakeLists.txt index e01f7daf6c2abfc801dea94c381eb31ad293878b..6b56cc432b6266039208ad37d552ef39c39d6e5c 100644 --- a/source/armarx/navigation/core/CMakeLists.txt +++ b/source/armarx/navigation/core/CMakeLists.txt @@ -37,20 +37,19 @@ armarx_add_library(core json_conversions.h time/ChronoMonotonicTimeServer.h time/TimeServerInterface.h - DEPENDENCIES - PUBLIC - ArmarXCoreInterfaces - ArmarXCore - ArmarXCoreObservers # variant - # RobotAPI - aron - aroncommon - RobotAPIInterfaces - SemanticObjectRelations - Simox::VirtualRobot - armarx_navigation::core_aron - PRIVATE - range-v3::range-v3 + DEPENDENCIES_PUBLIC + ArmarXCoreInterfaces + ArmarXCore + ArmarXCoreObservers # variant + # RobotAPI + aron + aroncommon + RobotAPIInterfaces + SemanticObjectRelations + Simox::VirtualRobot + armarx_navigation::core_aron + DEPENDENCIES_PRIVATE + range-v3::range-v3 ) diff --git a/source/armarx/navigation/global_planning/CMakeLists.txt b/source/armarx/navigation/global_planning/CMakeLists.txt index 88d4191f1e680d2d53a38ea61843a839895558bd..5ba8c72f3d1fd492beb75db454476f7681b2d276 100644 --- a/source/armarx/navigation/global_planning/CMakeLists.txt +++ b/source/armarx/navigation/global_planning/CMakeLists.txt @@ -7,17 +7,16 @@ armarx_add_aron_library(global_planning_aron ) armarx_add_library(global_planning - DEPENDENCIES - PUBLIC - ceres - ArmarXCoreInterfaces - ArmarXCore - aroncommon - armarx_navigation::core - armarx_navigation::algorithms - armarx_navigation::global_planning_aron - PRIVATE - range-v3::range-v3 + DEPENDENCIES_PUBLIC + Ceres::ceres + ArmarXCoreInterfaces + ArmarXCore + aroncommon + armarx_navigation::core + armarx_navigation::algorithms + armarx_navigation::global_planning_aron + DEPENDENCIES_PRIVATE + range-v3::range-v3 SOURCES ./GlobalPlanner.cpp ./AStar.cpp diff --git a/source/armarx/navigation/server/CMakeLists.txt b/source/armarx/navigation/server/CMakeLists.txt index b9f7a261ce1b87d80a340ede8bb1c34c3c1d3ef2..25eae2276eda76c413929edad42321ff7d108948 100644 --- a/source/armarx/navigation/server/CMakeLists.txt +++ b/source/armarx/navigation/server/CMakeLists.txt @@ -34,8 +34,7 @@ armarx_add_library(server ./monitoring/GoalReachedMonitor.h # parameterization ./parameterization/MemoryParameterizationService.h - DEPENDENCIES - PUBLIC + DEPENDENCIES_PUBLIC ArmarXCoreInterfaces ArmarXCore ArViz # RobotAPI @@ -46,7 +45,7 @@ armarx_add_library(server armarx_navigation::trajectory_control armarx_navigation::safety_control armarx_navigation::memory - PRIVATE + DEPENDENCIES_PRIVATE range-v3::range-v3 )