surfertas / ros2_ipcamera

ros2 package for use with ip camera
26 stars 12 forks source link

No output in rviz/rqt #14

Open AllanGErnst opened 2 years ago

AllanGErnst commented 2 years ago

We have an ArkCam Basic Plus Mini IP camera (https://en.ark-vision-systems.com/produkte/arkcambasic+mini/), which we would like to connect to Ros2_ipcamera.

We have a simple Python script using OpenCV which receives images from the camera via "rtsp: //192.168.0.76:8554/h264", showing that the camera works. We have installed Ros2_ipcamera as described in the readme file and customized camera_info.yaml and ipcamera.yaml as shown below.

ros2 launch ros2_ipcamera ipcamera.launch.py starts without errors and ros2 topic list shows /ipcamera/camera_info and /ipcamera/image_raw.

However, we do not get any image in either rviz or rqt. Is there anything we have overlooked?

Thanks in advance.

ipcamera.yaml:

ipcamera:
   ros__parameters:
     rtsp_uri: "rtsp: //192.168.0.76:8554/h264"
     image_topic: "image_raw"
     image_width: 1280
     image_height: 720

camera_info.yaml:

image_width: 1280
image_height: 720
"the rest is left unchanged"
surfertas commented 1 year ago

Hey sorry, just saw this. Were you able to resolve? I need to update.

JLBicho commented 1 year ago

Hi @AllanGErnst, @surfertas I think this issue has to do with the QoS settings in rviz. You need to select the Reliability as "Best Effort" like this: image

Regarding rqt, I think there is not way of changing the QoS right now. See: https://github.com/ros-visualization/rqt/issues/187

I hope this helps!

JLBicho commented 1 year ago

Hi all,

I've managed to find the bug. It had to do with the frame_id in the header. In this case, it does not represent the frame of the image but the frame of the tf tree.

Now it works, whenever you put the fixed frame in RVIZ has the frame_id you put in the YAML