dusty-nv / ros_deep_learning

Deep learning inference nodes for ROS / ROS2 with support for NVIDIA Jetson and TensorRT
862 stars 258 forks source link

subscriber error #106

Closed sys-met closed 2 years ago

sys-met commented 2 years ago

Hello dusty-nv I want to receive data with a simple subscriber node, but I am getting the following error

rospy.loginfo("Robot şarjı: %f"%mesaj.bbox.center.x) AttributeError: 'Detection2DArray' object has no attribute 'bbox'

dusty-nv commented 2 years ago

Hi @sys-met, see here for the specification of the Detection2DArray message: http://docs.ros.org/en/lunar/api/vision_msgs/html/msg/Detection2DArray.html

I think you probably need to index it to get the Detection2D message that you are looking for.

sys-met commented 2 years ago

Hello dusty-nv i need a simple example on this

rospy.loginfo(detections[0].bbox.size_y) TypeError: 'Detection2DArray' object does not support indexing

dusty-nv commented 2 years ago

Try detections.detections[0].bbox.size_y

sys-met commented 2 years ago

thanks, it worked