Repository Summary
Checkout URI | https://github.com/ros4hri/hri_face_body_matcher.git |
VCS Type | git |
VCS Version | humble-devel |
Last Updated | 2024-11-19 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
hri_face_body_matcher | 2.1.0 |
README
hri_face_body_matcher
Overview
hri_face_body_matcher
is a ROS4HRI-compatible face
to body matcher node.
It finds the most likely matches between the recognized faces and bodies based on their relative position in the source image.
Algorithm
For each of the possible associations of recognized face and body, a matching cost is computed, linearly decreasing with the distance between the body nose and the face center in the image.
The rate the confidence drops is proportional to the
~confidence_scaling_factor
parameter and the face size, intended as its
diagonal length.
confidence = max(0, 1 - \frac{distance * c.s.f.}{2 * face\ size})
ROS API
Parameters
All parameters are loaded in the lifecycle configuration
transition.
-
~confidence_threshold
(double ∈ [0,1], default: 0.5): Candidate matches with confidence lower that this threshold are not published. -
~confidence_scaling_factor
(double > 0, default: 2.0): Factor scaling how quickly the estimated confidence drops as the distance between the matched face and body increases.
Topics
This package follows the ROS4HRI conventions (REP-155). If the topic message type is not indicated, the ROS4HRI convention is implied.
Subscribed
/humans/bodies/tracked
/humans/bodies/<body_id>/skeleton2d
/humans/faces/tracked
/humans/faces/<face_id>/roi
Published
/humans/candidate_matches
Execution
ros2 launch hri_face_body_matcher hri_face_body_matcher.launch.py
Example
For an example of usage, execute in different terminals:
- USB camera:
apt install ros-humble-usb-cam
ros2 run usb_cam usb_cam_node_exe
- HRI face detect:
- Either
- if you are on a PAL robot
apt install ros-humble-hri-face-detect
- otherwise build and install from source.
- if you are on a PAL robot
ros2 launch hri_face_detect face_detect.launch.py
- Either
- HRI fullbody:
- Either
- if you are on a PAL robot
apt install ros-humble-hri-fullbody
- otherwise build and install from source.
- if you are on a PAL robot
ros2 launch hri_fachri_fullbody hri_fullbody.launch.py
- Either
- HRI face body matcher:
apt install ros-humble-hri-face-body-matcher
ros2 launch hri_face_body_matcher hri_face_body_matcher.launch.py
- RViz with HRI plugin:
apt install ros-humble-rviz2
- Either
- if you are on a PAL robot
apt install ros-humble-hri-rviz
- otherwise build and install from source.
- if you are on a PAL robot
rviz2
In RViz, add the ‘Humans’ plugin to see the detected faces. The face IDs should be permanently assigned to the same people.
CONTRIBUTING
Contributing Guidelines
Thank you for your interest in contributing to this project Whether it’s a bug report, new feature, correction, or additional documentation, we greatly value feedback and contributions from our community.
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary information to effectively respond to your bug report or contribution.
Reporting Bugs/Feature Requests
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
When filing an issue, please check existing open issues, or recently closed, issues to make sure somebody else hasn’t already reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
- A reproducible test case or series of steps
- The version of our code being used
- Any modifications you’ve made relevant to the bug
- Anything unusual about your environment or deployment
Contributing via Pull Requests
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
- You are working against the latest source on the master branch.
- You check existing open, and recently merged, pull requests to make sure someone else hasn’t addressed the problem already.
- You open an issue to discuss any significant work - we would hate for your time to be wasted.
To send us a pull request, please:
- Fork the repository.
- Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
- Ensure local tests pass. (
colcon test
) - Commit to your fork using clear commit messages.
- Send a pull request, answering any default questions in the pull request interface.
- Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
GitHub provides additional documentation on forking a repository and creating a pull request.
Licensing
Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.