diff --git a/examples/components/example_client/Component.cpp b/examples/components/example_client/Component.cpp index afbf750311e9ec3def879a11f054d8d1776c43e8..4bb1c1f715bde306bde98dce9d7189edec591b22 100644 --- a/examples/components/example_client/Component.cpp +++ b/examples/components/example_client/Component.cpp @@ -27,19 +27,19 @@ #include <cmath> #include <thread> -#include <Eigen/src/Geometry/AngleAxis.h> -#include <Eigen/src/Geometry/Translation.h> - #include <ArmarXCore/core/logging/Logging.h> #include <ArmarXCore/core/time/Clock.h> #include <ArmarXCore/core/time/ClockType.h> #include <ArmarXCore/core/time/forward_declarations.h> #include <ArmarXCore/libraries/DecoupledSingleComponent/Decoupled.h> -#include <armarx/navigation/client/types.h> -#include <armarx/navigation/global_planning/Point2Point.h> +#include "armarx/navigation/core/types.h" +#include "armarx/navigation/global_planning/SPFA.h" +#include "armarx/navigation/local_planning/TimedElasticBands.h" #include <armarx/navigation/client/PathBuilder.h> +#include <armarx/navigation/client/types.h> #include <armarx/navigation/global_planning/AStar.h> +#include <armarx/navigation/global_planning/Point2Point.h> #include <armarx/navigation/trajectory_control/local/TrajectoryFollowingController.h> @@ -68,7 +68,7 @@ namespace armarx::navigation::components::example_client void Component::onConnectComponent() { - task = new armarx::RunningTask<Component>(this, &Component::exampleNavigationPointToPoint); + task = new armarx::RunningTask<Component>(this, &Component::run); task->start(); } @@ -91,9 +91,86 @@ namespace armarx::navigation::components::example_client std::string Component::getDefaultName() const { - return "ExampleClient"; + return GetDefaultName(); + } + + + std::string + Component::GetDefaultName() + { + return "example_client"; + } + + + void + Component::run() + { + switch (properties.mode) + { + + case Mode::Standard: + ARMARX_IMPORTANT << "Running `Mode::Standard`"; + exampleNavigation(); + break; + case Mode::Complex: + ARMARX_IMPORTANT << "Running `Mode::Complex`"; + exampleNavigationComplex(); + break; + case Mode::PointToPoint: + ARMARX_IMPORTANT << "Running `Mode::PointToPoint`"; + exampleNavigationPointToPoint(); + break; + case Mode::UpdateNavigator: + ARMARX_IMPORTANT << "Running `Mode::UpdateNavigator`"; + exampleNavigationUpdateNavigator(); + break; + } } + void + Component::exampleNavigationUpdateNavigator() + { + // Import relevant namespaces. + using namespace armarx::navigation; + + ARMARX_INFO << "Configuring navigator"; + + // Create an example configuration valid for the following move* calls. + configureNavigator( + client::NavigationStackConfig() + .general({} /*{.maxVel = VelocityLimits{.linear = 400 , .angular = 0.1}}*/) + .globalPlanner(global_planning::SPFAParams()) + .localPlanner(local_planning::TimedElasticBandsParams()) + .trajectoryController(traj_ctrl::local::TrajectoryFollowingControllerParams())); + + // Example of registering a lambda as callback. + getNavigator().onGoalReached([&]() { ARMARX_IMPORTANT << "Goal reached!"; }); + + // Start moving to goal position using above config. + + ARMARX_INFO << "Moving to goal pose"; + core::Pose goal = core::Pose::Identity(); + goal.translation() << 2000, 1000, 0; + getNavigator().moveTo({goal}, core::NavigationFrame::Absolute); + Clock::WaitFor(Duration::Seconds(1.0)); + + + // after short period of time (before goal is reached), change goal + const std::vector<core::Pose> goals{ + core::Pose(Eigen::Translation3f{1000, 2000, 0}), + core::Pose(Eigen::Translation3f{3000, 0, 0}), + core::Pose(Eigen::Translation3f{5000, 1000, 0}), + }; + + while (true) + { + for (const auto& nextGoal : goals) + { + Clock::WaitFor(Duration::Seconds(1.0)); + getNavigator().update({nextGoal}, core::NavigationFrame::Absolute); + } + } + } void Component::exampleNavigation() @@ -107,8 +184,9 @@ namespace armarx::navigation::components::example_client configureNavigator( client::NavigationStackConfig() .general({} /*{.maxVel = VelocityLimits{.linear = 400 , .angular = 0.1}}*/) - .globalPlanner(global_planning::AStarParams()) - .trajectoryController(traj_ctrl::local::TrajectoryFollowingControllerParams())); // FIXME + .globalPlanner(global_planning::SPFAParams()) + .trajectoryController( + traj_ctrl::local::TrajectoryFollowingControllerParams())); // FIXME // Example of registering a lambda as callback. getNavigator().onGoalReached([&]() { ARMARX_IMPORTANT << "Goal reached! (lambda-style)"; }); @@ -206,8 +284,9 @@ namespace armarx::navigation::components::example_client configureNavigator( client::NavigationStackConfig() .general({} /*{.maxVel = VelocityLimits{.linear = 400 , .angular = 0.1}}*/) - .globalPlanner(global_planning::AStarParams()) - .trajectoryController(traj_ctrl::local::TrajectoryFollowingControllerParams())); // FIXME + .globalPlanner(global_planning::SPFAParams()) + .trajectoryController( + traj_ctrl::local::TrajectoryFollowingControllerParams())); // FIXME // Example of registering a lambda as callback. getNavigator().onGoalReached([&]() { ARMARX_IMPORTANT << "Goal reached! (lambda-style)"; }); @@ -283,7 +362,8 @@ namespace armarx::navigation::components::example_client client::NavigationStackConfig() .general({} /*{.maxVel = VelocityLimits{.linear = 400 , .angular = 0.1}}*/) .globalPlanner(global_planning::Point2PointParams()) - .trajectoryController(traj_ctrl::local::TrajectoryFollowingControllerParams())); // FIXME + .trajectoryController( + traj_ctrl::local::TrajectoryFollowingControllerParams())); // FIXME Clock::WaitFor(Duration::Seconds(1)); @@ -366,10 +446,15 @@ namespace armarx::navigation::components::example_client "relativeMovement", "The distance between two target poses [mm]"); + def->optional(properties.mode, "mode", "Which example to run") + .map({{"standard", Mode::Standard}, + {"complex", Mode::Complex}, + {"point_to_point", Mode::PointToPoint}, + {"update_navigator", Mode::UpdateNavigator}}); + return def; } - - ARMARX_DECOUPLED_REGISTER_COMPONENT(Component); + ARMARX_REGISTER_COMPONENT_EXECUTABLE(Component, Component::GetDefaultName()); } // namespace armarx::navigation::components::example_client diff --git a/examples/components/example_client/Component.h b/examples/components/example_client/Component.h index 295d1964401c7b2025b339e3384340b9a95b37da..3c6748d3ea90401b3cc385715232ab73be814f00 100644 --- a/examples/components/example_client/Component.h +++ b/examples/components/example_client/Component.h @@ -35,6 +35,14 @@ namespace armarx::navigation::components::example_client { + enum class Mode + { + Standard, + Complex, + PointToPoint, + UpdateNavigator + }; + /** * @defgroup Component-ExampleClient ExampleClient * @ingroup armarx_navigation-Components @@ -57,6 +65,8 @@ namespace armarx::navigation::components::example_client ~Component() override; + static std::string GetDefaultName(); + protected: /// @see PropertyUser::createPropertyDefinitions() armarx::PropertyDefinitionsPtr createPropertyDefinitions() override; @@ -75,6 +85,8 @@ namespace armarx::navigation::components::example_client std::string getDefaultName() const override; + void run(); + void exampleNavigation(); void exampleNavigationComplex(); @@ -91,12 +103,16 @@ namespace armarx::navigation::components::example_client */ void exampleNavigationPointToPoint(); + void exampleNavigationUpdateNavigator(); + private: void goalReached(); struct{ std::string robotName = "Armar6"; float relativeMovement = 200; // [mm] + + Mode mode = Mode::Standard; } properties; armarx::RunningTask<Component>::pointer_type task; diff --git a/scenarios/HumanAwareNavigation/config/ObjectMemory.cfg b/scenarios/HumanAwareNavigation/config/ObjectMemory.cfg index 2af60bdea6ceb9f628cbec9f8717aae06c630819..773e48120ca477d223c4745028bede338999bc49 100644 --- a/scenarios/HumanAwareNavigation/config/ObjectMemory.cfg +++ b/scenarios/HumanAwareNavigation/config/ObjectMemory.cfg @@ -259,6 +259,15 @@ # ArmarX.ObjectMemory.mem.inst.calibration.offset = 0 +# ArmarX.ObjectMemory.mem.inst.calibration.robotName: Name of robot whose note can be calibrated. +# If not given, the 'fallbackName' is used. +# Attributes: +# - Default: "" +# - Case sensitivity: yes +# - Required: no +# ArmarX.ObjectMemory.mem.inst.calibration.robotName = "" + + # ArmarX.ObjectMemory.mem.inst.calibration.robotNode: Robot node which can be calibrated. # Attributes: # - Default: Neck_2_Pitch @@ -341,6 +350,14 @@ # ArmarX.ObjectMemory.mem.inst.head.maxJointVelocity = 0.0500000007 +# ArmarX.ObjectMemory.mem.inst.robots.FallbackName: Robot name to use as fallback if the robot name is not specified in a provided object pose. +# Attributes: +# - Default: "" +# - Case sensitivity: yes +# - Required: no +# ArmarX.ObjectMemory.mem.inst.robots.FallbackName = "" + + # ArmarX.ObjectMemory.mem.inst.scene.10_Package: ArmarX package containing the scene snapshots. # Scene snapshots are expected to be located in Package/data/Package/Scenes/*.json. # Attributes: @@ -513,37 +530,21 @@ # ArmarX.ObjectMemory.mem.inst.visu.useArticulatedModels = true -# ArmarX.ObjectMemory.mem.ltm..configuration: +# ArmarX.ObjectMemory.mem.ltm.configuration: # Attributes: -# - Default: "" +# - Default: {} # - Case sensitivity: yes # - Required: no -# ArmarX.ObjectMemory.mem.ltm..configuration = "" +# ArmarX.ObjectMemory.mem.ltm.configuration = {} -# ArmarX.ObjectMemory.mem.ltm..enabled: +# ArmarX.ObjectMemory.mem.ltm.enabled: # Attributes: # - Default: false # - Case sensitivity: yes # - Required: no # - Possible values: {0, 1, false, no, true, yes} -# ArmarX.ObjectMemory.mem.ltm..enabled = false - - -# ArmarX.ObjectMemory.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.ObjectMemory.mem.ltm.sizeToCompressDataInMegaBytes = 1024 - - -# ArmarX.ObjectMemory.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.ObjectMemory.mem.ltm.storagepath = Default value not mapped. +# ArmarX.ObjectMemory.mem.ltm.enabled = false # ArmarX.ObjectMemory.mem.robot_state.Memory: @@ -588,14 +589,6 @@ # ArmarX.ObjectMemory.prediction.TimeWindow = 2 -# ArmarX.ObjectMemory.robotName: -# Attributes: -# - Default: Armar6 -# - Case sensitivity: yes -# - Required: no -# ArmarX.ObjectMemory.robotName = Armar6 - - # ArmarX.ObjectMemory.tpc.pub.DebugObserver: Name of the `DebugObserver` topic to publish data to. # Attributes: # - Default: DebugObserver diff --git a/scenarios/HumanAwareNavigation/config/VisionMemory.cfg b/scenarios/HumanAwareNavigation/config/VisionMemory.cfg index 4c7327ed4e27e8a8b6da33be9f4fa920158d9f6d..1b95447f4edb52efc404a7bd9c2c00ee89ddf608 100644 --- a/scenarios/HumanAwareNavigation/config/VisionMemory.cfg +++ b/scenarios/HumanAwareNavigation/config/VisionMemory.cfg @@ -210,37 +210,21 @@ # ArmarX.VisionMemory.mem.MemoryName = Vision -# ArmarX.VisionMemory.mem.ltm..configuration: +# ArmarX.VisionMemory.mem.ltm.configuration: # Attributes: -# - Default: "" +# - Default: {} # - Case sensitivity: yes # - Required: no -# ArmarX.VisionMemory.mem.ltm..configuration = "" +# ArmarX.VisionMemory.mem.ltm.configuration = {} -# ArmarX.VisionMemory.mem.ltm..enabled: +# ArmarX.VisionMemory.mem.ltm.enabled: # Attributes: # - Default: false # - Case sensitivity: yes # - Required: no # - Possible values: {0, 1, false, no, true, yes} -# ArmarX.VisionMemory.mem.ltm..enabled = false - - -# ArmarX.VisionMemory.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.VisionMemory.mem.ltm.sizeToCompressDataInMegaBytes = 1024 - - -# ArmarX.VisionMemory.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.VisionMemory.mem.ltm.storagepath = Default value not mapped. +# ArmarX.VisionMemory.mem.ltm.enabled = false # ArmarX.VisionMemory.mns.MemoryNameSystemEnabled: Whether to use (and depend on) the Memory Name System (MNS). diff --git a/scenarios/HumanAwareNavigation/config/dynamic_distance_to_obstacle_costmap_provider.cfg b/scenarios/HumanAwareNavigation/config/dynamic_distance_to_obstacle_costmap_provider.cfg index 565bb501258d5d9dc917d2a5cd2108937980babf..81d7cebf824840bbff1c4d28da4cebcfabc95977 100644 --- a/scenarios/HumanAwareNavigation/config/dynamic_distance_to_obstacle_costmap_provider.cfg +++ b/scenarios/HumanAwareNavigation/config/dynamic_distance_to_obstacle_costmap_provider.cfg @@ -296,7 +296,7 @@ # Attributes: # - Case sensitivity: yes # - Required: yes -# ArmarX.dynamic_distance_to_obstacle_costmap_provider.p.staticCostmap.providerName = ::_NOT_SET_:: +ArmarX.dynamic_distance_to_obstacle_costmap_provider.p.staticCostmap.providerName = distance_to_obstacle_costmap_provider # ArmarX.dynamic_distance_to_obstacle_costmap_provider.p.updatePeriodMs: diff --git a/scenarios/HumanAwareNavigation/config/example_client.cfg b/scenarios/HumanAwareNavigation/config/example_client.cfg index eef853017b53a47640988642eec0e92c8660c615..c21733bd95c226d102ba54430e01dc8b8b848766 100644 --- a/scenarios/HumanAwareNavigation/config/example_client.cfg +++ b/scenarios/HumanAwareNavigation/config/example_client.cfg @@ -76,171 +76,188 @@ # ArmarX.EnableProfiling = false -# ArmarX.ExampleClient.EnableProfiling: enable profiler which is used for logging performance events +# ArmarX.ExampleClient.nav.NavigatorName: No Description # Attributes: -# - Default: false -# - Case sensitivity: yes +# - Default: navigator +# - Case sensitivity: no # - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.ExampleClient.EnableProfiling = false +ArmarX.ExampleClient.nav.NavigatorName = navigator -# ArmarX.ExampleClient.MinimumLoggingLevel: Local logging level only for this component +# 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: Undefined +# - Default: "" # - Case sensitivity: yes # - Required: no -# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} -# ArmarX.ExampleClient.MinimumLoggingLevel = Undefined +# ArmarX.LoadLibraries = "" -# ArmarX.ExampleClient.ObjectName: Name of IceGrid well-known object +# 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.ExampleClient.ObjectName = "" +# ArmarX.LoggingGroup = "" -# ArmarX.ExampleClient.mem.robot_state.Memory: +# ArmarX.RedirectStdout: Redirect std::cout and std::cerr to ArmarXLog # Attributes: -# - Default: RobotState +# - Default: true # - Case sensitivity: yes # - Required: no -# ArmarX.ExampleClient.mem.robot_state.Memory = RobotState +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.RedirectStdout = true -# ArmarX.ExampleClient.mem.robot_state.localizationSegment: Name of the localization memory core segment to use. +# 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: Localization +# - Default: 3000 # - Case sensitivity: yes # - Required: no -# ArmarX.ExampleClient.mem.robot_state.localizationSegment = Localization +# ArmarX.RemoteHandlesDeletionTimeout = 3000 -# ArmarX.ExampleClient.mns.MemoryNameSystemEnabled: Whether to use (and depend on) the Memory Name System (MNS). -# Set to false to use this memory as a stand-alone. +# ArmarX.SecondsStartupDelay: The startup will be delayed by this number of seconds (useful for debugging) # Attributes: -# - Default: true +# - 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.ExampleClient.mns.MemoryNameSystemEnabled = true +# ArmarX.StartDebuggerOnCrash = false -# ArmarX.ExampleClient.mns.MemoryNameSystemName: Name of the Memory Name System (MNS) component. +# ArmarX.ThreadPoolSize: Size of the ArmarX ThreadPool that is always running. # Attributes: -# - Default: MemoryNameSystem +# - Default: 1 # - Case sensitivity: yes # - Required: no -# ArmarX.ExampleClient.mns.MemoryNameSystemName = MemoryNameSystem +# ArmarX.ThreadPoolSize = 1 -# ArmarX.ExampleClient.nav.NavigatorName: Name of the Navigator +# 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: navigator +# - Default: "" # - Case sensitivity: yes # - Required: no -ArmarX.ExampleClient.nav.NavigatorName = navigator +# ArmarX.TopicSuffix = "" -# ArmarX.ExampleClient.relativeMovement: The distance between two target poses [mm] +# ArmarX.UseTimeServer: Enable using a global Timeserver (e.g. from ArmarXSimulator) # Attributes: -# - Default: 200 +# - Default: false # - Case sensitivity: yes # - Required: no -# ArmarX.ExampleClient.relativeMovement = 200 +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.UseTimeServer = false -# ArmarX.ExampleClient.robotName: +# ArmarX.Verbosity: Global logging level for whole application # Attributes: -# - Default: Armar6 +# - Default: Info +# - Case sensitivity: yes +# - Required: no +# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} +# ArmarX.Verbosity = Info + + +# ArmarX.example_client.EnableProfiling: enable profiler which is used for logging performance events +# Attributes: +# - Default: false # - Case sensitivity: yes # - Required: no -# ArmarX.ExampleClient.robotName = Armar6 +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.example_client.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;... +# ArmarX.example_client.MinimumLoggingLevel: Local logging level only for this component # Attributes: -# - Default: "" +# - Default: Undefined # - Case sensitivity: yes # - Required: no -# ArmarX.LoadLibraries = "" +# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} +# ArmarX.example_client.MinimumLoggingLevel = Undefined -# ArmarX.LoggingGroup: The logging group is transmitted with every ArmarX log message over Ice in order to group the message in the GUI. +# ArmarX.example_client.ObjectName: Name of IceGrid well-known object # Attributes: # - Default: "" # - Case sensitivity: yes # - Required: no -# ArmarX.LoggingGroup = "" +# ArmarX.example_client.ObjectName = "" -# ArmarX.RedirectStdout: Redirect std::cout and std::cerr to ArmarXLog +# ArmarX.example_client.mem.robot_state.Memory: # Attributes: -# - Default: true +# - Default: RobotState # - Case sensitivity: yes # - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.RedirectStdout = true +# ArmarX.example_client.mem.robot_state.Memory = RobotState -# 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) +# ArmarX.example_client.mem.robot_state.localizationSegment: Name of the localization memory core segment to use. # Attributes: -# - Default: 3000 +# - Default: Localization # - Case sensitivity: yes # - Required: no -# ArmarX.RemoteHandlesDeletionTimeout = 3000 +# ArmarX.example_client.mem.robot_state.localizationSegment = Localization -# ArmarX.SecondsStartupDelay: The startup will be delayed by this number of seconds (useful for debugging) +# ArmarX.example_client.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: 0 +# - Default: true # - Case sensitivity: yes # - Required: no -# ArmarX.SecondsStartupDelay = 0 +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.example_client.mns.MemoryNameSystemEnabled = true -# ArmarX.StartDebuggerOnCrash: If this application crashes (segmentation fault) qtcreator will attach to this process and start the debugger. +# ArmarX.example_client.mns.MemoryNameSystemName: Name of the Memory Name System (MNS) component. # Attributes: -# - Default: false +# - Default: MemoryNameSystem # - Case sensitivity: yes # - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.StartDebuggerOnCrash = false +# ArmarX.example_client.mns.MemoryNameSystemName = MemoryNameSystem -# ArmarX.ThreadPoolSize: Size of the ArmarX ThreadPool that is always running. +# ArmarX.example_client.mode: Which example to run # Attributes: -# - Default: 1 +# - Default: standard # - Case sensitivity: yes # - Required: no -# ArmarX.ThreadPoolSize = 1 +# - Possible values: {complex, point_to_point, standard, update_navigator} +# ArmarX.example_client.mode = standard -# 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. +# ArmarX.example_client.nav.NavigatorName: Name of the Navigator # Attributes: -# - Default: "" +# - Default: navigator # - Case sensitivity: yes # - Required: no -# ArmarX.TopicSuffix = "" +# ArmarX.example_client.nav.NavigatorName = navigator -# ArmarX.UseTimeServer: Enable using a global Timeserver (e.g. from ArmarXSimulator) +# ArmarX.example_client.relativeMovement: The distance between two target poses [mm] # Attributes: -# - Default: false +# - Default: 200 # - Case sensitivity: yes # - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.UseTimeServer = false +# ArmarX.example_client.relativeMovement = 200 -# ArmarX.Verbosity: Global logging level for whole application +# ArmarX.example_client.robotName: # Attributes: -# - Default: Info +# - Default: Armar6 # - Case sensitivity: yes # - Required: no -# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} -# ArmarX.Verbosity = Info +# ArmarX.example_client.robotName = Armar6 diff --git a/scenarios/HumanAwareNavigation/config/navigation_memory.cfg b/scenarios/HumanAwareNavigation/config/navigation_memory.cfg index 4fd3110f3e705a4d89e569912a13eee51ad02c80..a3e73f4f38e5be8e1545891322ab2ac4f66b7471 100644 --- a/scenarios/HumanAwareNavigation/config/navigation_memory.cfg +++ b/scenarios/HumanAwareNavigation/config/navigation_memory.cfg @@ -191,7 +191,7 @@ ArmarX.Verbosity = Verbose # - Case sensitivity: yes # - Required: no # - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} -# ArmarX.navigation_memory.MinimumLoggingLevel = Undefined +ArmarX.navigation_memory.MinimumLoggingLevel = Verbose # ArmarX.navigation_memory.ObjectName: Name of IceGrid well-known object @@ -288,6 +288,3 @@ ArmarX.Verbosity = Verbose # ArmarX.navigation_memory.p.snapshotToLoad = "" -# ArmarX.navigation_memory.MinimumLoggingLevel: -# Attributes: -ArmarX.navigation_memory.MinimumLoggingLevel = Verbose diff --git a/scenarios/HumanAwareNavigation/config/navigator.cfg b/scenarios/HumanAwareNavigation/config/navigator.cfg index 7b44af1c8cb74e53e7c173bf80e5193e933af96c..e55d723f46325b40c7fe5ec3a5003f934ce517b0 100644 --- a/scenarios/HumanAwareNavigation/config/navigator.cfg +++ b/scenarios/HumanAwareNavigation/config/navigator.cfg @@ -92,46 +92,6 @@ # ArmarX.LoggingGroup = "" -# ArmarX.Navigator.ObjectName: No Description -# Attributes: -# - Default: navigator -# - Case sensitivity: no -# - Required: no -ArmarX.Navigator.ObjectName = navigator - - -# ArmarX.Navigator.RobotUnitName: No Description -# Attributes: -# - Default: Armar6Unit -# - Case sensitivity: no -# - Required: no -ArmarX.Navigator.RobotUnitName = Armar6Unit - - -# ArmarX.Navigator.cmp.PlatformUnit: No Description -# Attributes: -# - Default: Armar6PlatformUnit -# - Case sensitivity: no -# - Required: no -ArmarX.Navigator.cmp.PlatformUnit = Armar6PlatformUnit - - -# ArmarX.Navigator.p.disableExecutor: No Description -# Attributes: -# - Default: false -# - Case sensitivity: no -# - Required: no -ArmarX.Navigator.p.disableExecutor = false - - -# ArmarX.Navigator.p.occupancy_grid.occopied_threshold: No Description -# Attributes: -# - Default: 0.8 -# - Case sensitivity: no -# - Required: no -ArmarX.Navigator.p.occupancy_grid.occopied_threshold = 0.8 - - # ArmarX.RedirectStdout: Redirect std::cout and std::cerr to ArmarXLog # Attributes: # - Default: true @@ -216,6 +176,14 @@ ArmarX.Verbosity = Verbose # ArmarX.navigator.ArVizTopicName = ArVizTopic +# ArmarX.navigator.DebugObserverTopicName: Name of the topic the DebugObserver listens on +# Attributes: +# - Default: DebugObserver +# - Case sensitivity: yes +# - Required: no +# ArmarX.navigator.DebugObserverTopicName = DebugObserver + + # ArmarX.navigator.EnableProfiling: enable profiler which is used for logging performance events # Attributes: # - Default: false @@ -254,7 +222,7 @@ ArmarX.Verbosity = Verbose # Attributes: # - Case sensitivity: yes # - Required: yes -# ArmarX.navigator.RobotUnitName = ::_NOT_SET_:: +ArmarX.navigator.RobotUnitName = Armar6Unit # ArmarX.navigator.cmp.RemoteGui: Ice object name of the `RemoteGui` component. @@ -321,6 +289,22 @@ ArmarX.Verbosity = Verbose # ArmarX.navigator.mem.nav.graph.Memory = Navigation +# ArmarX.navigator.mem.nav.human.CoreSegment: +# Attributes: +# - Default: Human +# - Case sensitivity: yes +# - Required: no +# ArmarX.navigator.mem.nav.human.CoreSegment = Human + + +# ArmarX.navigator.mem.nav.human.Memory: +# Attributes: +# - Default: Navigation +# - Case sensitivity: yes +# - Required: no +# ArmarX.navigator.mem.nav.human.Memory = Navigation + + # ArmarX.navigator.mem.nav.param.CoreSegment: # Attributes: # - Default: Parameterization @@ -417,6 +401,6 @@ ArmarX.Verbosity = Verbose # - Default: 0.550000012 # - Case sensitivity: yes # - Required: no -# ArmarX.navigator.p.occupancy_grid.occopied_threshold = 0.550000012 +ArmarX.navigator.p.occupancy_grid.occopied_threshold = 0.8 diff --git a/scenarios/NavigationSimulation/NavigationSimulation.scx b/scenarios/NavigationSimulation/NavigationSimulation.scx index 66b83347a8ca47c34f40633555c1207362b0adee..5115bad65f98e68d407c15acffdf9685fbae6366 100644 --- a/scenarios/NavigationSimulation/NavigationSimulation.scx +++ b/scenarios/NavigationSimulation/NavigationSimulation.scx @@ -3,12 +3,7 @@ <application name="DebugObserver" instance="" package="ArmarXCore" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="ConditionHandler" instance="" package="ArmarXCore" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="SystemObserver" instance="" package="ArmarXCore" nodeName="" enabled="true" iceAutoRestart="false"/> - <application name="CommonStorage" instance="" package="MemoryX" nodeName="" enabled="true" iceAutoRestart="false"/> - <application name="PriorKnowledge" instance="" package="MemoryX" nodeName="" enabled="true" iceAutoRestart="false"/> - <application name="LongtermMemory" instance="" package="MemoryX" nodeName="" enabled="true" iceAutoRestart="false"/> - <application name="WorkingMemory" instance="" package="MemoryX" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="RobotStateComponent" instance="" package="RobotAPI" nodeName="" enabled="true" iceAutoRestart="false"/> - <application name="ViewSelectionApp" instance="" package="RobotAPI" nodeName="" enabled="false" iceAutoRestart="false"/> <application name="ObjectLocalizationSaliencyApp" instance="" package="RobotComponents" nodeName="" enabled="false" iceAutoRestart="false"/> <application name="SimulatorApp" instance="" package="ArmarXSimulation" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="SimulatorViewerApp" instance="" package="ArmarXSimulation" nodeName="" enabled="false" iceAutoRestart="false"/> @@ -19,25 +14,19 @@ <application name="DepthImageProviderDynamicSimulationApp" instance="" package="ArmarXSimulation" nodeName="" enabled="false" iceAutoRestart="false"/> <application name="ObjectLocalizationDynamicSimulationApp" instance="TexturedRecognition" package="ArmarXSimulation" nodeName="" enabled="false" iceAutoRestart="false"/> <application name="ObjectLocalizationDynamicSimulationApp" instance="SegmentableRecognition" package="ArmarXSimulation" nodeName="" enabled="false" iceAutoRestart="false"/> - <application name="ObjectMemoryObserver" instance="" package="MemoryX" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="HandUnitDynamicSimulationApp" instance="LeftHand" package="ArmarXSimulation" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="HandUnitDynamicSimulationApp" instance="RightHand" package="ArmarXSimulation" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="ForceTorqueObserver" instance="" package="RobotAPI" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="SelfLocalizationDynamicSimulationApp" instance="" package="ArmarXSimulation" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="RobotHandLocalizationDynamicSimulationApp" instance="" package="ArmarXSimulation" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="HeadIKUnit" instance="" package="RobotAPI" nodeName="" enabled="true" iceAutoRestart="false"/> - <application name="TCPControlUnit" instance="" package="RobotAPI" nodeName="" enabled="false" iceAutoRestart="false"/> <application name="ProfilerObserverApp" instance="" package="ArmarXCore" nodeName="" enabled="false" iceAutoRestart="false"/> - <application name="GraphNodePoseResolverApp" instance="" package="MemoryX" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="ImageSourceSelectionApp" instance="" package="VisionX" nodeName="" enabled="false" iceAutoRestart="false"/> <application name="RobotUnitSimulationApp" instance="" package="ArmarXSimulation" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="LaserScannerUnitObserverApp" instance="" package="RobotAPI" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="ImageProviderDynamicSimulationApp" instance="Roboception" package="ArmarXSimulation" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="ArmarXFileLoggerApp" instance="" package="ArmarXCore" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="ArVizStorage" instance="" package="RobotAPI" nodeName="" enabled="true" iceAutoRestart="false"/> - <application name="RobotToArVizApp" instance="" package="RobotAPI" nodeName="" enabled="false" iceAutoRestart="false"/> - <application name="WorkingMemoryToArVizApp" instance="" package="MemoryX" nodeName="" enabled="false" iceAutoRestart="false"/> - <application name="ObstacleAvoidingPlatformUnit" instance="" package="RobotAPI" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="RemoteGuiProviderApp" instance="" package="ArmarXGui" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="DebugDrawerToArVizApp" instance="" package="RobotAPI" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="ArticulatedObjectLocalizerDynamicSimulation" instance="" package="ArmarXSimulation" nodeName="" enabled="false" iceAutoRestart="false"/> diff --git a/scenarios/NavigationSimulation/config/ArticulatedObjectLocalizerDynamicSimulation.cfg b/scenarios/NavigationSimulation/config/ArticulatedObjectLocalizerDynamicSimulation.cfg index a64fd58d4db84713169600f66cfedaa5816951db..7c4574e07410198c26896a48c4f0621b788fface 100644 --- a/scenarios/NavigationSimulation/config/ArticulatedObjectLocalizerDynamicSimulation.cfg +++ b/scenarios/NavigationSimulation/config/ArticulatedObjectLocalizerDynamicSimulation.cfg @@ -133,14 +133,6 @@ ArmarX.ArticulatedObjectLocalizerDynamicSimulation.mem.obj.articulated.ProviderN # ArmarX.ArticulatedObjectLocalizerDynamicSimulation.objects = Default value not mapped. -# ArmarX.ArticulatedObjectLocalizerDynamicSimulation.tpc.sub.MemoryListener: Name of the `MemoryListener` topic to subscribe to. -# Attributes: -# - Default: MemoryUpdates -# - Case sensitivity: yes -# - Required: no -# ArmarX.ArticulatedObjectLocalizerDynamicSimulation.tpc.sub.MemoryListener = MemoryUpdates - - # 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 diff --git a/scenarios/NavigationSimulation/config/HandUnitDynamicSimulationApp.LeftHand.cfg b/scenarios/NavigationSimulation/config/HandUnitDynamicSimulationApp.LeftHand.cfg index 18e2d2dbc38674afde8395d91f1a6582b0a9116f..aa21b8fdbe782668b5ca7ef9e87bfdc8814f6486 100644 --- a/scenarios/NavigationSimulation/config/HandUnitDynamicSimulationApp.LeftHand.cfg +++ b/scenarios/NavigationSimulation/config/HandUnitDynamicSimulationApp.LeftHand.cfg @@ -139,6 +139,23 @@ ArmarX.HandUnitDynamicSimulation.ObjectName = LeftHandUnit # ArmarX.HandUnitDynamicSimulation.SimulatorProxyName = Simulator +# ArmarX.HandUnitDynamicSimulation.UseLegacyWorkingMemory: Require the legacy MemoryX working memory to be available before starting. +# Attributes: +# - Default: false +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.HandUnitDynamicSimulation.UseLegacyWorkingMemory = false + + +# ArmarX.HandUnitDynamicSimulation.cmp.ObjectPoseStorageName: Name of the object pose storage (only used if necessary). +# Attributes: +# - Default: ObjectMemory +# - Case sensitivity: yes +# - Required: no +# ArmarX.HandUnitDynamicSimulation.cmp.ObjectPoseStorageName = ObjectMemory + + # ArmarX.HandUnitDynamicSimulation.inheritFrom: No Description # Attributes: # - Default: RobotConfig diff --git a/scenarios/NavigationSimulation/config/HandUnitDynamicSimulationApp.RightHand.cfg b/scenarios/NavigationSimulation/config/HandUnitDynamicSimulationApp.RightHand.cfg index 85cc434517acbe8d8f2fe87dcf357b4d4f86823d..b92bb000af69d2b6a8f9297ea73b2fc622b42f94 100644 --- a/scenarios/NavigationSimulation/config/HandUnitDynamicSimulationApp.RightHand.cfg +++ b/scenarios/NavigationSimulation/config/HandUnitDynamicSimulationApp.RightHand.cfg @@ -139,6 +139,23 @@ ArmarX.HandUnitDynamicSimulation.ObjectName = RightHandUnit # ArmarX.HandUnitDynamicSimulation.SimulatorProxyName = Simulator +# ArmarX.HandUnitDynamicSimulation.UseLegacyWorkingMemory: Require the legacy MemoryX working memory to be available before starting. +# Attributes: +# - Default: false +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.HandUnitDynamicSimulation.UseLegacyWorkingMemory = false + + +# ArmarX.HandUnitDynamicSimulation.cmp.ObjectPoseStorageName: Name of the object pose storage (only used if necessary). +# Attributes: +# - Default: ObjectMemory +# - Case sensitivity: yes +# - Required: no +# ArmarX.HandUnitDynamicSimulation.cmp.ObjectPoseStorageName = ObjectMemory + + # ArmarX.HandUnitDynamicSimulation.inheritFrom: No Description # Attributes: # - Default: RobotConfig diff --git a/scenarios/NavigationSimulation/config/ObjectMemory.cfg b/scenarios/NavigationSimulation/config/ObjectMemory.cfg index ed32071463c9db71c0339cfa3c837f77fc35a00f..9d742cccf84b33c9693a7a7cc6e95ae7b42e95b6 100644 --- a/scenarios/NavigationSimulation/config/ObjectMemory.cfg +++ b/scenarios/NavigationSimulation/config/ObjectMemory.cfg @@ -259,6 +259,15 @@ ArmarX.ObjectMemory.MinimumLoggingLevel = Debug # ArmarX.ObjectMemory.mem.inst.calibration.offset = 0 +# ArmarX.ObjectMemory.mem.inst.calibration.robotName: Name of robot whose note can be calibrated. +# If not given, the 'fallbackName' is used. +# Attributes: +# - Default: "" +# - Case sensitivity: yes +# - Required: no +# ArmarX.ObjectMemory.mem.inst.calibration.robotName = "" + + # ArmarX.ObjectMemory.mem.inst.calibration.robotNode: Robot node which can be calibrated. # Attributes: # - Default: Neck_2_Pitch @@ -341,6 +350,14 @@ ArmarX.ObjectMemory.MinimumLoggingLevel = Debug # ArmarX.ObjectMemory.mem.inst.head.maxJointVelocity = 0.0500000007 +# ArmarX.ObjectMemory.mem.inst.robots.FallbackName: Robot name to use as fallback if the robot name is not specified in a provided object pose. +# Attributes: +# - Default: "" +# - Case sensitivity: yes +# - Required: no +# ArmarX.ObjectMemory.mem.inst.robots.FallbackName = "" + + # ArmarX.ObjectMemory.mem.inst.scene.10_Package: ArmarX package containing the scene snapshots. # Scene snapshots are expected to be located in Package/data/Package/Scenes/*.json. # Attributes: @@ -513,37 +530,21 @@ ArmarX.ObjectMemory.mem.inst.scene.12_SnapshotToLoad = R003_grasping_challenge_r # ArmarX.ObjectMemory.mem.inst.visu.useArticulatedModels = true -# ArmarX.ObjectMemory.mem.ltm..configuration: +# ArmarX.ObjectMemory.mem.ltm.configuration: # Attributes: -# - Default: "" +# - Default: {} # - Case sensitivity: yes # - Required: no -# ArmarX.ObjectMemory.mem.ltm..configuration = "" +# ArmarX.ObjectMemory.mem.ltm.configuration = {} -# ArmarX.ObjectMemory.mem.ltm..enabled: +# ArmarX.ObjectMemory.mem.ltm.enabled: # Attributes: # - Default: false # - Case sensitivity: yes # - Required: no # - Possible values: {0, 1, false, no, true, yes} -# ArmarX.ObjectMemory.mem.ltm..enabled = false - - -# ArmarX.ObjectMemory.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.ObjectMemory.mem.ltm.sizeToCompressDataInMegaBytes = 1024 - - -# ArmarX.ObjectMemory.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.ObjectMemory.mem.ltm.storagepath = Default value not mapped. +# ArmarX.ObjectMemory.mem.ltm.enabled = false # ArmarX.ObjectMemory.mem.robot_state.Memory: @@ -588,14 +589,6 @@ ArmarX.ObjectMemory.mem.inst.scene.12_SnapshotToLoad = R003_grasping_challenge_r # ArmarX.ObjectMemory.prediction.TimeWindow = 2 -# ArmarX.ObjectMemory.robotName: -# Attributes: -# - Default: Armar6 -# - Case sensitivity: yes -# - Required: no -# ArmarX.ObjectMemory.robotName = Armar6 - - # ArmarX.ObjectMemory.tpc.pub.DebugObserver: Name of the `DebugObserver` topic to publish data to. # Attributes: # - Default: DebugObserver diff --git a/scenarios/NavigationSimulation/config/RobotUnitSimulationApp.cfg b/scenarios/NavigationSimulation/config/RobotUnitSimulationApp.cfg index 473237552e7086de34df424e4caa3c4c72cbb4b6..1097495186f074f0b6b42c2bf309eb53eee6e216 100644 --- a/scenarios/NavigationSimulation/config/RobotUnitSimulationApp.cfg +++ b/scenarios/NavigationSimulation/config/RobotUnitSimulationApp.cfg @@ -474,7 +474,7 @@ ArmarX.RobotUnitSimulation.PlatformUnitName = Armar6PlatformUnit # ArmarX.RobotUnitSimulation.RTLogging_DefaultLog = "" -# ArmarX.RobotUnitSimulation.RTLogging_KeepIterationsForMs: All logging data (SensorValues, ControlTargets, Messages) is keept for this duration and can be dunped in case of an error. +# ArmarX.RobotUnitSimulation.RTLogging_KeepIterationsForMs: All logging data (SensorValues, ControlTargets, Messages) is kept for this duration and can be dumped in case of an error. # Attributes: # - Default: 60000 # - Case sensitivity: yes diff --git a/scenarios/NavigationSimulation/config/SelfLocalizationDynamicSimulationApp.cfg b/scenarios/NavigationSimulation/config/SelfLocalizationDynamicSimulationApp.cfg index 1dab8f001a797dbb0ec7d7356a9dea899acdc4bf..aa38863653ee60a6f70f014e8fafbda25451659f 100644 --- a/scenarios/NavigationSimulation/config/SelfLocalizationDynamicSimulationApp.cfg +++ b/scenarios/NavigationSimulation/config/SelfLocalizationDynamicSimulationApp.cfg @@ -175,23 +175,32 @@ ArmarX.SelfLocalizationDynamicSimulation.RobotName = Armar6 # ArmarX.SelfLocalizationDynamicSimulation.cmp.Simulator = Simulator -# ArmarX.SelfLocalizationDynamicSimulation.cmp.WorkingMemory: Ice object name of the `WorkingMemory` component. +# ArmarX.SelfLocalizationDynamicSimulation.cycleTime: # Attributes: -# - Default: WorkingMemory +# - Default: 30 # - Case sensitivity: yes # - Required: no -# ArmarX.SelfLocalizationDynamicSimulation.cmp.WorkingMemory = WorkingMemory +# ArmarX.SelfLocalizationDynamicSimulation.cycleTime = 30 -# ArmarX.SelfLocalizationDynamicSimulation.cycleTime: +# ArmarX.SelfLocalizationDynamicSimulation.localizationUnit.proxyName: If enabled, connects to the localization unit # Attributes: -# - Default: 30 +# - Default: LocalizationUnit # - Case sensitivity: yes # - Required: no -# ArmarX.SelfLocalizationDynamicSimulation.cycleTime = 30 +# ArmarX.SelfLocalizationDynamicSimulation.localizationUnit.proxyName = LocalizationUnit -# ArmarX.SelfLocalizationDynamicSimulation.longterm_memory: Ice object name of the `LongtermMemory` component. +# ArmarX.SelfLocalizationDynamicSimulation.localizationUnit.use: If enabled, connects to the localization unit +# Attributes: +# - Default: true +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.SelfLocalizationDynamicSimulation.localizationUnit.use = true + + +# ArmarX.SelfLocalizationDynamicSimulation.longterm_memory: Which legacy long-term memory to use if longterm_memory.updateor longterm_memory.retrieve_initial_pose are set # Attributes: # - Default: LongtermMemory # - Case sensitivity: yes @@ -214,7 +223,7 @@ ArmarX.SelfLocalizationDynamicSimulation.longterm_memory.retrieve_initial_pose = # - Case sensitivity: yes # - Required: no # - Possible values: {0, 1, false, no, true, yes} -# ArmarX.SelfLocalizationDynamicSimulation.longterm_memory.update = true +ArmarX.SelfLocalizationDynamicSimulation.longterm_memory.update = false # ArmarX.SelfLocalizationDynamicSimulation.longterm_memory.update_frequency: @@ -291,6 +300,14 @@ ArmarX.SelfLocalizationDynamicSimulation.mem.robot_state.Memory = RobotState # ArmarX.SelfLocalizationDynamicSimulation.tpc.pub.GlobalRobotPoseLocalization = GlobalRobotPoseLocalization +# ArmarX.SelfLocalizationDynamicSimulation.tpc.pub.GlobalRobotPoseLocalizationCorrection: Name of the `GlobalRobotPoseLocalizationCorrection` topic to publish data to. +# Attributes: +# - Default: GlobalRobotPoseLocalizationCorrection +# - Case sensitivity: yes +# - Required: no +# ArmarX.SelfLocalizationDynamicSimulation.tpc.pub.GlobalRobotPoseLocalizationCorrection = GlobalRobotPoseLocalizationCorrection + + # ArmarX.SelfLocalizationDynamicSimulation.tpc.pub.LaserScannerSelfLocalisation: Name of the `LaserScannerSelfLocalisation` topic to publish data to. # Attributes: # - Default: LaserScannerSelfLocalisation @@ -307,21 +324,13 @@ ArmarX.SelfLocalizationDynamicSimulation.mem.robot_state.Memory = RobotState # ArmarX.SelfLocalizationDynamicSimulation.tpc.pub.PlatformUnit = PlatformUnit -# ArmarX.SelfLocalizationDynamicSimulation.tpc.sub.MemoryListener: Name of the `MemoryListener` topic to subscribe to. -# Attributes: -# - Default: MemoryUpdates -# - Case sensitivity: yes -# - Required: no -# ArmarX.SelfLocalizationDynamicSimulation.tpc.sub.MemoryListener = MemoryUpdates - - # ArmarX.SelfLocalizationDynamicSimulation.working_memory.update: If enabled, updates the global pose in the working memory # Attributes: # - Default: true # - Case sensitivity: yes # - Required: no # - Possible values: {0, 1, false, no, true, yes} -# ArmarX.SelfLocalizationDynamicSimulation.working_memory.update = true +ArmarX.SelfLocalizationDynamicSimulation.working_memory.update = false # ArmarX.SelfLocalizationDynamicSimulation.working_memory.update_frequency: diff --git a/scenarios/NavigationSimulation/config/SimulatorViewerApp.cfg b/scenarios/NavigationSimulation/config/SimulatorViewerApp.cfg index d514a4850f0959586c7066878a54283e396ec78b..74604be7e54380aa72a72d5d01f6902ffd5d85d7 100644 --- a/scenarios/NavigationSimulation/config/SimulatorViewerApp.cfg +++ b/scenarios/NavigationSimulation/config/SimulatorViewerApp.cfg @@ -117,73 +117,14 @@ # ArmarX.SecondsStartupDelay = 0 -# ArmarX.SimulatorViewer_EntityDrawer.CommonStorageName: Name of the the CommonStorage memory component +# ArmarX.SimulatorViewer_EntityDrawer.MinimumLoggingLevel: No Description # Attributes: -# - Default: CommonStorage -# - Case sensitivity: yes +# - Default: Verbose +# - Case sensitivity: no # - Required: no -# ArmarX.SimulatorViewer_EntityDrawer.CommonStorageName = CommonStorage - - -# ArmarX.SimulatorViewer_EntityDrawer.DebugDrawerSelectionTopic: Name of the DebugDrawerSelectionTopic -# Attributes: -# - Default: DebugDrawerSelections -# - Case sensitivity: yes -# - Required: no -# ArmarX.SimulatorViewer_EntityDrawer.DebugDrawerSelectionTopic = DebugDrawerSelections - - -# ArmarX.SimulatorViewer_EntityDrawer.DebugDrawerTopic: Name of the DebugDrawerTopic -# Attributes: -# - Default: DebugDrawerUpdates -# - Case sensitivity: yes -# - Required: no -# ArmarX.SimulatorViewer_EntityDrawer.DebugDrawerTopic = DebugDrawerUpdates - - -# ArmarX.SimulatorViewer_EntityDrawer.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.SimulatorViewer_EntityDrawer.EnableProfiling = false - - -# ArmarX.SimulatorViewer_EntityDrawer.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.SimulatorViewer_EntityDrawer.MinimumLoggingLevel = Verbose -# ArmarX.SimulatorViewer_EntityDrawer.ObjectName: Name of IceGrid well-known object -# Attributes: -# - Default: "" -# - Case sensitivity: yes -# - Required: no -# ArmarX.SimulatorViewer_EntityDrawer.ObjectName = "" - - -# ArmarX.SimulatorViewer_EntityDrawer.PriorKnowledgeName: Name of the the PriorKnowledge memory component -# Attributes: -# - Default: PriorKnowledge -# - Case sensitivity: yes -# - Required: no -# ArmarX.SimulatorViewer_EntityDrawer.PriorKnowledgeName = PriorKnowledge - - -# ArmarX.SimulatorViewer_EntityDrawer.ShowDebugDrawing: The simulator implements the DebugDrawerInterface. The debug visualizations (e.g. coordinate systems) can enabled/disbaled with this flag. -# Attributes: -# - Default: true -# - Case sensitivity: yes -# - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.SimulatorViewer_EntityDrawer.ShowDebugDrawing = true - - # ArmarX.SimulatorViewer_PhysicsWorldVisualization.EnableProfiling: enable profiler which is used for logging performance events # Attributes: # - Default: false @@ -383,6 +324,15 @@ ArmarX.SimulatorViewer_SimulationWindow.Camera.z = 6000 # ArmarX.UpdateRate = 30 +# ArmarX.UseDebugDrawer: Whether to create the debug drawer component for the viewer. +# Attributes: +# - Default: false +# - Case sensitivity: yes +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.UseDebugDrawer = false + + # ArmarX.UseTimeServer: Enable using a global Timeserver (e.g. from ArmarXSimulator) # Attributes: # - Default: false diff --git a/scenarios/NavigationSimulation/config/VisionMemory.cfg b/scenarios/NavigationSimulation/config/VisionMemory.cfg index 4c7327ed4e27e8a8b6da33be9f4fa920158d9f6d..1b95447f4edb52efc404a7bd9c2c00ee89ddf608 100644 --- a/scenarios/NavigationSimulation/config/VisionMemory.cfg +++ b/scenarios/NavigationSimulation/config/VisionMemory.cfg @@ -210,37 +210,21 @@ # ArmarX.VisionMemory.mem.MemoryName = Vision -# ArmarX.VisionMemory.mem.ltm..configuration: +# ArmarX.VisionMemory.mem.ltm.configuration: # Attributes: -# - Default: "" +# - Default: {} # - Case sensitivity: yes # - Required: no -# ArmarX.VisionMemory.mem.ltm..configuration = "" +# ArmarX.VisionMemory.mem.ltm.configuration = {} -# ArmarX.VisionMemory.mem.ltm..enabled: +# ArmarX.VisionMemory.mem.ltm.enabled: # Attributes: # - Default: false # - Case sensitivity: yes # - Required: no # - Possible values: {0, 1, false, no, true, yes} -# ArmarX.VisionMemory.mem.ltm..enabled = false - - -# ArmarX.VisionMemory.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.VisionMemory.mem.ltm.sizeToCompressDataInMegaBytes = 1024 - - -# ArmarX.VisionMemory.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.VisionMemory.mem.ltm.storagepath = Default value not mapped. +# ArmarX.VisionMemory.mem.ltm.enabled = false # ArmarX.VisionMemory.mns.MemoryNameSystemEnabled: Whether to use (and depend on) the Memory Name System (MNS). diff --git a/scenarios/PlatformNavigation/PlatformNavigation.scx b/scenarios/PlatformNavigation/PlatformNavigation.scx index cc0fcea78f6ed640190fa44dd5e5ff33d17e4d16..a290831fe89e739223449751650fa2784a105144 100644 --- a/scenarios/PlatformNavigation/PlatformNavigation.scx +++ b/scenarios/PlatformNavigation/PlatformNavigation.scx @@ -6,7 +6,7 @@ <application name="MemoryNameSystem" instance="" package="RobotAPI" nodeName="" enabled="false" iceAutoRestart="false"/> <application name="navigator" instance="" package="armarx_navigation" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="navigation_memory" instance="" package="armarx_navigation" nodeName="" enabled="true" iceAutoRestart="false"/> - <application name="example_client" instance="" package="armarx_navigation" nodeName="" enabled="false" iceAutoRestart="false"/> + <application name="example_client" instance="" package="armarx_navigation" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="VisionMemory" instance="" package="VisionX" nodeName="" enabled="false" iceAutoRestart="false"/> <application name="control_memory" instance="" package="armarx_control" nodeName="" enabled="true" iceAutoRestart="false"/> <application name="distance_to_obstacle_costmap_provider" instance="" package="armarx_navigation" nodeName="" enabled="true" iceAutoRestart="false"/> diff --git a/scenarios/PlatformNavigation/config/ObjectMemory.cfg b/scenarios/PlatformNavigation/config/ObjectMemory.cfg index 2af60bdea6ceb9f628cbec9f8717aae06c630819..be7ed81802e0055c94627a2d148b113c51af7e73 100644 --- a/scenarios/PlatformNavigation/config/ObjectMemory.cfg +++ b/scenarios/PlatformNavigation/config/ObjectMemory.cfg @@ -513,37 +513,21 @@ # ArmarX.ObjectMemory.mem.inst.visu.useArticulatedModels = true -# ArmarX.ObjectMemory.mem.ltm..configuration: +# ArmarX.ObjectMemory.mem.ltm.configuration: # Attributes: -# - Default: "" +# - Default: {} # - Case sensitivity: yes # - Required: no -# ArmarX.ObjectMemory.mem.ltm..configuration = "" +# ArmarX.ObjectMemory.mem.ltm.configuration = {} -# ArmarX.ObjectMemory.mem.ltm..enabled: +# ArmarX.ObjectMemory.mem.ltm.enabled: # Attributes: # - Default: false # - Case sensitivity: yes # - Required: no # - Possible values: {0, 1, false, no, true, yes} -# ArmarX.ObjectMemory.mem.ltm..enabled = false - - -# ArmarX.ObjectMemory.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.ObjectMemory.mem.ltm.sizeToCompressDataInMegaBytes = 1024 - - -# ArmarX.ObjectMemory.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.ObjectMemory.mem.ltm.storagepath = Default value not mapped. +# ArmarX.ObjectMemory.mem.ltm.enabled = false # ArmarX.ObjectMemory.mem.robot_state.Memory: diff --git a/scenarios/PlatformNavigation/config/VisionMemory.cfg b/scenarios/PlatformNavigation/config/VisionMemory.cfg index 4c7327ed4e27e8a8b6da33be9f4fa920158d9f6d..1b95447f4edb52efc404a7bd9c2c00ee89ddf608 100644 --- a/scenarios/PlatformNavigation/config/VisionMemory.cfg +++ b/scenarios/PlatformNavigation/config/VisionMemory.cfg @@ -210,37 +210,21 @@ # ArmarX.VisionMemory.mem.MemoryName = Vision -# ArmarX.VisionMemory.mem.ltm..configuration: +# ArmarX.VisionMemory.mem.ltm.configuration: # Attributes: -# - Default: "" +# - Default: {} # - Case sensitivity: yes # - Required: no -# ArmarX.VisionMemory.mem.ltm..configuration = "" +# ArmarX.VisionMemory.mem.ltm.configuration = {} -# ArmarX.VisionMemory.mem.ltm..enabled: +# ArmarX.VisionMemory.mem.ltm.enabled: # Attributes: # - Default: false # - Case sensitivity: yes # - Required: no # - Possible values: {0, 1, false, no, true, yes} -# ArmarX.VisionMemory.mem.ltm..enabled = false - - -# ArmarX.VisionMemory.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.VisionMemory.mem.ltm.sizeToCompressDataInMegaBytes = 1024 - - -# ArmarX.VisionMemory.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.VisionMemory.mem.ltm.storagepath = Default value not mapped. +# ArmarX.VisionMemory.mem.ltm.enabled = false # ArmarX.VisionMemory.mns.MemoryNameSystemEnabled: Whether to use (and depend on) the Memory Name System (MNS). diff --git a/scenarios/PlatformNavigation/config/example_client.cfg b/scenarios/PlatformNavigation/config/example_client.cfg index eef853017b53a47640988642eec0e92c8660c615..f459b030d93e7be0f064894110909b6c538d98fd 100644 --- a/scenarios/PlatformNavigation/config/example_client.cfg +++ b/scenarios/PlatformNavigation/config/example_client.cfg @@ -76,171 +76,185 @@ # ArmarX.EnableProfiling = false -# ArmarX.ExampleClient.EnableProfiling: enable profiler which is used for logging performance events +# 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: false +# - Default: "" # - Case sensitivity: yes # - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.ExampleClient.EnableProfiling = false +# ArmarX.LoadLibraries = "" -# ArmarX.ExampleClient.MinimumLoggingLevel: Local logging level only for this component +# 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: Undefined +# - Default: "" # - Case sensitivity: yes # - Required: no -# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} -# ArmarX.ExampleClient.MinimumLoggingLevel = Undefined +# ArmarX.LoggingGroup = "" -# ArmarX.ExampleClient.ObjectName: Name of IceGrid well-known object +# ArmarX.RedirectStdout: Redirect std::cout and std::cerr to ArmarXLog # Attributes: -# - Default: "" +# - Default: true # - Case sensitivity: yes # - Required: no -# ArmarX.ExampleClient.ObjectName = "" +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.RedirectStdout = true -# ArmarX.ExampleClient.mem.robot_state.Memory: +# 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: RobotState +# - Default: 3000 # - Case sensitivity: yes # - Required: no -# ArmarX.ExampleClient.mem.robot_state.Memory = RobotState +# ArmarX.RemoteHandlesDeletionTimeout = 3000 -# ArmarX.ExampleClient.mem.robot_state.localizationSegment: Name of the localization memory core segment to use. +# ArmarX.SecondsStartupDelay: The startup will be delayed by this number of seconds (useful for debugging) # Attributes: -# - Default: Localization +# - Default: 0 # - Case sensitivity: yes # - Required: no -# ArmarX.ExampleClient.mem.robot_state.localizationSegment = Localization +# ArmarX.SecondsStartupDelay = 0 -# ArmarX.ExampleClient.mns.MemoryNameSystemEnabled: Whether to use (and depend on) the Memory Name System (MNS). -# Set to false to use this memory as a stand-alone. +# ArmarX.StartDebuggerOnCrash: If this application crashes (segmentation fault) qtcreator will attach to this process and start the debugger. # Attributes: -# - Default: true +# - Default: false # - Case sensitivity: yes # - Required: no # - Possible values: {0, 1, false, no, true, yes} -# ArmarX.ExampleClient.mns.MemoryNameSystemEnabled = true +# ArmarX.StartDebuggerOnCrash = false -# ArmarX.ExampleClient.mns.MemoryNameSystemName: Name of the Memory Name System (MNS) component. +# ArmarX.ThreadPoolSize: Size of the ArmarX ThreadPool that is always running. # Attributes: -# - Default: MemoryNameSystem +# - Default: 1 # - Case sensitivity: yes # - Required: no -# ArmarX.ExampleClient.mns.MemoryNameSystemName = MemoryNameSystem +# ArmarX.ThreadPoolSize = 1 -# ArmarX.ExampleClient.nav.NavigatorName: Name of the Navigator +# 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: navigator +# - Default: "" # - Case sensitivity: yes # - Required: no -ArmarX.ExampleClient.nav.NavigatorName = navigator +# ArmarX.TopicSuffix = "" -# ArmarX.ExampleClient.relativeMovement: The distance between two target poses [mm] +# ArmarX.UseTimeServer: Enable using a global Timeserver (e.g. from ArmarXSimulator) # Attributes: -# - Default: 200 +# - Default: false # - Case sensitivity: yes # - Required: no -# ArmarX.ExampleClient.relativeMovement = 200 +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.UseTimeServer = false -# ArmarX.ExampleClient.robotName: +# ArmarX.Verbosity: Global logging level for whole application # Attributes: -# - Default: Armar6 +# - Default: Info # - Case sensitivity: yes # - Required: no -# ArmarX.ExampleClient.robotName = Armar6 +# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} +# ArmarX.Verbosity = Info -# 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;... +# ArmarX.example_client.EnableProfiling: enable profiler which is used for logging performance events # Attributes: -# - Default: "" +# - Default: false # - Case sensitivity: yes # - Required: no -# ArmarX.LoadLibraries = "" +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.example_client.EnableProfiling = false -# ArmarX.LoggingGroup: The logging group is transmitted with every ArmarX log message over Ice in order to group the message in the GUI. +# ArmarX.example_client.MinimumLoggingLevel: Local logging level only for this component # Attributes: -# - Default: "" +# - Default: Undefined # - Case sensitivity: yes # - Required: no -# ArmarX.LoggingGroup = "" +# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} +# ArmarX.example_client.MinimumLoggingLevel = Undefined -# ArmarX.RedirectStdout: Redirect std::cout and std::cerr to ArmarXLog +# ArmarX.example_client.ObjectName: Name of IceGrid well-known object # Attributes: -# - Default: true +# - Default: "" # - Case sensitivity: yes # - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.RedirectStdout = true +# ArmarX.example_client.ObjectName = "" -# 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) +# ArmarX.example_client.mem.robot_state.Memory: # Attributes: -# - Default: 3000 +# - Default: RobotState # - Case sensitivity: yes # - Required: no -# ArmarX.RemoteHandlesDeletionTimeout = 3000 +# ArmarX.example_client.mem.robot_state.Memory = RobotState -# ArmarX.SecondsStartupDelay: The startup will be delayed by this number of seconds (useful for debugging) +# ArmarX.example_client.mem.robot_state.localizationSegment: Name of the localization memory core segment to use. # Attributes: -# - Default: 0 +# - Default: Localization # - Case sensitivity: yes # - Required: no -# ArmarX.SecondsStartupDelay = 0 +# ArmarX.example_client.mem.robot_state.localizationSegment = Localization -# ArmarX.StartDebuggerOnCrash: If this application crashes (segmentation fault) qtcreator will attach to this process and start the debugger. +# ArmarX.example_client.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: false +# - Default: true # - Case sensitivity: yes # - Required: no # - Possible values: {0, 1, false, no, true, yes} -# ArmarX.StartDebuggerOnCrash = false +# ArmarX.example_client.mns.MemoryNameSystemEnabled = true -# ArmarX.ThreadPoolSize: Size of the ArmarX ThreadPool that is always running. +# ArmarX.example_client.mns.MemoryNameSystemName: Name of the Memory Name System (MNS) component. # Attributes: -# - Default: 1 +# - Default: MemoryNameSystem # - Case sensitivity: yes # - Required: no -# ArmarX.ThreadPoolSize = 1 +# ArmarX.example_client.mns.MemoryNameSystemName = MemoryNameSystem -# 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. +# ArmarX.example_client.mode: Which example to run # Attributes: -# - Default: "" +# - Default: standard # - Case sensitivity: yes # - Required: no -# ArmarX.TopicSuffix = "" +# - Possible values: {complex, point_to_point, standard, update_navigator} +ArmarX.example_client.mode = standard -# ArmarX.UseTimeServer: Enable using a global Timeserver (e.g. from ArmarXSimulator) +# ArmarX.example_client.nav.NavigatorName: Name of the Navigator # Attributes: -# - Default: false +# - Default: navigator # - Case sensitivity: yes # - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.UseTimeServer = false +# ArmarX.example_client.nav.NavigatorName = navigator -# ArmarX.Verbosity: Global logging level for whole application +# ArmarX.example_client.relativeMovement: The distance between two target poses [mm] # Attributes: -# - Default: Info +# - Default: 200 # - Case sensitivity: yes # - Required: no -# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} -# ArmarX.Verbosity = Info +# ArmarX.example_client.relativeMovement = 200 + + +# ArmarX.example_client.robotName: +# Attributes: +# - Default: Armar6 +# - Case sensitivity: yes +# - Required: no +# ArmarX.example_client.robotName = Armar6 + + +# ArmarX.ExampleClient.nav.NavigatorName: +# Attributes: +ArmarX.ExampleClient.nav.NavigatorName = navigator diff --git a/scenarios/PlatformNavigation/config/navigation_memory.cfg b/scenarios/PlatformNavigation/config/navigation_memory.cfg index f808f7771be10fe6b63eee35db55e0ab5db5f3cf..74b205e76278fbbd36c35a4456875391562bbf45 100644 --- a/scenarios/PlatformNavigation/config/navigation_memory.cfg +++ b/scenarios/PlatformNavigation/config/navigation_memory.cfg @@ -92,199 +92,204 @@ # ArmarX.LoggingGroup = "" -# ArmarX.NavigationMemory.ArVizStorageName: Name of the ArViz storage +# ArmarX.RedirectStdout: Redirect std::cout and std::cerr to ArmarXLog # Attributes: -# - Default: ArVizStorage +# - Default: true # - Case sensitivity: yes # - Required: no -# ArmarX.NavigationMemory.ArVizStorageName = ArVizStorage +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.RedirectStdout = true -# ArmarX.NavigationMemory.ArVizTopicName: Name of the ArViz topic +# 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: ArVizTopic +# - 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.NavigationMemory.ArVizTopicName = ArVizTopic +# ArmarX.SecondsStartupDelay = 0 -# ArmarX.NavigationMemory.EnableProfiling: enable profiler which is used for logging performance events +# 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.NavigationMemory.EnableProfiling = false +# ArmarX.StartDebuggerOnCrash = false -# ArmarX.NavigationMemory.MinimumLoggingLevel: Local logging level only for this component +# ArmarX.ThreadPoolSize: Size of the ArmarX ThreadPool that is always running. # Attributes: -# - Default: Undefined +# - Default: 1 # - Case sensitivity: yes # - Required: no -# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} -# ArmarX.NavigationMemory.MinimumLoggingLevel = Undefined +# ArmarX.ThreadPoolSize = 1 -# ArmarX.NavigationMemory.ObjectName: Name of IceGrid well-known object +# 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.NavigationMemory.ObjectName = "" +# ArmarX.TopicSuffix = "" -# ArmarX.NavigationMemory.RemoteGuiName: Name of the remote gui provider +# ArmarX.UseTimeServer: Enable using a global Timeserver (e.g. from ArmarXSimulator) # Attributes: -# - Default: RemoteGuiProvider +# - Default: false # - Case sensitivity: yes # - Required: no -# ArmarX.NavigationMemory.RemoteGuiName = RemoteGuiProvider +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.UseTimeServer = false -# ArmarX.NavigationMemory.mem.MemoryName: Name of this memory server. +# ArmarX.Verbosity: Global logging level for whole application # Attributes: -# - Default: Navigation +# - Default: Info # - Case sensitivity: yes # - Required: no -# ArmarX.NavigationMemory.mem.MemoryName = Navigation +# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} +# ArmarX.Verbosity = Info -# ArmarX.NavigationMemory.mem.ltm.configuration: +# ArmarX.navigation_memory.ArVizStorageName: Name of the ArViz storage # Attributes: -# - Default: {} +# - Default: ArVizStorage # - Case sensitivity: yes # - Required: no -# ArmarX.NavigationMemory.mem.ltm.configuration = {} +# ArmarX.navigation_memory.ArVizStorageName = ArVizStorage -# ArmarX.NavigationMemory.mem.ltm.enabled: +# ArmarX.navigation_memory.ArVizTopicName: Name of the ArViz topic # Attributes: -# - Default: false +# - Default: ArVizTopic # - Case sensitivity: yes # - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.NavigationMemory.mem.ltm.enabled = false +# ArmarX.navigation_memory.ArVizTopicName = ArVizTopic -# 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. +# ArmarX.navigation_memory.EnableProfiling: enable profiler which is used for logging performance events # Attributes: -# - Default: true +# - Default: false # - Case sensitivity: yes # - Required: no # - Possible values: {0, 1, false, no, true, yes} -# ArmarX.NavigationMemory.mns.MemoryNameSystemEnabled = true +# ArmarX.navigation_memory.EnableProfiling = false -# ArmarX.NavigationMemory.mns.MemoryNameSystemName: Name of the Memory Name System (MNS) component. +# ArmarX.navigation_memory.MinimumLoggingLevel: Local logging level only for this component # Attributes: -# - Default: MemoryNameSystem +# - Default: Undefined # - Case sensitivity: yes # - Required: no -# ArmarX.NavigationMemory.mns.MemoryNameSystemName = MemoryNameSystem +# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} +# ArmarX.navigation_memory.MinimumLoggingLevel = Undefined -# ArmarX.NavigationMemory.p.locationGraph.visuFrequency: Visualization frequeny of locations and graph edges [Hz]. +# ArmarX.navigation_memory.ObjectName: Name of IceGrid well-known object # Attributes: -# - Default: 2 +# - Default: "" # - Case sensitivity: yes # - Required: no -# ArmarX.NavigationMemory.p.locationGraph.visuFrequency = 2 +# ArmarX.navigation_memory.ObjectName = "" -# ArmarX.NavigationMemory.p.locationGraph.visuGraphEdges: Enable visualization of navigation graph edges. +# ArmarX.navigation_memory.RemoteGuiName: Name of the remote gui provider # Attributes: -# - Default: true +# - Default: RemoteGuiProvider # - Case sensitivity: yes # - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.NavigationMemory.p.locationGraph.visuGraphEdges = true +# ArmarX.navigation_memory.RemoteGuiName = RemoteGuiProvider -# ArmarX.NavigationMemory.p.locationGraph.visuLocation: Enable visualization of locations. +# ArmarX.navigation_memory.mem.MemoryName: Name of this memory server. # Attributes: -# - Default: true +# - Default: Navigation # - Case sensitivity: yes # - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.NavigationMemory.p.locationGraph.visuLocation = true +# ArmarX.navigation_memory.mem.MemoryName = Navigation -# ArmarX.NavigationMemory.p.snapshotToLoad: Memory snapshot to load at start up -# (e.g. 'PriorKnowledgeData/navigation-graphs/snapshot'). +# ArmarX.navigation_memory.mem.ltm.configuration: # Attributes: -# - Default: "" +# - Default: {} # - Case sensitivity: yes # - Required: no -ArmarX.NavigationMemory.p.snapshotToLoad = ./PriorKnowledgeData/navigation-graphs/audimax-science-week-opening +# ArmarX.navigation_memory.mem.ltm.configuration = {} -# ArmarX.RedirectStdout: Redirect std::cout and std::cerr to ArmarXLog +# ArmarX.navigation_memory.mem.ltm.enabled: # Attributes: -# - Default: true +# - Default: false # - Case sensitivity: yes # - Required: no # - Possible values: {0, 1, false, no, true, yes} -# ArmarX.RedirectStdout = true +# ArmarX.navigation_memory.mem.ltm.enabled = false -# 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) +# ArmarX.navigation_memory.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: 3000 +# - Default: true # - Case sensitivity: yes # - Required: no -# ArmarX.RemoteHandlesDeletionTimeout = 3000 +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.navigation_memory.mns.MemoryNameSystemEnabled = true -# ArmarX.SecondsStartupDelay: The startup will be delayed by this number of seconds (useful for debugging) +# ArmarX.navigation_memory.mns.MemoryNameSystemName: Name of the Memory Name System (MNS) component. # Attributes: -# - Default: 0 +# - Default: MemoryNameSystem # - Case sensitivity: yes # - Required: no -# ArmarX.SecondsStartupDelay = 0 +# ArmarX.navigation_memory.mns.MemoryNameSystemName = MemoryNameSystem -# ArmarX.StartDebuggerOnCrash: If this application crashes (segmentation fault) qtcreator will attach to this process and start the debugger. +# ArmarX.navigation_memory.p.locationGraph.visuFrequency: Visualization frequeny of locations and graph edges [Hz]. # Attributes: -# - Default: false +# - Default: 2 # - Case sensitivity: yes # - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.StartDebuggerOnCrash = false +# ArmarX.navigation_memory.p.locationGraph.visuFrequency = 2 -# ArmarX.ThreadPoolSize: Size of the ArmarX ThreadPool that is always running. +# ArmarX.navigation_memory.p.locationGraph.visuGraphEdges: Enable visualization of navigation graph edges. # Attributes: -# - Default: 1 +# - Default: true # - Case sensitivity: yes # - Required: no -# ArmarX.ThreadPoolSize = 1 +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.navigation_memory.p.locationGraph.visuGraphEdges = true -# 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. +# ArmarX.navigation_memory.p.locationGraph.visuLocation: Enable visualization of locations. # Attributes: -# - Default: "" +# - Default: true # - Case sensitivity: yes # - Required: no -# ArmarX.TopicSuffix = "" +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.navigation_memory.p.locationGraph.visuLocation = true -# ArmarX.UseTimeServer: Enable using a global Timeserver (e.g. from ArmarXSimulator) +# ArmarX.navigation_memory.p.snapshotToLoad: Memory snapshot to load at start up +# (e.g. 'PriorKnowledgeData/navigation-graphs/snapshot'). # Attributes: -# - Default: false +# - Default: "" # - Case sensitivity: yes # - Required: no -# - Possible values: {0, 1, false, no, true, yes} -# ArmarX.UseTimeServer = false +# ArmarX.navigation_memory.p.snapshotToLoad = "" -# ArmarX.Verbosity: Global logging level for whole application +# ArmarX.NavigationMemory.p.snapshotToLoad: # Attributes: -# - Default: Info -# - Case sensitivity: yes -# - Required: no -# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} -# ArmarX.Verbosity = Info +ArmarX.NavigationMemory.p.snapshotToLoad = ./PriorKnowledgeData/navigation-graphs/audimax-science-week-opening diff --git a/scenarios/PlatformNavigation/config/navigator.cfg b/scenarios/PlatformNavigation/config/navigator.cfg index 482582bb51b23e738d0d227e32c6ce074dd54a65..5bf206ad3cfe3c6b69da36e64f6653d1cea9c9af 100644 --- a/scenarios/PlatformNavigation/config/navigator.cfg +++ b/scenarios/PlatformNavigation/config/navigator.cfg @@ -176,6 +176,14 @@ ArmarX.Verbosity = Verbose # ArmarX.navigator.ArVizTopicName = ArVizTopic +# ArmarX.navigator.DebugObserverTopicName: Name of the topic the DebugObserver listens on +# Attributes: +# - Default: DebugObserver +# - Case sensitivity: yes +# - Required: no +# ArmarX.navigator.DebugObserverTopicName = DebugObserver + + # ArmarX.navigator.EnableProfiling: enable profiler which is used for logging performance events # Attributes: # - Default: false @@ -289,6 +297,22 @@ ArmarX.navigator.cmp.PlatformUnit = Armar6PlatformUnit # ArmarX.navigator.mem.nav.graph.Memory = Navigation +# ArmarX.navigator.mem.nav.human.CoreSegment: +# Attributes: +# - Default: Human +# - Case sensitivity: yes +# - Required: no +# ArmarX.navigator.mem.nav.human.CoreSegment = Human + + +# ArmarX.navigator.mem.nav.human.Memory: +# Attributes: +# - Default: Navigation +# - Case sensitivity: yes +# - Required: no +# ArmarX.navigator.mem.nav.human.Memory = Navigation + + # ArmarX.navigator.mem.nav.param.CoreSegment: # Attributes: # - Default: Parameterization @@ -388,3 +412,13 @@ ArmarX.navigator.cmp.PlatformUnit = Armar6PlatformUnit ArmarX.navigator.p.occupancy_grid.occopied_threshold = 0.8 +# ArmarX.Navigator.ObjectName: +# Attributes: +ArmarX.Navigator.ObjectName = navigator + + +# ArmarX.Navigator.RobotUnitName: +# Attributes: +ArmarX.Navigator.RobotUnitName = Armar6Unit + + diff --git a/source/armarx/navigation/client/ComponentPlugin.cpp b/source/armarx/navigation/client/ComponentPlugin.cpp index b047700cea8530733351fb45c55931b4d0ae9bfc..2ecd8fce8a8826cb4d7afca09fddc7d3b66cf898 100644 --- a/source/armarx/navigation/client/ComponentPlugin.cpp +++ b/source/armarx/navigation/client/ComponentPlugin.cpp @@ -17,93 +17,99 @@ // ComponentPlugin -armarx::navigation::client::ComponentPlugin::~ComponentPlugin() = default; - -void -armarx::navigation::client::ComponentPlugin::postCreatePropertyDefinitions( - armarx::PropertyDefinitionsPtr& properties) +namespace armarx::navigation::client { - if (not properties->hasDefinition(PROPERTY_NAME)) - { - properties->defineOptionalProperty<std::string>( - PROPERTY_NAME, "navigator", "Name of the Navigator"); - } -} -void -armarx::navigation::client::ComponentPlugin::preOnInitComponent() -{ - ARMARX_TRACE; - parent<armarx::Component>().usingProxyFromProperty(PROPERTY_NAME); -} + ComponentPlugin::~ComponentPlugin() = default; -void -armarx::navigation::client::ComponentPlugin::preOnConnectComponent() -{ - ARMARX_TRACE; - parent<armarx::Component>().getProxyFromProperty(navigatorPrx, PROPERTY_NAME); + void + ComponentPlugin::postCreatePropertyDefinitions(armarx::PropertyDefinitionsPtr& properties) + { + if (not properties->hasDefinition(PROPERTY_NAME)) + { + properties->defineOptionalProperty<std::string>( + PROPERTY_NAME, "navigator", "Name of the Navigator"); + } + } - ARMARX_TRACE; - const std::string componentName = parent().getName(); + void + ComponentPlugin::preOnInitComponent() + { + ARMARX_TRACE; + parent<armarx::Component>().usingProxyFromProperty(PROPERTY_NAME); + } - ARMARX_CHECK_NOT_NULL(navigatorPrx) << "Navigator proxy is null!"; - iceNavigator.setNavigatorComponent(navigatorPrx); -} + void + ComponentPlugin::preOnConnectComponent() + { + ARMARX_TRACE; + parent<armarx::Component>().getProxyFromProperty(navigatorPrx, PROPERTY_NAME); -void -armarx::navigation::client::ComponentPlugin::configureNavigator( - const client::NavigationStackConfig& stackConfig, - const std::string& configId) -{ - ARMARX_TRACE; + ARMARX_TRACE; + const std::string componentName = parent().getName(); - // ARMARX_CHECK_NULL(eventHandler) << "`configureNavigator()` can only be called once!"; + ARMARX_CHECK_NOT_NULL(navigatorPrx) << "Navigator proxy is null!"; + iceNavigator.setNavigatorComponent(navigatorPrx); + } - eventHandler = [&]() -> std::unique_ptr<SimpleEventHandler> + void + ComponentPlugin::configureNavigator(const client::NavigationStackConfig& stackConfig, + const std::string& configId) { - if (parentDerives<armarx::armem::client::plugins::ListeningPluginUser>()) - { - ARMARX_INFO << "Using memory event callbacks."; - // must(!!) use a reference here: otherwise the mns events won't work - auto& memoryNameSystem = - parent<armarx::armem::client::plugins::ListeningPluginUser>().memoryNameSystem(); - return std::make_unique<MemorySubscriber>(configId, memoryNameSystem); - } + ARMARX_TRACE; - ARMARX_INFO << "Cannot use memory event callbacks as this component is not derived from " - "`armarx::armem::client::plugins::ListeningPluginUser`"; + // ARMARX_CHECK_NULL(eventHandler) << "`configureNavigator()` can only be called once!"; - return std::make_unique<SimpleEventHandler>(); - }(); - - iceNavigator.createConfig(stackConfig, configId); + eventHandler = [&]() -> std::unique_ptr<SimpleEventHandler> + { + ARMARX_TRACE; + if (parentDerives<armarx::armem::client::plugins::ListeningPluginUser>()) + { + ARMARX_TRACE; + ARMARX_INFO << "Using memory event callbacks."; + // must(!!) use a reference here: otherwise the mns events won't work + auto& memoryNameSystem = + parent<armarx::armem::client::plugins::ListeningPluginUser>() + .memoryNameSystem(); + return std::make_unique<MemorySubscriber>(configId, memoryNameSystem); + } + + ARMARX_INFO + << "Cannot use memory event callbacks as this component is not derived from " + "`armarx::armem::client::plugins::ListeningPluginUser`"; + + return std::make_unique<SimpleEventHandler>(); + }(); + + iceNavigator.createConfig(stackConfig, configId); + + navigator = std::make_unique<Navigator>(Navigator::InjectedServices{ + .navigator = &iceNavigator, .subscriber = eventHandler.get()}); + } - navigator = std::make_unique<Navigator>( - Navigator::InjectedServices{.navigator = &iceNavigator, .subscriber = eventHandler.get()}); -} + // ComponentPluginUser -// ComponentPluginUser + ComponentPluginUser::ComponentPluginUser() + { + ARMARX_TRACE; + addPlugin(plugin); + } -armarx::navigation::client::ComponentPluginUser::ComponentPluginUser() -{ - ARMARX_TRACE; - addPlugin(plugin); -} + void + ComponentPluginUser::configureNavigator(const client::NavigationStackConfig& stackConfig) + { + ARMARX_TRACE; + plugin->configureNavigator(stackConfig, getName()); + } -void -armarx::navigation::client::ComponentPluginUser::configureNavigator( - const client::NavigationStackConfig& stackConfig) -{ - ARMARX_TRACE; - plugin->configureNavigator(stackConfig, getName()); -} + Navigator& + ComponentPluginUser::getNavigator() + { + ARMARX_CHECK_NOT_NULL(plugin->navigator) + << "You need to call `configureNavigator()` before you can access the navigator!"; + return *plugin->navigator; + } -armarx::navigation::client::Navigator& -armarx::navigation::client::ComponentPluginUser::getNavigator() -{ - ARMARX_CHECK_NOT_NULL(plugin->navigator) - << "You need to call `configureNavigator()` before you can access the navigator!"; - return *plugin->navigator; -} + ComponentPluginUser::~ComponentPluginUser() = default; -armarx::navigation::client::ComponentPluginUser::~ComponentPluginUser() = default; +} // namespace armarx::navigation::client diff --git a/source/armarx/navigation/client/Navigator.cpp b/source/armarx/navigation/client/Navigator.cpp index 15fb4bc172b76ffea7cd1460864894786f3cb20b..e2f47c4d55c90c0bce9a8ff36a63d30f5f38c1bc 100644 --- a/source/armarx/navigation/client/Navigator.cpp +++ b/source/armarx/navigation/client/Navigator.cpp @@ -60,6 +60,13 @@ namespace armarx::navigation::client srv.navigator->moveTo(path, frame); } + + void Navigator::update(const std::vector<core::Pose>& waypoints, core::NavigationFrame frame) + { + ARMARX_TRACE;; + ARMARX_CHECK_NOT_NULL(srv.navigator) << "Navigator service must not be null!"; + srv.navigator->update(waypoints, frame); + } void diff --git a/source/armarx/navigation/client/Navigator.h b/source/armarx/navigation/client/Navigator.h index d116a1de824c1a9903bb695055dc7559307c22c4..32af0bb9873b42a5023f68e450d47351901f9d37 100644 --- a/source/armarx/navigation/client/Navigator.h +++ b/source/armarx/navigation/client/Navigator.h @@ -132,6 +132,8 @@ namespace armarx::navigation::client void moveTowards(const core::Direction& direction, core::NavigationFrame frame); + void update(const std::vector<core::Pose>& waypoints, core::NavigationFrame frame); + void pause(); void resume(); diff --git a/source/armarx/navigation/client/ice/NavigatorInterface.ice b/source/armarx/navigation/client/ice/NavigatorInterface.ice index 678379d08e9189ed7270f988333e2f7f2bd1ab71..806aa2d98c8e1e89b43b44f17a38e0f68e303729 100644 --- a/source/armarx/navigation/client/ice/NavigatorInterface.ice +++ b/source/armarx/navigation/client/ice/NavigatorInterface.ice @@ -67,6 +67,8 @@ module armarx void moveTo2(detail::Waypoints waypoints, string navigationFrame, string callerId); + void updateMoveTo(Eigen::Matrix4fSeq waypoints, string navigationFrame, string callerId); + void moveTowards(Eigen::Vector3f direction, string navigationFrame, string callerId); diff --git a/source/armarx/navigation/client/services/IceNavigator.cpp b/source/armarx/navigation/client/services/IceNavigator.cpp index 965a59ee0e0b09932d03198e702bd31b241b423d..cc1c51b4f32ed426786c197021f2605a2f17d56f 100644 --- a/source/armarx/navigation/client/services/IceNavigator.cpp +++ b/source/armarx/navigation/client/services/IceNavigator.cpp @@ -2,6 +2,8 @@ #include <ArmarXCore/util/CPPUtility/trace.h> +#include "armarx/navigation/core/types.h" + namespace armarx::navigation::client { @@ -79,6 +81,16 @@ namespace armarx::navigation::client direction, core::NavigationFrameNames.to_name(navigationFrame), configId); } + void + IceNavigator::update(const std::vector<core::Pose>& waypoints, + core::NavigationFrame navigationFrame) + { + ARMARX_TRACE; + + navigator->updateMoveTo( + convert(waypoints), core::NavigationFrameNames.to_name(navigationFrame), configId); + } + void IceNavigator::pause() { diff --git a/source/armarx/navigation/client/services/IceNavigator.h b/source/armarx/navigation/client/services/IceNavigator.h index 607500029bcbc29797cf56be15ce3280f060da37..142bebb4f5ad65bf4556332c96c9712cd10a48a4 100644 --- a/source/armarx/navigation/client/services/IceNavigator.h +++ b/source/armarx/navigation/client/services/IceNavigator.h @@ -3,6 +3,8 @@ #include <string> +#include "armarx/navigation/core/basic_types.h" +#include "armarx/navigation/core/types.h" #include <armarx/navigation/client/NavigationStackConfig.h> #include <armarx/navigation/client/ice/NavigatorInterface.h> #include <armarx/navigation/client/ice_conversions.h> @@ -35,6 +37,9 @@ namespace armarx::navigation::client void moveTowards(const core::Direction& direction, core::NavigationFrame navigationFrame) override; + void update(const std::vector<core::Pose>& waypoints, + core::NavigationFrame navigationFrame) override; + void pause() override; void resume() override; diff --git a/source/armarx/navigation/components/navigator/CMakeLists.txt b/source/armarx/navigation/components/navigator/CMakeLists.txt index a8d6245e5c3f54b8f200f2fce7fb44312f26b2ca..a686acda88e040fba889f7d0c0ee4bbafa28eaa4 100644 --- a/source/armarx/navigation/components/navigator/CMakeLists.txt +++ b/source/armarx/navigation/components/navigator/CMakeLists.txt @@ -8,7 +8,8 @@ armarx_add_component(navigator DEPENDENCIES # ArmarXCore ArmarXCore - # ArmarXCoreComponentPlugins # For DebugObserver plugin. ArmarXGui + ArmarXCoreComponentPlugins # For DebugObserver plugin. + # ArmarXGui ArmarXGuiComponentPlugins # For RemoteGui plugin. # RobotAPI RobotAPICore @@ -18,15 +19,13 @@ armarx_add_component(navigator armem_robot armem_robot_state armem_vision - # This project ${PROJECT_NAME}Interfaces # For ice interfaces from this - # package. This component + # navigation armarx_navigation::server armarx_navigation::client armarx_navigation::util armarx_navigation::factories + # Simox Simox::SimoxUtility + # others Eigen3::Eigen - ICE_DEPENDENCIES - ArmarXCoreInterfaces - RobotAPIInterfaces ) diff --git a/source/armarx/navigation/components/navigator/Component.cpp b/source/armarx/navigation/components/navigator/Component.cpp index 4cf2854911ac53fbcf20c1cae6854f9419072c6a..402c90e44c9fbd1f8f91a5166f94d05721931673 100644 --- a/source/armarx/navigation/components/navigator/Component.cpp +++ b/source/armarx/navigation/components/navigator/Component.cpp @@ -29,6 +29,7 @@ #include <cstdint> #include <iterator> #include <memory> +#include <optional> #include <utility> #include <Eigen/Geometry> @@ -281,6 +282,7 @@ namespace armarx::navigation::components::navigator .publisher = memoryPublishers.at(callerId).get(), .introspector = &(introspector.value()), + .debugObserverHelper = &getDebugObserverComponentPlugin(), .sceneProvider = &sceneProvider.value()})); } @@ -313,6 +315,37 @@ namespace armarx::navigation::components::navigator } } + void + Component::updateMoveTo(const std::vector<Eigen::Matrix4f>& waypoints, + const std::string& navigationMode, + const std::string& callerId, + const Ice::Current& /*c*/) + { + ARMARX_TRACE; + + ARMARX_INFO << "updateMoveTo() requested by caller '" << callerId << "'"; + ARMARX_CHECK(navigators.count(callerId) > 0) + << "Navigator config for caller `" << callerId << "` not registered!"; + + const auto checkIsActiveNavigator = [&](const std::string& callerId) + { + const std::optional<std::string> activeNavigatorCallerId = activeNavigatorId(); + if (not activeNavigatorCallerId.has_value()) + { + ARMARX_VERBOSE << "No navigator is active."; + return false; + } + + return activeNavigatorCallerId == callerId; + }; + + ARMARX_CHECK(checkIsActiveNavigator(callerId)) + << "The navigator with id `" << callerId << "` is not active!"; + + navigators.at(callerId).update(convert(waypoints), + core::NavigationFrameNames.from_name(navigationMode)); + } + void Component::moveTo2(const client::detail::Waypoints& waypoints, @@ -458,27 +491,80 @@ namespace armarx::navigation::components::navigator return def; } + void + visualize(const algorithms::Costmap& costmap, viz::Client& arviz, const std::string& name) + { + const auto cmap = simox::color::cmaps::viridis(); + const float vmax = costmap.getGrid().array().maxCoeff(); + + const auto asColor = [&cmap, &vmax](const float distance) -> viz::data::Color + { + const auto color = cmap.at(distance, 0.F, vmax); + return {color.a, color.r, color.g, color.b}; + }; + + auto layer = arviz.layer("costmap_" + name); + + const std::int64_t cols = costmap.getGrid().cols(); + const std::int64_t rows = costmap.getGrid().rows(); + + auto mesh = viz::Mesh(""); + + std::vector<std::vector<Eigen::Vector3f>> vertices; + std::vector<std::vector<viz::data::Color>> colors; + + for (int r = 0; r < rows; r++) + { + auto& verticesRow = vertices.emplace_back(cols); + auto& colorsRow = colors.emplace_back(cols); + + for (int c = 0; c < cols; c++) + { + verticesRow.at(c) = conv::to3D(costmap.toPositionGlobal({r, c})); + colorsRow.at(c) = asColor(costmap.getGrid()(r, c)); + } + } + + mesh.grid2D(vertices, colors); + + layer.add(mesh); + + arviz.commit(layer); + } server::Navigator* Component::activeNavigator() + { + + const auto navigatorId = activeNavigatorId(); + if(not navigatorId.has_value()) + { + return nullptr; + } + + return &navigators.at(navigatorId.value()); + } + + std::optional<std::string> + Component::activeNavigatorId() const { ARMARX_TRACE; // We define the active navigator to be the one whose movement is enabled. - const auto isActive = [](auto& nameNavPair) -> bool + const auto isActive = [](const auto& nameNavPair) -> bool { - server::Navigator& navigator = nameNavPair.second; + const auto& [name, navigator] = nameNavPair; return not navigator.isPaused(); }; - auto it = std::find_if(navigators.begin(), navigators.end(), isActive); + const auto it = std::find_if(navigators.begin(), navigators.end(), isActive); // no navigator active? if (it == navigators.end()) { - return nullptr; + return std::nullopt; } - return &it->second; + return it->first; } } // namespace armarx::navigation::components::navigator diff --git a/source/armarx/navigation/components/navigator/Component.h b/source/armarx/navigation/components/navigator/Component.h index 316e4da539d2c35021bcc9e1f325f0af72a1de22..5e552d7f9fd6ee7d42a964d3598da1e9ec73499d 100644 --- a/source/armarx/navigation/components/navigator/Component.h +++ b/source/armarx/navigation/components/navigator/Component.h @@ -33,6 +33,7 @@ #include <Ice/Object.h> +#include "ArmarXCore/libraries/ArmarXCoreComponentPlugins/DebugObserverComponentPlugin.h" #include <ArmarXCore/core/Component.h> #include <ArmarXCore/core/services/tasks/PeriodicTask.h> #include <ArmarXCore/util/CPPUtility/TripleBuffer.h> @@ -85,7 +86,8 @@ namespace armarx::navigation::components::navigator virtual public client::NavigatorInterface, virtual public ObjectPoseClientPluginUser, virtual public ArVizComponentPluginUser, - virtual public armarx::control::client::ComponentPluginUser + virtual public armarx::control::client::ComponentPluginUser, + virtual public armarx::DebugObserverComponentPluginUser // virtual public armem::ListeningClientPluginUser { @@ -112,6 +114,11 @@ namespace armarx::navigation::components::navigator const std::string& callerId, const Ice::Current& c = Ice::emptyCurrent) override; + void updateMoveTo(const std::vector<Eigen::Matrix4f>& waypoints, + const std::string& navigationMode, + const std::string& callerId, + const Ice::Current& c = Ice::emptyCurrent) override; + void moveTowards(const Eigen::Vector3f& direction, const std::string& navigationMode, const std::string& callerId, @@ -159,6 +166,7 @@ namespace armarx::navigation::components::navigator // void updateRobot(); server::Navigator* activeNavigator(); + std::optional<std::string> activeNavigatorId() const; private: void visualizeSPFA(); diff --git a/source/armarx/navigation/core/NavigatorInterface.h b/source/armarx/navigation/core/NavigatorInterface.h index 05df688d1f161e4f0c39a2929cd65e6ebe73e1e9..18e503355f630d772fe36c0dd3ecdcb3f7810c4a 100644 --- a/source/armarx/navigation/core/NavigatorInterface.h +++ b/source/armarx/navigation/core/NavigatorInterface.h @@ -6,6 +6,10 @@ namespace armarx::navigation::core { + /** + * @brief Navigator interface for PointGoal navigation (with waypoints) and relative movement + * + */ class NavigatorInterface { @@ -19,6 +23,8 @@ namespace armarx::navigation::core virtual void moveTo(const std::vector<client::WaypointTarget>& targets, core::NavigationFrame navigationFrame) = 0; + virtual void update(const std::vector<core::Pose>& waypoints, + core::NavigationFrame navigationFrame) = 0; virtual void pause() = 0; diff --git a/source/armarx/navigation/global_planning/AStar.cpp b/source/armarx/navigation/global_planning/AStar.cpp index 67db7790fd16db7198808c8989acc8e28ad5431d..6765a9088091820bb2b407c59fb84da69c9f2a96 100644 --- a/source/armarx/navigation/global_planning/AStar.cpp +++ b/source/armarx/navigation/global_planning/AStar.cpp @@ -283,15 +283,16 @@ namespace armarx::navigation::global_planning if (not result) { - ARMARX_ERROR << "Optimizer failure"; + ARMARX_WARNING << "Optimizer failure"; return std::nullopt; } - // TODO circular path smoothing should be done now + ARMARX_TRACE; - algorithm::CircularPathSmoothing smoothing; - auto smoothTrajectory = smoothing.smooth(result.trajectory.value()); - smoothTrajectory.setMaxVelocity(params.linearVelocity); + // TODO circular path smoothing should be done now + // algorithm::CircularPathSmoothing smoothing; + // auto smoothTrajectory = smoothing.smooth(result.trajectory.value()); + // smoothTrajectory.setMaxVelocity(params.linearVelocity); ARMARX_TRACE; return GlobalPlannerResult{.trajectory = result.trajectory.value()}; diff --git a/source/armarx/navigation/memory/client/human/Reader.cpp b/source/armarx/navigation/memory/client/human/Reader.cpp index e3bee9f25cf9c39cb69cbe02ee0577e62131ceae..de91ae994276187ee5ee394e9d9baaa96aea98ce 100644 --- a/source/armarx/navigation/memory/client/human/Reader.cpp +++ b/source/armarx/navigation/memory/client/human/Reader.cpp @@ -152,8 +152,7 @@ namespace armarx::navigation::memory::client::human if (not coreSegment.hasProviderSegment(query.providerName)) { - ARMARX_VERBOSE << "Provider segment `" << query.providerName - << "` does not exist (yet)."; + ARMARX_DEBUG << "Provider segment `" << query.providerName << "` does not exist (yet)."; return {.groups = {}, .status = HumanGroupResult::Status::NoData}; } @@ -162,7 +161,7 @@ namespace armarx::navigation::memory::client::human if (providerSegment.empty()) { - ARMARX_VERBOSE << "No entities."; + ARMARX_DEBUG << "No entities."; return {.groups = {}, .status = HumanGroupResult::Status::NoData, .errorMessage = "No entities"}; diff --git a/source/armarx/navigation/server/Navigator.cpp b/source/armarx/navigation/server/Navigator.cpp index af1215088ed472a98b23c7120e2f697772fd1f2b..6c4c51b90884528f63a4239ae9fc162ba0d10b70 100644 --- a/source/armarx/navigation/server/Navigator.cpp +++ b/source/armarx/navigation/server/Navigator.cpp @@ -5,9 +5,6 @@ #include <optional> #include <thread> -#include <range/v3/view.hpp> -#include <range/v3/view/reverse.hpp> - #include <boost/graph/dijkstra_shortest_paths.hpp> #include <boost/graph/named_function_params.hpp> #include <boost/graph/properties.hpp> @@ -42,6 +39,8 @@ #include <armarx/navigation/server/StackResult.h> #include <armarx/navigation/server/monitoring/GoalReachedMonitor.h> #include <armarx/navigation/server/scene_provider/SceneProviderInterface.h> +#include <range/v3/view.hpp> +#include <range/v3/view/reverse.hpp> namespace armarx::navigation::server @@ -164,6 +163,33 @@ namespace armarx::navigation::server moveToAbsolute(globalWaypoints); } + void + Navigator::update(const std::vector<core::Pose>& waypoints, + core::NavigationFrame navigationFrame) + { + ARMARX_INFO << "Received update() request."; + + std::vector<core::Pose> globalWaypoints; + switch (navigationFrame) + { + case core::NavigationFrame::Absolute: + globalWaypoints = waypoints; + break; + case core::NavigationFrame::Relative: + globalWaypoints.reserve(waypoints.size()); + std::transform( + std::begin(waypoints), + std::end(waypoints), + std::back_inserter(globalWaypoints), + [&](const core::Pose& p) + { return core::Pose(srv.sceneProvider->scene().robot->getGlobalPose()) * p; }); + break; + } + + ARMARX_TRACE; + updateAbsolute(globalWaypoints); + } + using GraphPath = std::vector<semrel::ShapeID>; @@ -626,6 +652,8 @@ namespace armarx::navigation::server ARMARX_TRACE; ARMARX_INFO << "Planning local trajectory enabled"; + + // FIXME instead of PeriodicTask, use RunningTask. runningTask = new PeriodicTask<Navigator>(this, &Navigator::run, config.general.tasks.replanningUpdatePeriod, @@ -644,13 +672,14 @@ namespace armarx::navigation::server Navigator::moveToAbsolute(const std::vector<core::Pose>& waypoints) { ARMARX_TRACE; + // if this navigator is in use, stop the movement ... pause(); // ... and all threads stopAllThreads(); // FIXME remove - std::this_thread::sleep_for(std::chrono::seconds(1)); + //std::this_thread::sleep_for(std::chrono::seconds(1)); ARMARX_TRACE; ARMARX_CHECK_NOT_EMPTY(waypoints); @@ -710,6 +739,48 @@ namespace armarx::navigation::server ARMARX_INFO << "Movement started."; } + + void + Navigator::updateAbsolute(const std::vector<core::Pose>& waypoints) + { + ARMARX_TRACE; + ARMARX_CHECK_NOT_EMPTY(waypoints); + + + // global planner + ARMARX_INFO << "Planning global trajectory"; + ARMARX_CHECK_NOT_NULL(config.stack.globalPlanner); + // TODO plan on multiple waypoints, ignoring waypoints for now + // idea: compute multiple global trajectories, one for each segment between waypoints. + + srv.introspector->onGoal(waypoints.back()); + globalPlan = config.stack.globalPlanner->plan(waypoints.back()); + + ARMARX_TRACE; + + if (not globalPlan.has_value()) + { + ARMARX_WARNING << "No global trajectory. Cannot move."; + srv.publisher->globalPlanningFailed( + core::GlobalPlanningFailedEvent{{.timestamp = armarx::Clock::Now()}, {""}}); + + srv.introspector->failure(); + return; + } + + ARMARX_TRACE; + srv.publisher->globalTrajectoryUpdated(globalPlan.value()); + srv.introspector->onGlobalPlannerResult(globalPlan.value()); + // srv.executor->execute(globalPlan->trajectory); + + ARMARX_INFO << "Global planning completed. Will now start all required threads"; + ARMARX_TRACE; + + startStack(); + + ARMARX_INFO << "Movement started."; + } + void Navigator::moveTowards(const core::Direction& direction, core::NavigationFrame navigationFrame) { @@ -733,8 +804,67 @@ namespace armarx::navigation::server const Duration duration = armarx::core::time::StopWatch::measure([&]() { updateScene(); }); - ARMARX_VERBOSE << deactivateSpam(0.2) << "Scene update: " << duration.toMilliSecondsDouble() - << "ms."; + ARMARX_DEBUG << deactivateSpam(0.2) + << "Scene update: " << duration.toMilliSecondsDouble() << "ms."; + + srv.debugObserverHelper->setDebugObserverDatafield("scene update [ms]", duration.toMilliSecondsDouble()); + } + + // global planner update if goal has changed + { + std::lock_guard g{globalPlanningRequestMtx}; + + if (globalPlanningRequest.has_value()) + { + const auto& waypoints = globalPlanningRequest.value(); + + // recreate goal monitor + { + // first we check if we are already at the goal position + goalReachedMonitor = std::nullopt; + goalReachedMonitor = GoalReachedMonitor( + waypoints.back(), srv.sceneProvider->scene(), GoalReachedMonitorConfig()); + + if (goalReachedMonitor->goalReached()) + { + ARMARX_INFO << "Already at goal position. Robot won't move."; + + srv.publisher->goalReached(core::GoalReachedEvent{ + {armarx::Clock::Now()}, + core::Pose(srv.sceneProvider->scene().robot->getGlobalPose())}); + + return; + } + } + + // global planning + { + // global planner + ARMARX_INFO << "Update/Planning global trajectory"; + ARMARX_CHECK_NOT_NULL(config.stack.globalPlanner); + // TODO plan on multiple waypoints, ignoring waypoints for now + // idea: compute multiple global trajectories, one for each segment between waypoints. + + srv.introspector->onGoal(waypoints.back()); + globalPlan = config.stack.globalPlanner->plan(waypoints.back()); + + ARMARX_TRACE; + + if (not globalPlan.has_value()) + { + ARMARX_WARNING << "No global trajectory. Cannot move."; + srv.publisher->globalPlanningFailed(core::GlobalPlanningFailedEvent{ + {.timestamp = armarx::Clock::Now()}, {""}}); + + srv.introspector->failure(); + return; + } + + ARMARX_TRACE; + srv.publisher->globalTrajectoryUpdated(globalPlan.value()); + srv.introspector->onGlobalPlannerResult(globalPlan.value()); + } + } } // local planner update @@ -751,8 +881,10 @@ namespace armarx::navigation::server updateIntrospector(localPlannerResult); } }); - ARMARX_VERBOSE << deactivateSpam(0.2) + ARMARX_DEBUG << deactivateSpam(0.2) << "Local planner update: " << duration.toMilliSecondsDouble() << "ms."; + + srv.debugObserverHelper->setDebugObserverDatafield("local planner update [ms]", duration.toMilliSecondsDouble()); } // monitor update @@ -762,8 +894,10 @@ namespace armarx::navigation::server const Duration duration = armarx::core::time::StopWatch::measure([&]() { updateMonitor(); }); - ARMARX_VERBOSE << deactivateSpam(0.2) + ARMARX_DEBUG << deactivateSpam(0.2) << "Monitor update: " << duration.toMilliSecondsDouble() << "ms."; + + srv.debugObserverHelper->setDebugObserverDatafield("monitor update [ms]", duration.toMilliSecondsDouble()); } } @@ -796,7 +930,7 @@ namespace armarx::navigation::server void Navigator::updateExecutor(const std::optional<local_planning::LocalPlannerResult>& localPlan) { - if(srv.executor == nullptr) + if (srv.executor == nullptr) { return; } @@ -835,7 +969,8 @@ namespace armarx::navigation::server } void - Navigator::updateIntrospector(const std::optional<local_planning::LocalPlannerResult>& localPlan) + Navigator::updateIntrospector( + const std::optional<local_planning::LocalPlannerResult>& localPlan) { ARMARX_CHECK_NOT_NULL(srv.introspector); @@ -930,7 +1065,7 @@ namespace armarx::navigation::server executorEnabled.store(false); - if(srv.executor != nullptr) + if (srv.executor != nullptr) { srv.executor->stop(); } @@ -943,7 +1078,7 @@ namespace armarx::navigation::server executorEnabled.store(true); - if(srv.executor != nullptr) + if (srv.executor != nullptr) { srv.executor->start(); } diff --git a/source/armarx/navigation/server/Navigator.h b/source/armarx/navigation/server/Navigator.h index 5c236f3aa65e7f32e7e00470ac805bd4523e7759..f4c0fb10396d6b19036b4af4cedc96602d0f29f0 100644 --- a/source/armarx/navigation/server/Navigator.h +++ b/source/armarx/navigation/server/Navigator.h @@ -30,6 +30,7 @@ #include <Eigen/Core> // ArmarX +#include "ArmarXCore/libraries/DebugObserverHelper/DebugObserverHelper.h" #include <ArmarXCore/core/exceptions/local/ExpressionException.h> #include <ArmarXCore/core/logging/Logging.h> #include <ArmarXCore/core/services/tasks/PeriodicTask.h> @@ -81,6 +82,8 @@ namespace armarx::navigation::server EventPublishingInterface* publisher; IntrospectorInterface* introspector = nullptr; + armarx::DebugObserverHelper* debugObserverHelper; + scene_provider::SceneProviderInterface* sceneProvider; }; @@ -89,6 +92,9 @@ namespace armarx::navigation::server void moveTo(const std::vector<core::Pose>& waypoints, core::NavigationFrame navigationFrame) override; + void update(const std::vector<core::Pose>& waypoints, + core::NavigationFrame navigationFrame) override; + void moveTo(const std::vector<client::WaypointTarget>& targets, core::NavigationFrame navigationFrame) override; @@ -116,6 +122,8 @@ namespace armarx::navigation::server void moveToAbsolute(const std::vector<core::Pose>& waypoints); void moveTowardsAbsolute(const core::Direction& direction); + void updateAbsolute(const std::vector<core::Pose>& waypoints); + void run(); void updateScene(); @@ -155,6 +163,11 @@ namespace armarx::navigation::server std::optional<global_planning::GlobalPlannerResult> globalPlan; std::optional<local_planning::LocalPlannerResult> localPlan; + + using Waypoints = std::vector<core::Pose>; + + std::mutex globalPlanningRequestMtx; + std::optional<Waypoints> globalPlanningRequest; }; } // namespace armarx::navigation::server