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

How to acces the center.x value in detectnet/detections #136

Open 12003586 opened 3 months ago

12003586 commented 3 months ago

Hi when i listen to the topic /detectnet/detections I get this output:

    header: 
      seq: 35942
      stamp: 
        secs: 1711107077
        nsecs: 727951291
      frame_id: ''
    detections: 
      - 
        header: 
          seq: 0
          stamp: 
            secs: 0
            nsecs:         0
          frame_id: ''
        results: 
          - 
            id: 1
            score: 0.991217374802
            pose: 
              pose: 
                position: 
                  x: 0.0
                  y: 0.0
                  z: 0.0
                orientation: 
                  x: 0.0
                  y: 0.0
                  z: 0.0
                  w: 0.0
              covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
        bbox: 
          center: 
            x: 458.828125
            y: 356.748046875
            theta: 0.0
          size_x: 384.84375
          size_y: 687.12890625
        source_img: 
          header: 
            seq: 0
            stamp: 
              secs: 0
              nsecs:         0
            frame_id: ''
          height: 0
          width: 0
          encoding: ''
          is_bigendian: 0
          step: 0
          data: []

How can i acces the bbox/center/x and /y values?

dusty-nv commented 3 months ago

@12003586 you need to get them out of the vision_msgs/Detection2DArray message: