NVIDIA-ISAAC-ROS / isaac_ros_apriltag

NVIDIA-accelerated Apriltag detection and pose estimation.
https://developer.nvidia.com/isaac-ros-gems
Apache License 2.0
114 stars 20 forks source link

gigE camera what are the arguments to start the node? #23

Closed AndreV84 closed 1 year ago

AndreV84 commented 1 year ago

how do we run nvidia apriltags humble docker with GigE camera on Jetson orin?

hemalshahNV commented 1 year ago

You can try a ROS 2 package for GigE GenICam support (quick search yielded this) to access your camera and then send the frames through lens distortion correction, image color conversion, and then into Isaac ROS Apriltag.

AndreV84 commented 1 year ago

Thank you for your reply Somehow within the container we got these two topics

admin@ubuntu:/workspaces/isaac_ros-dev$ ros2 topic hz /color/image_raw
average rate: 6.085
    min: 0.050s max: 0.451s std dev: 0.13842s window: 7
^Cadmin@ubuntu:/workspaces/isaac_ros-dev$ ros2 topic hz /color/camera_info
average rate: 1.363
    min: 0.352s max: 0.949s std dev: 0.27064s window: 3

which launch file to use? which arguments to edit/ pass to terminal to run nvapriltags with such inputs? could you extend, please?

AndreV84 commented 1 year ago

do these inputs seem sufficient to run nvapriltags? how do we run it? could you render sample line, please? it will start with ros2 launch isaac_ros_apriltag but what will be the rest of the line?

AndreV84 commented 1 year ago

@hemalshahNV any update?

hemalshahNV commented 1 year ago

@AndreV84 , you will need to write your own launch file that brings up your cameras and feeds appropriate images into the isaac_ros_apriltag::ApriltagNode node. The interface to this node are listed in documentation which include as input rectified (=lens distortion correction for a monocam) images as sensor_msgs::Image and the intrinsic calibration as sensor_msgs::CameraInfo so that the Apriltag node can determine a 3D pose. The examples provided should have all of the information you need to make this work for your application.

AndreV84 commented 1 year ago

there is no easy way for a brief test to just run the cameras node separately manually then somehow start existing nvapriltags templates saying them to subscribe to two specific topic names from already running node, e.g. run nvapriltags to subscribe to inputs

/color/camera_info
/color/image_raw

Thanks AV

AndreV84 commented 1 year ago

how do we convert to a supported type?

component_container_mt-1] [ERROR] [1675965639.925155779] [NitrosImage]: [convert_to_custom] Unsupported encoding from ROS [bayer_rggb8
hemalshahNV commented 1 year ago

You're getting back raw Bayer data from your camera. You'll need to perform ISP on it to get a usable color raster. You can use Isaac ROS Image Proc image_format_converter or the CPU-equivalent in image_pipeline repository. @AndreV84 , you can find more help for how to read images from your GigE camera in ROS Answers or on forums hosted by the camera manufacturer.

AndreV84 commented 1 year ago

@hemalshahNV I have found in camera settings several pixel formats which do we use so it will get processed/ supported by nvapriltag node? 002_list

Thanks AV

AndreV84 commented 1 year ago

will BGR8 be sufficient for direct processing for NVApriltags?

jaiveersinghNV commented 1 year ago

The BGR8 format can be turned into RGB8 using the Isaac ROS Image Proc image_format_converter node. Then, that converted image can be sent to the Isaac ROS AprilTag isaac_ros_apriltag node.

AndreV84 commented 1 year ago

after changing the type to BRG8 it would result in

[component_container_mt-1] [INFO] [1676336759.377062965] [apriltag]: [NitrosSubscriber] Received a message but the application receiver's pointer is not yet set.
[component_container_mt-1] [ERROR] [1676336759.391618695] [NitrosImage]: [convert_to_custom] Unsupported encoding from ROS [INVALID].
[component_container_mt-1] terminate called after throwing an instance of 'std::runtime_error'
[component_container_mt-1]   what():  [convert_to_custom] Unsupported encoding from ROS.
[ERROR] [component_container_mt-1]: process has died [pid 1466086, exit code -6, cmd 
AndreV84 commented 1 year ago

@hemalshahNV can NV apriltags process any of the formats without conversion? from the list? or the Image Proc is necessarily required? 002_list

hemalshahNV commented 1 year ago

RGB8 is what Isaac ROS Apriltag is expecting. Please convert to this color format and retest.

AndreV84 commented 1 year ago

thank you for following up devs were able to manage the conversion let me check with my team then get back to you

AndreV84 commented 1 year ago

@hemalshahNV seems there is data but no length so no detection

, length: 0>'
---
header:
  stamp:
    sec: 1676953662
    nanosec: 973769197
AndreV84 commented 1 year ago

seems the issue been addressed somehow reducing the resolution could you extend if nvapriltag supports large resolutions somehow? what are the largest supported resolutions? is there a supported list of resolutions? @hemalshahNV