../_images/tiagopro-icon.png ../_images/kangaroo-icon.png ../_images/tiago-icon.png ../_images/ari-icon.png ../_images/talos-icon.png ../_images/mobile-bases-icon.png

How to launch the different components for person detection#

This how-to describes how to test the hri_person_manager node in your local environment to familiarise yourself with the ROS4HRI pipeline. The node aggregates information about faces, bodies and voices in a single structure, person, which facilitates the management of the human features detected around the robot.

Prerequisites#

  • You will need the hri_face_detect and hri_face_identification nodes. These nodes will feed hri_person_manager.

  • You will also need a webcam and a calibration file for the camera. If you don’t have one, here you can find a standard calibration file sample that you can temporarily use for this tutorial. If you are using this calibration file, do not expect the face pose estimation to be precise.

Testing#

  1. In terminal 1, start usb_cam:

$ ros2 run usb_cam usb_cam_node_exe --ros-args -p camera_info_url:="file:///<calibration_file_location>"

You must provide a calibration file for your camera (like this generic file for webcams), otherwise hri_face_detect will not be able to publish the TF frames of the faces (note that the name of the camera in the calibration file should be default_cam, as I will assume this name for the camera TF frame).

Without calibration, hri_person_manager will still partially work, but for example, proximal zones will not be published, and the person TF frames will not be available.

  1. In terminal 2, start hri_face_detect:

$ ros2 launch hri_face_detect face_detect.launch.py
  1. In terminal 3, start hri_face_identification:

$ ros2 launch hri_face_identification face_identification.launch.py
  1. In terminal 4, publish a static (identity) transform between the camera and /map:

$ ros2 run tf2_ros static_transform_publisher --frame-id map --child-frame-id default_cam
  1. In terminal 5, start the hri_person_manager node:

$ ros2 launch hri_person_manager person_manager.launch.py
  1. In terminal 6, check the output of /humans/persons/tracked, /humans/persons/in_{personal,social,public}_space, /humans/persons/<id>/*…

For instance, you should see your own person ID:

$ ros2 topic echo /humans/persons/in_personal_space
  1. Optionally, you can display the face - person association graph:

    • In terminal 7, run:

      $ ros2 run hri_person_manager show_humans_graph
      
    • In terminal 8, view the output:

      $ evince /tmp/graph.pdf
      

That’s all! You can now start developing your own code using the available libraries in C++ and python, or continue playing with other tutorials in the πŸ‘₯ Social perception main page.