29#include <shared_mutex>
35#include <Eigen/Geometry>
38#include <Ice/Current.h>
42#include <ArmarXCore/interface/observers/ObserverInterface.h>
49#include <RobotAPI/interface/components/ObstacleAvoidance/DynamicObstacleManagerInterface.h>
50#include <RobotAPI/interface/components/ObstacleAvoidance/ObstacleDetectionInterface.h>
60 virtual public DynamicObstacleManagerInterface,
72 const Ice::Current& = Ice::Current())
override;
74 const Eigen::Vector2f&,
75 const Ice::Current& = Ice::Current())
override;
77 const Ice::Current& = Ice::Current())
override;
80 const Eigen::Vector2f&,
84 const Ice::Current& = Ice::Current())
override;
86 const Ice::Current& = Ice::Current())
override;
90 const Eigen::Vector2f& goal,
91 const Ice::Current& = Ice::Current())
override;
101 void update_decayable_obstacles();
105 const armarx::DrawColor& color,
113 const std::string m_obstacle_manager_layer_name =
"DynamicObstacleManagerObstacles";
115 unsigned long m_obstacle_index;
117 std::vector<ManagedObstaclePtr> m_managed_obstacles;
118 std::shared_mutex m_managed_obstacles_mutex;
121 unsigned int m_decay_after_ms;
122 unsigned int m_periodic_task_interval;
123 unsigned int m_decay_factor;
124 unsigned int m_access_bonus;
125 unsigned int m_min_value_for_accepting;
127 float m_min_coverage_of_obstacles;
128 float m_min_coverage_of_line_samples_in_obstacle;
129 unsigned int m_min_size_of_obstacles;
130 unsigned int m_min_length_of_lines;
131 unsigned int m_max_size_of_obstacles;
132 unsigned int m_max_length_of_lines;
133 unsigned int m_thickness_of_lines;
134 unsigned int m_security_margin_for_obstacles;
135 unsigned int m_security_margin_for_lines;
137 bool m_remove_enabled;
138 bool m_only_visualize;
139 bool m_allow_spwan_inside;
141 ObstacleDetectionInterface::ProxyType m_obstacle_detection;
ArVizComponentPluginUser()
Component()
Protected default constructor. Used for virtual inheritance. Use createManagedIceObject() instead.
void remove_all_decayable_obstacles(const Ice::Current &=Ice::Current()) override
void onInitComponent() override
Pure virtual hook for the subclass.
static const std::string default_name
void add_decayable_line_segment(const Eigen::Vector2f &, const Eigen::Vector2f &, const Ice::Current &=Ice::Current()) override
void remove_obstacle(const std::string &name, const Ice::Current &=Ice::Current()) override
void add_decayable_obstacle(const Eigen::Vector2f &, float, float, float, const Ice::Current &=Ice::Current()) override
float distanceToObstacle(const Eigen::Vector2f &agentPosition, float safetyRadius, const Eigen::Vector2f &goal, const Ice::Current &=Ice::Current()) override
void onDisconnectComponent() override
Hook for subclass.
void wait_unitl_obstacles_are_ready(const Ice::Current &=Ice::Current()) override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
DynamicObstacleManager() noexcept
void add_decayable_line_segments(const dynamicobstaclemanager::LineSegments &lines, const Ice::Current &=Ice::Current()) override
void onConnectComponent() override
Pure virtual hook for the subclass.
void directly_update_obstacle(const std::string &name, const Eigen::Vector2f &, float, float, float, const Ice::Current &=Ice::Current()) override
void onExitComponent() override
Hook for subclass.
std::string getDefaultName() const override
Retrieve default name of component.
IceUtil::Handle< PeriodicTask< T > > pointer_type
Shared pointer type for convenience.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
std::shared_ptr< ManagedObstacle > ManagedObstaclePtr