38#include <Ice/Current.h>
46#include <RobotComponents/interface/components/ObstacleDetection/HumanObstacleDetectionInterface.h>
49#include <RobotAPI/interface/components/ObstacleAvoidance/DynamicObstacleManagerInterface.h>
56 virtual public armarx::HumanObstacleDetectionInterface
66 Eigen::Vector3f mean_position;
67 armarx::Keypoint3DMap keypoints;
71 struct HumanApproximation
74 std::map<std::string, std::pair<IceUtil::Time, Eigen::Vector2f>> transformed_keypoints;
88 void setEnabled(
bool enable,
const Ice::Current& = Ice::emptyCurrent)
override;
89 void enable(
const Ice::Current& = Ice::emptyCurrent)
override;
90 void disable(
const Ice::Current& = Ice::emptyCurrent)
override;
93 const Ice::Current& = Ice::emptyCurrent)
override;
109 OpenPoseResult find_closest_human(
const std::vector<armarx::Keypoint3DMap>& kpml,
110 const IceUtil::Time& time);
112 HumanApproximation approximate_human(
const OpenPoseResult&
human);
119 int m_onlyUseFirstNResults;
121 unsigned int m_warn_distance;
123 float m_human_confidence_filter_value;
124 float m_min_velocity_treshold;
125 IceUtil::Time m_keypoint_after;
127 unsigned int m_pose_buffer_fillctr = 0;
128 unsigned int m_pose_buffer_index = 0;
133 HumanApproximation last_human_approximation;
136 DynamicObstacleManagerInterface::ProxyType m_obstacle_manager;
138 std::mutex m_human_mutex;
139 std::mutex m_enabled_mutex;
Baseclass for all ArmarX ManagedIceObjects requiring properties.
void onInitComponent() override
Pure virtual hook for the subclass.
static const std::string default_name
HumanObstacleDetection() noexcept
void onDisconnectComponent() override
Hook for subclass.
void onConnectComponent() override
Pure virtual hook for the subclass.
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void enable(const Ice::Current &=Ice::emptyCurrent) override
void setEnabled(bool enable, const Ice::Current &=Ice::emptyCurrent) override
void onExitComponent() override
Hook for subclass.
void disable(const Ice::Current &=Ice::emptyCurrent) override
std::string getDefaultName() const override
Retrieve default name of component.
void checkHumanVisibility()
void report3DKeypoints(const armarx::HumanPose3DMap &kpml, long timestamp, const Ice::Current &=Ice::emptyCurrent) override
IceUtil::Handle< PeriodicTask< T > > pointer_type
Shared pointer type for convenience.
Same as the TripleBuffer, but partial writes of the data structure are ok. The write operation may be...
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
double distance(const Point &a, const Point &b)