32 #include "hri_msgs/SoftBiometrics.h" 38 const std::string& reference_frame)
54 ns_ =
"/humans/faces/" +
id_;
75 roi_ = cv::Rect(roi->x_offset, roi->y_offset, roi->width, roi->height);
107 for (
auto landmark : msg->landmarks)
125 return boost::optional<float>();
133 return boost::optional<Gender>();
135 return boost::optional<Gender>();
152 <<
". Are the frames published?");
153 return boost::optional<geometry_msgs::TransformStamped>();
169 <<
". Are the frames published?");
170 return boost::optional<geometry_msgs::TransformStamped>();
hri_msgs::SoftBiometricsConstPtr softbiometrics_
boost::optional< Gender > gender() const
boost::optional< geometry_msgs::TransformStamped > transform() const
Returns the (stamped) 3D transform of the face (if available).
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
cv::Mat aligned() const
Returns the face image, if necessary scaled, centered and 0-padded to match the /humans/faces/width a...
ros::Subscriber cropped_subscriber_
void onAligned(sensor_msgs::ImageConstPtr roi)
std::string gazeFrame() const
the name of the tf frame that correspond to the gaze direction and orientation of the face ...
void onSoftBiometrics(hri_msgs::SoftBiometricsConstPtr biometrics)
ros::Subscriber landmarks_subscriber_
virtual geometry_msgs::TransformStamped lookupTransform(const std::string &target_frame, const std::string &source_frame, const ros::Time &time, const ros::Duration timeout) const
boost::optional< geometry_msgs::TransformStamped > gazeTransform() const
Returns the (stamped) 3D transform of the gaze (if available).
CvImagePtr toCvCopy(const sensor_msgs::ImageConstPtr &source, const std::string &encoding=std::string())
void onRoI(sensor_msgs::RegionOfInterestConstPtr roi)
void onCropped(sensor_msgs::ImageConstPtr roi)
ros::Subscriber aligned_subscriber_
tf2_ros::Buffer * _tf_buffer_ptr
#define ROS_WARN_STREAM(args)
#define ROS_DEBUG_STREAM(args)
ros::Subscriber roi_subscriber_
std::string _reference_frame
cv::Mat cropped() const
Returns the face image, if necessary scaled, centered and 0-padded to match the /humans/faces/width a...
boost::optional< float > age() const
cv::Rect roi() const
Returns the 2D region of interest (RoI) of the face.
std::array< hri_msgs::NormalizedPointOfInterest2D, 70 > facial_landmarks_
ros::Subscriber softbiometrics_subscriber_
static const ros::Duration FACE_TF_TIMEOUT(0.01)
void onLandmarks(hri_msgs::FacialLandmarksConstPtr landmarks)
std::string frame() const
the name of the tf frame that correspond to this face