opendr icon indicating copy to clipboard operation
opendr copied to clipboard

Har ros1 fix

Open negarhdr opened this issue 2 years ago • 2 comments

This branch fixes the ROS1 node issues for skeleton_based_human_action_recognition tool.

negarhdr avatar Sep 14 '22 08:09 negarhdr

All the comments for this PR are applied. Do you think it is ready to be merged?

negarhdr avatar Oct 19 '22 09:10 negarhdr

Thanks @negarhdr for the fixes, i will add a new review shortly.

tsampazk avatar Oct 19 '22 09:10 tsampazk

  File "/opt/ros/noetic/lib/python3/dist-packages/vision_msgs/msg/_ObjectHypothesis.py", line 65, in serialize
    buff.write(_get_struct_qd().pack(_x.id, _x.score))
struct.error: required argument is not a float
.
  File "/opt/ros/noetic/lib/python3/dist-packages/genpy/message.py", line 273, in check_type
    raise SerializationError('field %s must be float type' % field_name)
genpy.message.SerializationError: field score must be float type
.
ile "/home/kostas/Desktop/opendr/projects/opendr_ws/install/lib/perception/skeleton_based_action_recognition.py", line 162, in callback
    self.hypothesis_publisher.publish(self.bridge.to_ros_category(category))
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 886, in publish
    raise ROSSerializationException(str(e))
rospy.exceptions.ROSSerializationException: field score must be float type

After some digging, i noticed that it seems to originate from the bridge. category.confidence seems to be a Tensor, instead of being a float.

The error mentioned in the original review is still present, which stops the node from running. I temporarily changed the problematic line to result.score = 0.0 to carry on testing and the node runs successfully. Could you please take a look at it?

tsampazk avatar Oct 21 '22 10:10 tsampazk

  File "/opt/ros/noetic/lib/python3/dist-packages/vision_msgs/msg/_ObjectHypothesis.py", line 65, in serialize
    buff.write(_get_struct_qd().pack(_x.id, _x.score))
struct.error: required argument is not a float
.
  File "/opt/ros/noetic/lib/python3/dist-packages/genpy/message.py", line 273, in check_type
    raise SerializationError('field %s must be float type' % field_name)
genpy.message.SerializationError: field score must be float type
.
ile "/home/kostas/Desktop/opendr/projects/opendr_ws/install/lib/perception/skeleton_based_action_recognition.py", line 162, in callback
    self.hypothesis_publisher.publish(self.bridge.to_ros_category(category))
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 886, in publish
    raise ROSSerializationException(str(e))
rospy.exceptions.ROSSerializationException: field score must be float type

After some digging, i noticed that it seems to originate from the bridge. category.confidence seems to be a Tensor, instead of being a float.

The error mentioned in the original review is still present, which stops the node from running. I temporarily changed the problematic line to result.score = 0.0 to carry on testing and the node runs successfully. Could you please take a look at it?

Thanks for the comment. I added one line to fix it. It should be ok now.

negarhdr avatar Oct 21 '22 19:10 negarhdr

Works for me too, thank you! I've just changed the permissions of the python script (and others like it) in the scripts folder to allow execution

This probably solves the issue described here? :laughing:

tsampazk avatar Oct 25 '22 08:10 tsampazk

eheh, it might, I had a similar message with this one

ad-daniel avatar Oct 25 '22 09:10 ad-daniel

Alright i'll check it out as soon as we merge this, cause my workaround is bit cumbersome to be honest.

tsampazk avatar Oct 25 '22 09:10 tsampazk

Alright i'll check it out as soon as we merge this, cause my workaround is bit cumbersome to be honest.

As expected, the permissions change seems to partially fix it in regards to the not executable part, but the rest of problem with the shebang being ignored persists on some nodes.

tsampazk avatar Oct 25 '22 10:10 tsampazk