NVIDIA-ISAAC-ROS / isaac_ros_pose_estimation

Deep learned, NVIDIA-accelerated 3D object pose estimation
https://developer.nvidia.com/isaac-ros-gems
Apache License 2.0
142 stars 21 forks source link

Can't use it with usb cameras with ros2 node #10

Closed ArghyaChatterjee closed 1 year ago

ArghyaChatterjee commented 1 year ago

Hello,

I was trying to use this repo inside docker. It runs well as you gave the demo ros bag but with my USB camera with the ros2 usb_cam node running, it gives the following result:

[component_container_mt-1] [WARN] [1667762069.374893820] [dope_decoder]: [NitrosPublisherSubscriberBase] Failed to get timestamp from a NITROS message (eid=77309)

Here is the node: https://github.com/ros-drivers/usb_cam

git checkout ros2

Note:

jaiveersinghNV commented 1 year ago

Could you provide a complete log and an accompanying launch file that we can use to investigate this issue? Thanks!

ArghyaChatterjee commented 1 year ago

Here is my launch file: https://github.com/ros-drivers/usb_cam/blob/ros2/launch/demo_launch.py camera_info.yaml file: https://github.com/ros-drivers/usb_cam/blob/ros2/config/camera_info.yaml

image_width: 1920
image_height: 1080
camera_name: test_camera
camera_matrix:
  rows: 3
  cols: 3
  data: [438.783367, 0.000000, 305.593336, 0.000000, 437.302876, 243.738352, 0.000000, 0.000000, 1.000000]
distortion_model: plumb_bob
distortion_coefficients:
  rows: 1
  cols: 5
  data: [-0.361976, 0.110510, 0.001014, 0.000505, 0.000000]
rectification_matrix:
  rows: 3
  cols: 3
  data: [0.999978, 0.002789, -0.006046, -0.002816, 0.999986, -0.004401, 0.006034, 0.004417, 0.999972]
projection_matrix:
  rows: 3
  cols: 4
  data: [393.653800, 0.000000, 322.797939, 0.000000, 0.000000, 393.653800, 241.090902, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000]

params.yaml https://github.com/ros-drivers/usb_cam/blob/ros2/config/params.yaml

/**:
    ros__parameters:
      video_device: "/dev/video0"
      framerate: 30.0
      io_method: "mmap"
      frame_id: "camera"
      pixel_format: "yuyv"
      color_format: "yuv422p"
      image_width: 1920
      image_height: 1080
      camera_name: "test_camera"
      camera_info_url: "package://usb_cam/config/camera_info.yaml"
swapnesh-wani-nvidia commented 1 year ago

By looking at the camera_info.yaml file it feels like the camera_matrix and projection_matrix data are incorrect. Also, in params.yaml it is not specified that it is an RGB image. Could you verify that you are able to visualize the images from your camera in Rviz or Rqt? Also, if it is possible to get the ROS bag recording to diagnose?