Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in RosFaceDetector #2

Open
vignif opened this issue Oct 4, 2022 · 0 comments
Open

Error in RosFaceDetector #2

vignif opened this issue Oct 4, 2022 · 0 comments

Comments

@vignif
Copy link

vignif commented Oct 4, 2022

Hi! thank you so much for your efforts in ros4hri.

I have a camera attached to my machine and I'm trying to detect faces as described in your docs.
The default roslaunch hri_face_detect detect.launch works greatly.
However, when the face_mesh parameter is set to False this error appears:

[ERROR] [1664892161.286484]: bad callback: <bound method RosFaceDetector.callback of <__main__.RosFaceDetector object at 0x7f3071b03f70>>
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/home/fra/Research/ros_ws/src/hri_face_detect/nodes/hri_face_detect/detect", line 734, in callback
    detections = self.facedetector.detect(image, img_width, img_height)
  File "/home/fra/Research/ros_ws/src/hri_face_detect/nodes/hri_face_detect/detect", line 503, in detect
    landmarks = FacialLandmarks(
  File "/home/fra/Research/ros_ws/devel/lib/python3/dist-packages/hri_msgs/msg/_FacialLandmarks.py", line 228, in __init__
    super(FacialLandmarks, self).__init__(*args, **kwds)
  File "/opt/ros/noetic/lib/python3/dist-packages/genpy/message.py", line 354, in __init__
    raise TypeError('Invalid number of arguments, args should be %s' % str(self.__slots__) + ' args are' + str(args))
TypeError: Invalid number of arguments, args should be ['header', 'landmarks', 'height', 'width'] args are([x: 0
y: 0
c: 1, .....

My launch file looks like this:

<launch>
   <include file="$(find realsense2_camera)/launch/rs_camera.launch">
        <arg name="device_type" value="d435"/>
    </include>
    <include file="$(find hri_face_detect)/launch/detect.launch">
      <arg name="face_mesh" value="False"/>
    </include>
</launch>

Do you have any suggestions?
Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant