Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberry Pi 4 realsense-ros no pointcloud #1324

Closed
yiyinglai opened this issue Aug 9, 2020 · 49 comments
Closed

Raspberry Pi 4 realsense-ros no pointcloud #1324

yiyinglai opened this issue Aug 9, 2020 · 49 comments
Labels

Comments

@yiyinglai
Copy link

yiyinglai commented Aug 9, 2020

System: Linux raspberrypi 5.4.51-v7l+ #1327 SMP Thu Jul 23 11:04:39 BST 2020 armv7l GNU/Linux
OS: Raspbian Buster
ROS distro: kinetic
Camera: D415
1) Name: Intel RealSense D415, serial number: 950122061295, update serial number: 948123020797, firmware version: 05.12.06.00, USB type: 3.2
USB cable: official cable
librealsense 2.36.0 built with
cmake ../ -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=true -DFORCE_RSUSB_BACKEND=ON -DBUILD_WITH_TM2=false -DIMPORT_DEPTH_CAM_FW=false (firmware is already latest)
realsense-ros 2.2.15

RGB image and point cloud in realsense-viewer:
realsense-viewer

When using realsense-ros:

pi@raspberrypi:~ $ roslaunch realsense2_camera rs_camera.launch enable_pointcloud:=true
... logging to /home/pi/.ros/log/246e19fc-da81-11ea-98fc-dca632bae7db/roslaunch-raspberrypi-11963.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://raspberrypi:36881/

SUMMARY
========

PARAMETERS
 * /camera/realsense2_camera/accel_fps: 250
 * /camera/realsense2_camera/accel_frame_id: camera_accel_frame
 * /camera/realsense2_camera/accel_optical_frame_id: camera_accel_opti...
 * /camera/realsense2_camera/align_depth: False
 * /camera/realsense2_camera/aligned_depth_to_color_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye1_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye2_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_infra1_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_infra2_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/allow_no_texture_points: False
 * /camera/realsense2_camera/base_frame_id: camera_link
 * /camera/realsense2_camera/calib_odom_file: 
 * /camera/realsense2_camera/clip_distance: -2.0
 * /camera/realsense2_camera/color_fps: 30
 * /camera/realsense2_camera/color_frame_id: camera_color_frame
 * /camera/realsense2_camera/color_height: 480
 * /camera/realsense2_camera/color_optical_frame_id: camera_color_opti...
 * /camera/realsense2_camera/color_width: 640
 * /camera/realsense2_camera/depth_fps: 30
 * /camera/realsense2_camera/depth_frame_id: camera_depth_frame
 * /camera/realsense2_camera/depth_height: 480
 * /camera/realsense2_camera/depth_optical_frame_id: camera_depth_opti...
 * /camera/realsense2_camera/depth_width: 640
 * /camera/realsense2_camera/device_type: 
 * /camera/realsense2_camera/enable_accel: False
 * /camera/realsense2_camera/enable_color: True
 * /camera/realsense2_camera/enable_depth: True
 * /camera/realsense2_camera/enable_fisheye1: False
 * /camera/realsense2_camera/enable_fisheye2: False
 * /camera/realsense2_camera/enable_fisheye: False
 * /camera/realsense2_camera/enable_gyro: False
 * /camera/realsense2_camera/enable_infra1: False
 * /camera/realsense2_camera/enable_infra2: False
 * /camera/realsense2_camera/enable_infra: False
 * /camera/realsense2_camera/enable_pointcloud: True
 * /camera/realsense2_camera/enable_pose: False
 * /camera/realsense2_camera/enable_sync: False
 * /camera/realsense2_camera/filters: 
 * /camera/realsense2_camera/fisheye1_frame_id: camera_fisheye1_f...
 * /camera/realsense2_camera/fisheye1_optical_frame_id: camera_fisheye1_o...
 * /camera/realsense2_camera/fisheye2_frame_id: camera_fisheye2_f...
 * /camera/realsense2_camera/fisheye2_optical_frame_id: camera_fisheye2_o...
 * /camera/realsense2_camera/fisheye_fps: 30
 * /camera/realsense2_camera/fisheye_frame_id: camera_fisheye_frame
 * /camera/realsense2_camera/fisheye_height: 480
 * /camera/realsense2_camera/fisheye_optical_frame_id: camera_fisheye_op...
 * /camera/realsense2_camera/fisheye_width: 640
 * /camera/realsense2_camera/gyro_fps: 400
 * /camera/realsense2_camera/gyro_frame_id: camera_gyro_frame
 * /camera/realsense2_camera/gyro_optical_frame_id: camera_gyro_optic...
 * /camera/realsense2_camera/imu_optical_frame_id: camera_imu_optica...
 * /camera/realsense2_camera/infra1_frame_id: camera_infra1_frame
 * /camera/realsense2_camera/infra1_optical_frame_id: camera_infra1_opt...
 * /camera/realsense2_camera/infra2_frame_id: camera_infra2_frame
 * /camera/realsense2_camera/infra2_optical_frame_id: camera_infra2_opt...
 * /camera/realsense2_camera/infra_fps: 30
 * /camera/realsense2_camera/infra_height: 480
 * /camera/realsense2_camera/infra_width: 640
 * /camera/realsense2_camera/initial_reset: False
 * /camera/realsense2_camera/json_file_path: 
 * /camera/realsense2_camera/linear_accel_cov: 0.01
 * /camera/realsense2_camera/odom_frame_id: camera_odom_frame
 * /camera/realsense2_camera/pointcloud_texture_index: 0
 * /camera/realsense2_camera/pointcloud_texture_stream: RS2_STREAM_COLOR
 * /camera/realsense2_camera/pose_frame_id: camera_pose_frame
 * /camera/realsense2_camera/pose_optical_frame_id: camera_pose_optic...
 * /camera/realsense2_camera/publish_odom_tf: True
 * /camera/realsense2_camera/publish_tf: True
 * /camera/realsense2_camera/rosbag_filename: 
 * /camera/realsense2_camera/serial_no: 
 * /camera/realsense2_camera/tf_publish_rate: 0.0
 * /camera/realsense2_camera/topic_odom_in: odom_in
 * /camera/realsense2_camera/unite_imu_method: 
 * /camera/realsense2_camera/usb_port_id: 
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES
  /camera/
    realsense2_camera (nodelet/nodelet)
    realsense2_camera_manager (nodelet/nodelet)

auto-starting new master
process[master]: started with pid [11973]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 246e19fc-da81-11ea-98fc-dca632bae7db
process[rosout-1]: started with pid [11986]
started core service [/rosout]
process[camera/realsense2_camera_manager-2]: started with pid [12003]
process[camera/realsense2_camera-3]: started with pid [12004]
[ INFO] [1597005881.727774077]: Initializing nodelet with 4 worker threads.
[ INFO] [1597005881.866413807]: RealSense ROS v2.2.15
[ INFO] [1597005881.866503879]: Built with LibRealSense v2.36.0
[ INFO] [1597005881.866569174]: Running with LibRealSense v2.36.0
[ INFO] [1597005881.927491143]:  
[ INFO] [1597005882.311805618]: Device with serial number 950122061295 was found.

[ INFO] [1597005882.312052929]: Device with physical ID 2-2-4 was found.
[ INFO] [1597005882.312199426]: Device with name Intel RealSense D415 was found.
[ INFO] [1597005882.313696788]: Device with port number 2-2 was found.
[ INFO] [1597005882.322564037]: getParameters...
[ INFO] [1597005882.689518490]: setupDevice...
[ INFO] [1597005882.689696468]: JSON file is not provided
[ INFO] [1597005882.689807373]: ROS Node Namespace: camera
[ INFO] [1597005882.689918094]: Device Name: Intel RealSense D415
[ INFO] [1597005882.690025277]: Device Serial No: 950122061295
[ INFO] [1597005882.690126442]: Device physical port: 2-2-4
[ INFO] [1597005882.690225533]: Device FW version: 05.12.06.00
[ INFO] [1597005882.690321809]: Device Product ID: 0x0AD3
[ INFO] [1597005882.690419048]: Enable PointCloud: On
[ INFO] [1597005882.690513657]: Align Depth: Off
[ INFO] [1597005882.690606396]: Sync Mode: On
[ INFO] [1597005882.690810392]: Device Sensors: 
[ INFO] [1597005882.775638860]: Stereo Module was found.
[ INFO] [1597005882.888852322]: RGB Camera was found.
[ INFO] [1597005882.889187630]: Add Filter: pointcloud
[ INFO] [1597005882.892440591]: num_filters: 1
[ INFO] [1597005882.892727697]: Setting Dynamic reconfig parameters.
[ INFO] [1597005888.338604562]: Done Setting Dynamic reconfig parameters.
[ INFO] [1597005888.341864763]: depth stream is enabled - width: 640, height: 480, fps: 30, Format: Z16
[ INFO] [1597005888.345248480]: color stream is enabled - width: 640, height: 480, fps: 30, Format: RGB8
[ INFO] [1597005888.345891672]: setupPublishers...
[ INFO] [1597005888.364576746]: Expected frequency for depth = 30.00000
[ INFO] [1597005888.947470272]: Expected frequency for color = 30.00000
[ INFO] [1597005889.083017538]: setupStreams...
[ INFO] [1597005889.192012408]: insert Depth to Stereo Module
[ INFO] [1597005889.192281552]: insert Color to RGB Camera
[ INFO] [1597005889.519874799]: SELECTED BASE:Depth, 0
[ INFO] [1597005889.581204686]: RealSense Node Is Up!
 09/08 16:44:49,726 WARNING [2863645712] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 09/08 16:44:49,812 WARNING [2863645712] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 09/08 16:44:49,905 WARNING [2863645712] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 09/08 16:44:49,974 WARNING [2863645712] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
^C[camera/realsense2_camera-3] killing on exit
[camera/realsense2_camera_manager-2] killing on exit
 09/08 16:44:53,757 WARNING [2617963536] (sensor.cpp:335) Frame received with streaming inactive,Depth0, Arrived,0.000000 1597005893733.143311
 09/08 16:44:53,837 WARNING [2651948048] (sensor.cpp:335) Frame received with streaming inactive,Color0, Arrived,0.000000 1597005893832.731201
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

Verified that no pointcloud data is published.

pi@raspberrypi:~ $ rostopic hz /camera/depth/color/points
subscribed to [/camera/depth/color/points]
no new messages
no new messages
no new messages
^Cno new messages

RGB image and depth image are published and can be visualized in Rviz.
realsense-ros

Also tried specifying initial_reset argument.

pi@raspberrypi:~ $ roslaunch realsense2_camera rs_camera.launch enable_pointcloud:=true initial_reset:=true
... logging to /home/pi/.ros/log/4ab7b69e-da82-11ea-bd6b-dca632bae7db/roslaunch-raspberrypi-13498.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://raspberrypi:44695/

SUMMARY
========

PARAMETERS
 * /camera/realsense2_camera/accel_fps: 250
 * /camera/realsense2_camera/accel_frame_id: camera_accel_frame
 * /camera/realsense2_camera/accel_optical_frame_id: camera_accel_opti...
 * /camera/realsense2_camera/align_depth: False
 * /camera/realsense2_camera/aligned_depth_to_color_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye1_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye2_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_infra1_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_infra2_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/allow_no_texture_points: False
 * /camera/realsense2_camera/base_frame_id: camera_link
 * /camera/realsense2_camera/calib_odom_file: 
 * /camera/realsense2_camera/clip_distance: -2.0
 * /camera/realsense2_camera/color_fps: 30
 * /camera/realsense2_camera/color_frame_id: camera_color_frame
 * /camera/realsense2_camera/color_height: 480
 * /camera/realsense2_camera/color_optical_frame_id: camera_color_opti...
 * /camera/realsense2_camera/color_width: 640
 * /camera/realsense2_camera/depth_fps: 30
 * /camera/realsense2_camera/depth_frame_id: camera_depth_frame
 * /camera/realsense2_camera/depth_height: 480
 * /camera/realsense2_camera/depth_optical_frame_id: camera_depth_opti...
 * /camera/realsense2_camera/depth_width: 640
 * /camera/realsense2_camera/device_type: 
 * /camera/realsense2_camera/enable_accel: False
 * /camera/realsense2_camera/enable_color: True
 * /camera/realsense2_camera/enable_depth: True
 * /camera/realsense2_camera/enable_fisheye1: False
 * /camera/realsense2_camera/enable_fisheye2: False
 * /camera/realsense2_camera/enable_fisheye: False
 * /camera/realsense2_camera/enable_gyro: False
 * /camera/realsense2_camera/enable_infra1: False
 * /camera/realsense2_camera/enable_infra2: False
 * /camera/realsense2_camera/enable_infra: False
 * /camera/realsense2_camera/enable_pointcloud: True
 * /camera/realsense2_camera/enable_pose: False
 * /camera/realsense2_camera/enable_sync: False
 * /camera/realsense2_camera/filters: 
 * /camera/realsense2_camera/fisheye1_frame_id: camera_fisheye1_f...
 * /camera/realsense2_camera/fisheye1_optical_frame_id: camera_fisheye1_o...
 * /camera/realsense2_camera/fisheye2_frame_id: camera_fisheye2_f...
 * /camera/realsense2_camera/fisheye2_optical_frame_id: camera_fisheye2_o...
 * /camera/realsense2_camera/fisheye_fps: 30
 * /camera/realsense2_camera/fisheye_frame_id: camera_fisheye_frame
 * /camera/realsense2_camera/fisheye_height: 480
 * /camera/realsense2_camera/fisheye_optical_frame_id: camera_fisheye_op...
 * /camera/realsense2_camera/fisheye_width: 640
 * /camera/realsense2_camera/gyro_fps: 400
 * /camera/realsense2_camera/gyro_frame_id: camera_gyro_frame
 * /camera/realsense2_camera/gyro_optical_frame_id: camera_gyro_optic...
 * /camera/realsense2_camera/imu_optical_frame_id: camera_imu_optica...
 * /camera/realsense2_camera/infra1_frame_id: camera_infra1_frame
 * /camera/realsense2_camera/infra1_optical_frame_id: camera_infra1_opt...
 * /camera/realsense2_camera/infra2_frame_id: camera_infra2_frame
 * /camera/realsense2_camera/infra2_optical_frame_id: camera_infra2_opt...
 * /camera/realsense2_camera/infra_fps: 30
 * /camera/realsense2_camera/infra_height: 480
 * /camera/realsense2_camera/infra_width: 640
 * /camera/realsense2_camera/initial_reset: True
 * /camera/realsense2_camera/json_file_path: 
 * /camera/realsense2_camera/linear_accel_cov: 0.01
 * /camera/realsense2_camera/odom_frame_id: camera_odom_frame
 * /camera/realsense2_camera/pointcloud_texture_index: 0
 * /camera/realsense2_camera/pointcloud_texture_stream: RS2_STREAM_COLOR
 * /camera/realsense2_camera/pose_frame_id: camera_pose_frame
 * /camera/realsense2_camera/pose_optical_frame_id: camera_pose_optic...
 * /camera/realsense2_camera/publish_odom_tf: True
 * /camera/realsense2_camera/publish_tf: True
 * /camera/realsense2_camera/rosbag_filename: 
 * /camera/realsense2_camera/serial_no: 
 * /camera/realsense2_camera/tf_publish_rate: 0.0
 * /camera/realsense2_camera/topic_odom_in: odom_in
 * /camera/realsense2_camera/unite_imu_method: 
 * /camera/realsense2_camera/usb_port_id: 
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES
  /camera/
    realsense2_camera (nodelet/nodelet)
    realsense2_camera_manager (nodelet/nodelet)

auto-starting new master
process[master]: started with pid [13508]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 4ab7b69e-da82-11ea-bd6b-dca632bae7db
process[rosout-1]: started with pid [13521]
started core service [/rosout]
process[camera/realsense2_camera_manager-2]: started with pid [13538]
process[camera/realsense2_camera-3]: started with pid [13539]
[ INFO] [1597006375.506936029]: Initializing nodelet with 4 worker threads.
[ INFO] [1597006375.643162068]: RealSense ROS v2.2.15
[ INFO] [1597006375.643248714]: Built with LibRealSense v2.36.0
[ INFO] [1597006375.643428730]: Running with LibRealSense v2.36.0
[ INFO] [1597006375.703800396]:  
[ INFO] [1597006376.120674848]: Device with serial number 950122061295 was found.

[ INFO] [1597006376.120770827]: Device with physical ID 2-2-4 was found.
[ INFO] [1597006376.120818086]: Device with name Intel RealSense D415 was found.
[ INFO] [1597006376.122725682]: Device with port number 2-2 was found.
[ INFO] [1597006376.122829587]: Resetting device...
[ INFO] [1597006382.260281477]:  
[ INFO] [1597006382.808603219]: Device with serial number 950122061295 was found.

[ INFO] [1597006382.808691884]: Device with physical ID 2-2-5 was found.
[ INFO] [1597006382.808738476]: Device with name Intel RealSense D415 was found.
[ INFO] [1597006382.810241190]: Device with port number 2-2 was found.
[ INFO] [1597006382.819110032]: getParameters...
[ INFO] [1597006383.187075595]: setupDevice...
[ INFO] [1597006383.187598049]: JSON file is not provided
[ INFO] [1597006383.187986838]: ROS Node Namespace: camera
[ INFO] [1597006383.188337591]: Device Name: Intel RealSense D415
[ INFO] [1597006383.188669993]: Device Serial No: 950122061295
[ INFO] [1597006383.189010672]: Device physical port: 2-2-5
[ INFO] [1597006383.189357573]: Device FW version: 05.12.06.00
[ INFO] [1597006383.189737677]: Device Product ID: 0x0AD3
[ INFO] [1597006383.190083190]: Enable PointCloud: On
[ INFO] [1597006383.190414517]: Align Depth: Off
[ INFO] [1597006383.190746548]: Sync Mode: On
[ INFO] [1597006383.191171133]: Device Sensors: 
[ INFO] [1597006383.277323507]: Stereo Module was found.
[ INFO] [1597006383.364445809]: RGB Camera was found.
[ INFO] [1597006383.364964985]: Add Filter: pointcloud
[ INFO] [1597006383.367772453]: num_filters: 1
[ INFO] [1597006383.367902081]: Setting Dynamic reconfig parameters.
[ INFO] [1597006388.835181714]: Done Setting Dynamic reconfig parameters.
[ INFO] [1597006388.839013090]: depth stream is enabled - width: 640, height: 480, fps: 30, Format: Z16
[ INFO] [1597006388.842839929]: color stream is enabled - width: 640, height: 480, fps: 30, Format: RGB8
[ INFO] [1597006388.843021130]: setupPublishers...
[ INFO] [1597006388.858007863]: Expected frequency for depth = 30.00000
[ INFO] [1597006389.432425549]: Expected frequency for color = 30.00000
[ INFO] [1597006389.562867264]: setupStreams...
[ INFO] [1597006389.666845618]: insert Depth to Stereo Module
[ INFO] [1597006389.667064058]: insert Color to RGB Camera
[ INFO] [1597006389.987359525]: SELECTED BASE:Depth, 0
[ INFO] [1597006390.060451373]: RealSense Node Is Up!
 09/08 16:53:10,178 WARNING [2870989840] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 09/08 16:53:10,292 WARNING [2870989840] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
[ERROR] [1597006390.327135368]: An error has occurred during frame callback: Error occured during execution of the processing block! See the log for more info
 09/08 16:53:10,363 WARNING [2870989840] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
[ERROR] [1597006390.427037053]: An error has occurred during frame callback: Error occured during execution of the processing block! See the log for more info
[ERROR] [1597006393.878198306]: An error has occurred during frame callback: Error occured during execution of the processing block! See the log for more info
^C[camera/realsense2_camera-3] killing on exit
[camera/realsense2_camera_manager-2] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 10, 2020

Hi @yiyinglai If the control_transfer returned warning is being generated continuously, rather than just at the start of launch, then it can indicate a communication problem with the device. If it is generated only once or twice at start-up and then does not repeat, it is safe to ignore the warning if the launch does not exit.

I looked at your launch instruction:

roslaunch realsense2_camera rs_camera.launch enable_pointcloud:=true initial_reset:=true

The term enable_pointcloud:=true has been deprecated (not recommended) for a long time, and filters:=pointcloud is instead recommended. This is the format used by the point cloud example in the RealSense ROS wrapper's documentation:

https://github.com/IntelRealSense/realsense-ros#rgbd-point-cloud

Changing the point cloud term may not necessarily make a difference, but could you try it please in order to eliminate the possibility that it is an influence on the problem. Thank you.

Also, could you expand open the Global Options section of the RViz options panel at the top of it to see what your Rviz has set in the Fixed Frame option, please?

@yiyinglai
Copy link
Author

Hi @MartyG-RealSense , thanks for you reply.

I tried using the filters argument, and here's the result:

pi@raspberrypi:~ $ roslaunch realsense2_camera rs_camera.launch filters:=pointcloud
... logging to /home/pi/.ros/log/ecfd8066-db2f-11ea-9a1d-dca632bae7db/roslaunch-raspberrypi-2005.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://raspberrypi:41595/

SUMMARY
========

PARAMETERS
 * /camera/realsense2_camera/accel_fps: 250
 * /camera/realsense2_camera/accel_frame_id: camera_accel_frame
 * /camera/realsense2_camera/accel_optical_frame_id: camera_accel_opti...
 * /camera/realsense2_camera/align_depth: False
 * /camera/realsense2_camera/aligned_depth_to_color_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye1_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye2_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_infra1_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_infra2_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/allow_no_texture_points: False
 * /camera/realsense2_camera/base_frame_id: camera_link
 * /camera/realsense2_camera/calib_odom_file: 
 * /camera/realsense2_camera/clip_distance: -2.0
 * /camera/realsense2_camera/color_fps: 30
 * /camera/realsense2_camera/color_frame_id: camera_color_frame
 * /camera/realsense2_camera/color_height: 480
 * /camera/realsense2_camera/color_optical_frame_id: camera_color_opti...
 * /camera/realsense2_camera/color_width: 640
 * /camera/realsense2_camera/depth_fps: 30
 * /camera/realsense2_camera/depth_frame_id: camera_depth_frame
 * /camera/realsense2_camera/depth_height: 480
 * /camera/realsense2_camera/depth_optical_frame_id: camera_depth_opti...
 * /camera/realsense2_camera/depth_width: 640
 * /camera/realsense2_camera/device_type: 
 * /camera/realsense2_camera/enable_accel: False
 * /camera/realsense2_camera/enable_color: True
 * /camera/realsense2_camera/enable_depth: True
 * /camera/realsense2_camera/enable_fisheye1: False
 * /camera/realsense2_camera/enable_fisheye2: False
 * /camera/realsense2_camera/enable_fisheye: False
 * /camera/realsense2_camera/enable_gyro: False
 * /camera/realsense2_camera/enable_infra1: False
 * /camera/realsense2_camera/enable_infra2: False
 * /camera/realsense2_camera/enable_infra: False
 * /camera/realsense2_camera/enable_pointcloud: False
 * /camera/realsense2_camera/enable_pose: False
 * /camera/realsense2_camera/enable_sync: False
 * /camera/realsense2_camera/filters: pointcloud
 * /camera/realsense2_camera/fisheye1_frame_id: camera_fisheye1_f...
 * /camera/realsense2_camera/fisheye1_optical_frame_id: camera_fisheye1_o...
 * /camera/realsense2_camera/fisheye2_frame_id: camera_fisheye2_f...
 * /camera/realsense2_camera/fisheye2_optical_frame_id: camera_fisheye2_o...
 * /camera/realsense2_camera/fisheye_fps: 30
 * /camera/realsense2_camera/fisheye_frame_id: camera_fisheye_frame
 * /camera/realsense2_camera/fisheye_height: 480
 * /camera/realsense2_camera/fisheye_optical_frame_id: camera_fisheye_op...
 * /camera/realsense2_camera/fisheye_width: 640
 * /camera/realsense2_camera/gyro_fps: 400
 * /camera/realsense2_camera/gyro_frame_id: camera_gyro_frame
 * /camera/realsense2_camera/gyro_optical_frame_id: camera_gyro_optic...
 * /camera/realsense2_camera/imu_optical_frame_id: camera_imu_optica...
 * /camera/realsense2_camera/infra1_frame_id: camera_infra1_frame
 * /camera/realsense2_camera/infra1_optical_frame_id: camera_infra1_opt...
 * /camera/realsense2_camera/infra2_frame_id: camera_infra2_frame
 * /camera/realsense2_camera/infra2_optical_frame_id: camera_infra2_opt...
 * /camera/realsense2_camera/infra_fps: 30
 * /camera/realsense2_camera/infra_height: 480
 * /camera/realsense2_camera/infra_width: 640
 * /camera/realsense2_camera/initial_reset: False
 * /camera/realsense2_camera/json_file_path: 
 * /camera/realsense2_camera/linear_accel_cov: 0.01
 * /camera/realsense2_camera/odom_frame_id: camera_odom_frame
 * /camera/realsense2_camera/pointcloud_texture_index: 0
 * /camera/realsense2_camera/pointcloud_texture_stream: RS2_STREAM_COLOR
 * /camera/realsense2_camera/pose_frame_id: camera_pose_frame
 * /camera/realsense2_camera/pose_optical_frame_id: camera_pose_optic...
 * /camera/realsense2_camera/publish_odom_tf: True
 * /camera/realsense2_camera/publish_tf: True
 * /camera/realsense2_camera/rosbag_filename: 
 * /camera/realsense2_camera/serial_no: 
 * /camera/realsense2_camera/tf_publish_rate: 0.0
 * /camera/realsense2_camera/topic_odom_in: odom_in
 * /camera/realsense2_camera/unite_imu_method: 
 * /camera/realsense2_camera/usb_port_id: 
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES
  /camera/
    realsense2_camera (nodelet/nodelet)
    realsense2_camera_manager (nodelet/nodelet)

auto-starting new master
process[master]: started with pid [2015]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to ecfd8066-db2f-11ea-9a1d-dca632bae7db
process[rosout-1]: started with pid [2028]
started core service [/rosout]
process[camera/realsense2_camera_manager-2]: started with pid [2045]
process[camera/realsense2_camera-3]: started with pid [2046]
[ INFO] [1597080950.518137458]: Initializing nodelet with 4 worker threads.
[ INFO] [1597080950.651298137]: RealSense ROS v2.2.15
[ INFO] [1597080950.651608377]: Built with LibRealSense v2.36.0
[ INFO] [1597080950.651852242]: Running with LibRealSense v2.36.0
[ INFO] [1597080950.709450109]:  
[ INFO] [1597080951.115215734]: Device with serial number 950122061295 was found.

[ INFO] [1597080951.115311591]: Device with physical ID 2-2-3 was found.
[ INFO] [1597080951.115359872]: Device with name Intel RealSense D415 was found.
[ INFO] [1597080951.117008312]: Device with port number 2-2 was found.
[ INFO] [1597080951.123753249]: getParameters...
[ INFO] [1597080951.422304716]: setupDevice...
[ INFO] [1597080951.422454854]: JSON file is not provided
[ INFO] [1597080951.422538580]: ROS Node Namespace: camera
[ INFO] [1597080951.422622085]: Device Name: Intel RealSense D415
[ INFO] [1597080951.422696496]: Device Serial No: 950122061295
[ INFO] [1597080951.422772408]: Device physical port: 2-2-3
[ INFO] [1597080951.422842041]: Device FW version: 05.12.06.00
[ INFO] [1597080951.422910619]: Device Product ID: 0x0AD3
[ INFO] [1597080951.422978993]: Enable PointCloud: On
[ INFO] [1597080951.423052682]: Align Depth: Off
[ INFO] [1597080951.423121241]: Sync Mode: On
[ INFO] [1597080951.423290232]: Device Sensors: 
[ INFO] [1597080951.508647379]: Stereo Module was found.
[ INFO] [1597080951.593066049]: RGB Camera was found.
[ INFO] [1597080951.593287617]: Add Filter: pointcloud
[ INFO] [1597080951.596388061]: num_filters: 1
[ INFO] [1597080951.596530421]: Setting Dynamic reconfig parameters.
[ INFO] [1597080957.010543037]: Done Setting Dynamic reconfig parameters.
[ INFO] [1597080957.031421439]: depth stream is enabled - width: 640, height: 480, fps: 30, Format: Z16
[ INFO] [1597080957.035537290]: color stream is enabled - width: 640, height: 480, fps: 30, Format: RGB8
[ INFO] [1597080957.035824230]: setupPublishers...
[ INFO] [1597080957.050160160]: Expected frequency for depth = 30.00000
[ INFO] [1597080957.601594115]: Expected frequency for color = 30.00000
[ INFO] [1597080957.709598319]: setupStreams...
[ INFO] [1597080957.817258062]: insert Depth to Stereo Module
[ INFO] [1597080957.817407273]: insert Color to RGB Camera
[ INFO] [1597080958.126973759]: SELECTED BASE:Depth, 0
[ INFO] [1597080958.177105462]: RealSense Node Is Up!
 10/08 13:35:58,271 WARNING [2863645712] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 10/08 13:35:58,373 WARNING [2863645712] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 10/08 13:35:58,436 WARNING [2863645712] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
[ WARN] [1597080970.124914918]: No stream match for pointcloud chosen texture Process - Color
[ERROR] [1597081071.279539123]: An error has occurred during frame callback: Error occured during execution of the processing block! See the log for more info
[ERROR] [1597081175.826460352]: An error has occurred during frame callback: Error occured during execution of the processing block! See the log for more info
[ERROR] [1597081207.978358609]: An error has occurred during frame callback: Error occured during execution of the processing block! See the log for more info
[ERROR] [1597081332.661908387]: An error has occurred during frame callback: Error occured during execution of the processing block! See the log for more info
[ERROR] [1597081493.430625107]: An error has occurred during frame callback: Error occured during execution of the processing block! See the log for more info
^C[camera/realsense2_camera_manager-2] killing on exit
[camera/realsense2_camera-3] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

The control_transfer returned warning appeared three times at the beginning only in this case (I left the node running for a dozen minutes; it does not exit by itselt).
Screenshot of Rviz:
realsense-ros-filters

Publishing rate of /camera/ (It seems the logging warnining No stream match for pointcloud chosen texture Process - Color is not a major issue #588):

pi@raspberrypi:~ $ rostopic hz /camera/color/image_raw
subscribed to [/camera/color/image_raw]
average rate: 29.869
	min: 0.027s max: 0.037s std dev: 0.00219s window: 28
average rate: 29.832
	min: 0.024s max: 0.038s std dev: 0.00232s window: 58
average rate: 29.854
	min: 0.024s max: 0.042s std dev: 0.00254s window: 88

Publishing rate of /camera/depth/image_rect_raw:

pi@raspberrypi:~ $ rostopic hz /camera/depth/image_rect_raw
subscribed to [/camera/depth/image_rect_raw]
average rate: 30.220
	min: 0.027s max: 0.042s std dev: 0.00275s window: 29
average rate: 30.129
	min: 0.024s max: 0.044s std dev: 0.00322s window: 59
average rate: 30.107
	min: 0.021s max: 0.045s std dev: 0.00371s window: 89

Publishing rate of /camera/depth/color/points:

pi@raspberrypi:~ $ rostopic hz /camera/depth/color/points
subscribed to [/camera/depth/color/points]
no new messages
no new messages
no new messages
no new messages

I tried again with filters and initial_reset arguments:

pi@raspberrypi:~ $ roslaunch realsense2_camera rs_camera.launch filters:=pointcloud initial_reset:=true
... logging to /home/pi/.ros/log/82d349de-db32-11ea-b21e-dca632bae7db/roslaunch-raspberrypi-3712.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://raspberrypi:38027/

SUMMARY
========

PARAMETERS
 * /camera/realsense2_camera/accel_fps: 250
 * /camera/realsense2_camera/accel_frame_id: camera_accel_frame
 * /camera/realsense2_camera/accel_optical_frame_id: camera_accel_opti...
 * /camera/realsense2_camera/align_depth: False
 * /camera/realsense2_camera/aligned_depth_to_color_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye1_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye2_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_infra1_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_infra2_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/allow_no_texture_points: False
 * /camera/realsense2_camera/base_frame_id: camera_link
 * /camera/realsense2_camera/calib_odom_file: 
 * /camera/realsense2_camera/clip_distance: -2.0
 * /camera/realsense2_camera/color_fps: 30
 * /camera/realsense2_camera/color_frame_id: camera_color_frame
 * /camera/realsense2_camera/color_height: 480
 * /camera/realsense2_camera/color_optical_frame_id: camera_color_opti...
 * /camera/realsense2_camera/color_width: 640
 * /camera/realsense2_camera/depth_fps: 30
 * /camera/realsense2_camera/depth_frame_id: camera_depth_frame
 * /camera/realsense2_camera/depth_height: 480
 * /camera/realsense2_camera/depth_optical_frame_id: camera_depth_opti...
 * /camera/realsense2_camera/depth_width: 640
 * /camera/realsense2_camera/device_type: 
 * /camera/realsense2_camera/enable_accel: False
 * /camera/realsense2_camera/enable_color: True
 * /camera/realsense2_camera/enable_depth: True
 * /camera/realsense2_camera/enable_fisheye1: False
 * /camera/realsense2_camera/enable_fisheye2: False
 * /camera/realsense2_camera/enable_fisheye: False
 * /camera/realsense2_camera/enable_gyro: False
 * /camera/realsense2_camera/enable_infra1: False
 * /camera/realsense2_camera/enable_infra2: False
 * /camera/realsense2_camera/enable_infra: False
 * /camera/realsense2_camera/enable_pointcloud: False
 * /camera/realsense2_camera/enable_pose: False
 * /camera/realsense2_camera/enable_sync: False
 * /camera/realsense2_camera/filters: pointcloud
 * /camera/realsense2_camera/fisheye1_frame_id: camera_fisheye1_f...
 * /camera/realsense2_camera/fisheye1_optical_frame_id: camera_fisheye1_o...
 * /camera/realsense2_camera/fisheye2_frame_id: camera_fisheye2_f...
 * /camera/realsense2_camera/fisheye2_optical_frame_id: camera_fisheye2_o...
 * /camera/realsense2_camera/fisheye_fps: 30
 * /camera/realsense2_camera/fisheye_frame_id: camera_fisheye_frame
 * /camera/realsense2_camera/fisheye_height: 480
 * /camera/realsense2_camera/fisheye_optical_frame_id: camera_fisheye_op...
 * /camera/realsense2_camera/fisheye_width: 640
 * /camera/realsense2_camera/gyro_fps: 400
 * /camera/realsense2_camera/gyro_frame_id: camera_gyro_frame
 * /camera/realsense2_camera/gyro_optical_frame_id: camera_gyro_optic...
 * /camera/realsense2_camera/imu_optical_frame_id: camera_imu_optica...
 * /camera/realsense2_camera/infra1_frame_id: camera_infra1_frame
 * /camera/realsense2_camera/infra1_optical_frame_id: camera_infra1_opt...
 * /camera/realsense2_camera/infra2_frame_id: camera_infra2_frame
 * /camera/realsense2_camera/infra2_optical_frame_id: camera_infra2_opt...
 * /camera/realsense2_camera/infra_fps: 30
 * /camera/realsense2_camera/infra_height: 480
 * /camera/realsense2_camera/infra_width: 640
 * /camera/realsense2_camera/initial_reset: True
 * /camera/realsense2_camera/json_file_path: 
 * /camera/realsense2_camera/linear_accel_cov: 0.01
 * /camera/realsense2_camera/odom_frame_id: camera_odom_frame
 * /camera/realsense2_camera/pointcloud_texture_index: 0
 * /camera/realsense2_camera/pointcloud_texture_stream: RS2_STREAM_COLOR
 * /camera/realsense2_camera/pose_frame_id: camera_pose_frame
 * /camera/realsense2_camera/pose_optical_frame_id: camera_pose_optic...
 * /camera/realsense2_camera/publish_odom_tf: True
 * /camera/realsense2_camera/publish_tf: True
 * /camera/realsense2_camera/rosbag_filename: 
 * /camera/realsense2_camera/serial_no: 
 * /camera/realsense2_camera/tf_publish_rate: 0.0
 * /camera/realsense2_camera/topic_odom_in: odom_in
 * /camera/realsense2_camera/unite_imu_method: 
 * /camera/realsense2_camera/usb_port_id: 
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES
  /camera/
    realsense2_camera (nodelet/nodelet)
    realsense2_camera_manager (nodelet/nodelet)

auto-starting new master
process[master]: started with pid [3722]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 82d349de-db32-11ea-b21e-dca632bae7db
process[rosout-1]: started with pid [3735]
started core service [/rosout]
process[camera/realsense2_camera_manager-2]: started with pid [3752]
process[camera/realsense2_camera-3]: started with pid [3753]
[ INFO] [1597082060.960018071]: Initializing nodelet with 4 worker threads.
[ INFO] [1597082061.099478405]: RealSense ROS v2.2.15
[ INFO] [1597082061.099563014]: Built with LibRealSense v2.36.0
[ INFO] [1597082061.099728011]: Running with LibRealSense v2.36.0
[ INFO] [1597082061.156721436]:  
[ INFO] [1597082061.548481089]: Device with serial number 950122061295 was found.

[ INFO] [1597082061.548576051]: Device with physical ID 2-2-4 was found.
[ INFO] [1597082061.548622624]: Device with name Intel RealSense D415 was found.
[ INFO] [1597082061.550248300]: Device with port number 2-2 was found.
[ INFO] [1597082061.550349724]: Resetting device...
[ INFO] [1597082067.752218783]:  
[ INFO] [1597082068.258678523]: Device with serial number 950122061295 was found.

[ INFO] [1597082068.258774707]: Device with physical ID 2-2-5 was found.
[ INFO] [1597082068.258817669]: Device with name Intel RealSense D415 was found.
[ INFO] [1597082068.259883688]: Device with port number 2-2 was found.
[ INFO] [1597082068.266766832]: getParameters...
[ INFO] [1597082068.566743388]: setupDevice...
[ INFO] [1597082068.566831331]: JSON file is not provided
[ INFO] [1597082068.566878441]: ROS Node Namespace: camera
[ INFO] [1597082068.566931255]: Device Name: Intel RealSense D415
[ INFO] [1597082068.566975051]: Device Serial No: 950122061295
[ INFO] [1597082068.567018772]: Device physical port: 2-2-5
[ INFO] [1597082068.567063919]: Device FW version: 05.12.06.00
[ INFO] [1597082068.567107993]: Device Product ID: 0x0AD3
[ INFO] [1597082068.567148603]: Enable PointCloud: On
[ INFO] [1597082068.567195417]: Align Depth: Off
[ INFO] [1597082068.567235176]: Sync Mode: On
[ INFO] [1597082068.567370988]: Device Sensors: 
[ INFO] [1597082068.676724134]: Stereo Module was found.
[ INFO] [1597082068.759554965]: RGB Camera was found.
[ INFO] [1597082068.759698722]: Add Filter: pointcloud
[ INFO] [1597082068.761842927]: num_filters: 1
[ INFO] [1597082068.761938851]: Setting Dynamic reconfig parameters.
[ INFO] [1597082074.194224720]: Done Setting Dynamic reconfig parameters.
[ INFO] [1597082074.199731759]: depth stream is enabled - width: 640, height: 480, fps: 30, Format: Z16
[ INFO] [1597082074.204513384]: color stream is enabled - width: 640, height: 480, fps: 30, Format: RGB8
[ INFO] [1597082074.204817712]: setupPublishers...
[ INFO] [1597082074.223964824]: Expected frequency for depth = 30.00000
[ INFO] [1597082074.807043477]: Expected frequency for color = 30.00000
[ INFO] [1597082074.951757509]: setupStreams...
[ INFO] [1597082075.058827366]: insert Depth to Stereo Module
[ INFO] [1597082075.059231100]: insert Color to RGB Camera
[ INFO] [1597082075.346181168]: SELECTED BASE:Depth, 0
[ INFO] [1597082075.406599235]: RealSense Node Is Up!
 10/08 13:54:35,486 WARNING [2872038416] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 10/08 13:54:35,614 WARNING [2872038416] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 10/08 13:54:35,675 WARNING [2872038416] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
[ERROR] [1597082108.198739114]: An error has occurred during frame callback: Error occured during execution of the processing block! See the log for more info
[ WARN] [1597082200.254952735]: No stream match for pointcloud chosen texture Process - Color
[ERROR] [1597082205.823174348]: An error has occurred during frame callback: Error occured during execution of the processing block! See the log for more info
[ERROR] [1597082398.505169076]: An error has occurred during frame callback: Error occured during execution of the processing block! See the log for more info
^C[camera/realsense2_camera_manager-2] killing on exit
[camera/realsense2_camera-3] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

Screenshot of Rviz:
relsense-ros-filters-initial_reset

Publishing rate of /camera/coor/image_raw:

pi@raspberrypi:~ $ rostopic hz /camera/color/image_raw
subscribed to [/camera/color/image_raw]
average rate: 29.967
	min: 0.030s max: 0.036s std dev: 0.00105s window: 28
average rate: 29.861
	min: 0.022s max: 0.060s std dev: 0.00476s window: 57
average rate: 29.793
	min: 0.022s max: 0.060s std dev: 0.00443s window: 87

Publishing rate of /camera/depth/image_rect_raw:

pi@raspberrypi:~ $ rostopic hz /camera/depth/image_rect_raw
subscribed to [/camera/depth/image_rect_raw]
average rate: 30.388
	min: 0.016s max: 0.042s std dev: 0.00430s window: 29
average rate: 30.218
	min: 0.016s max: 0.042s std dev: 0.00344s window: 59
average rate: 30.162
	min: 0.016s max: 0.043s std dev: 0.00325s window: 89

Publishing rate of /camera/depth/color/points:

pi@raspberrypi:~ $ rostopic hz /camera/depth/color/points
subscribed to [/camera/depth/color/points]
no new messages
no new messages
no new messages

@MartyG-RealSense
Copy link
Collaborator

Thanks so much for the detailed report! Are you satisfied with the results please, or do you need further assistance?

@yiyinglai
Copy link
Author

Hi @MartyG-RealSense , the problem persisted so I still need further assistance.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 10, 2020

It looks as though the color and depth images are being published in RViz. What is the remaining problem please - that there are still control_transfer returned warnings? Or that you are not achieving a point cloud? Thank you.

@yiyinglai
Copy link
Author

The problem is that there is no point cloud data in topic /camera/depth/color/points. My apology for the confusion.

@MartyG-RealSense
Copy link
Collaborator

Can you try using this launch term please:

roslaunch realsense2_camera rs_camera.launch filters:=pointcloud

and setting the Fixed Frame option in RViz to camera_link instead of base_link

https://github.com/IntelRealSense/realsense-ros#rgbd-point-cloud

@yiyinglai
Copy link
Author

Sure:
realsense-ros-filters-camera_link

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 10, 2020

Any luck if you Add a topic with the button at the bottom of the RViz options panel?

#302 (comment)

@yiyinglai
Copy link
Author

The topic for PointCloud2 in Rviz is /camera/depth/color/points, and it is indeed where the point cloud data is supposed to be published to.

The issue is not unable to visualize the point cloud topic in Rviz, but there is no data in point cloud topic. Notice this:

pi@raspberrypi:~ $ rostopic hz /camera/depth/color/points
subscribed to [/camera/depth/color/points]
no new messages
no new messages
no new messages

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 10, 2020

I researched the subject further. In the past there have been problems related to no data in camera/depth/color/points that are apparently related to the kernel. There were a number of cases where the data would not be generated with kernel 5.0. Here are a couple of examples:

#1047
#1077

Given that kernel 5.4 (which it looks as though you are using) is not yet officially supported by librealsense, I could not rule out a problem being related to it. I emphasise that I am not a ROS specialist though.

@yiyinglai
Copy link
Author

Thanks for pointing the direction to look into. Can you please keep this issue open? I will try with another kernel version and provide updates afterwards.

@MartyG-RealSense
Copy link
Collaborator

I will make a note here about keeping it open. Good luck!

@doronhi
Copy link
Contributor

doronhi commented Aug 12, 2020

The links @MartyG-RealSense mentions point to a timestamp issue.
Could you check the timestamps of the color and depth images. Use rostopic echo /camera/color/image_raw/header and rostopic echo /camera/depth/image_rect_raw/header. Try running in 2 separate terminals and see if the timestamps seem to match. Could you post a sample of them (say, 3-4 frames of each)?

@yiyinglai
Copy link
Author

Hi @dorodnic , I run two separate terminals and echoed those two topics, and here is what I got:
headers

The terminal on the left corresponds to rostopic echo /camera/color/image_raw/header and the one on the right rostopic echo /camera/depth/image_rect_raw/header. I tried to specify -n 4 for each command but I was afraid that switching between terminals will cause extra overhead, so I used the command without -n 4. The screenshot was taken while the commands were still running, so the output at the bottom should be the latest messages.

Can you help me interpret this result? Thanks!

@MartyG-RealSense
Copy link
Collaborator

@yiyinglai I think you meant to tag @doronhi :).

@yiyinglai
Copy link
Author

@MartyG-RealSense , thanks for pointing it out. @doronhi , @dorodnic I'm so sorry about the mistake.

@doronhi
Copy link
Contributor

doronhi commented Aug 13, 2020

Looking at the timestamps, I noticed that the color stream is published at 15Hz while depth stream is at 30Hz. If it was specified this way it should not have prevented the pointcloud from being created but since this is not what you specified in the launch file (according to the logs you posted previously) I wonder if the overload on your machine is not too great. Could you reduce the frame rate to 15 Hz in both streams and check again?

@yiyinglai
Copy link
Author

Indeed, I looked at the publishing frequencies of both topics if specified at 30 Hz. The publishing frequency of depth remains at 30 Hz while that of color dropped from 30 Hz to 17 Hz gradually.

I tried specifying both publishing frequencies to be 15 Hz, and here's the result:

pi@raspberrypi:~ $ roslaunch realsense2_camera rs_camera.launch filters:=pointcloud initial_reset:=true depth_fps:=15 color_fps:=15
... logging to /home/pi/.ros/log/6ba0533c-dd9a-11ea-836d-dca632bae7db/roslaunch-raspberrypi-4310.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://raspberrypi:42561/

SUMMARY
========

PARAMETERS
 * /camera/realsense2_camera/accel_fps: 250
 * /camera/realsense2_camera/accel_frame_id: camera_accel_frame
 * /camera/realsense2_camera/accel_optical_frame_id: camera_accel_opti...
 * /camera/realsense2_camera/align_depth: False
 * /camera/realsense2_camera/aligned_depth_to_color_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye1_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye2_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_infra1_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_infra2_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/allow_no_texture_points: False
 * /camera/realsense2_camera/base_frame_id: camera_link
 * /camera/realsense2_camera/calib_odom_file: 
 * /camera/realsense2_camera/clip_distance: -2.0
 * /camera/realsense2_camera/color_fps: 15
 * /camera/realsense2_camera/color_frame_id: camera_color_frame
 * /camera/realsense2_camera/color_height: 480
 * /camera/realsense2_camera/color_optical_frame_id: camera_color_opti...
 * /camera/realsense2_camera/color_width: 640
 * /camera/realsense2_camera/depth_fps: 15
 * /camera/realsense2_camera/depth_frame_id: camera_depth_frame
 * /camera/realsense2_camera/depth_height: 480
 * /camera/realsense2_camera/depth_optical_frame_id: camera_depth_opti...
 * /camera/realsense2_camera/depth_width: 640
 * /camera/realsense2_camera/device_type: 
 * /camera/realsense2_camera/enable_accel: False
 * /camera/realsense2_camera/enable_color: True
 * /camera/realsense2_camera/enable_depth: True
 * /camera/realsense2_camera/enable_fisheye1: False
 * /camera/realsense2_camera/enable_fisheye2: False
 * /camera/realsense2_camera/enable_fisheye: False
 * /camera/realsense2_camera/enable_gyro: False
 * /camera/realsense2_camera/enable_infra1: False
 * /camera/realsense2_camera/enable_infra2: False
 * /camera/realsense2_camera/enable_infra: False
 * /camera/realsense2_camera/enable_pointcloud: False
 * /camera/realsense2_camera/enable_pose: False
 * /camera/realsense2_camera/enable_sync: False
 * /camera/realsense2_camera/filters: pointcloud
 * /camera/realsense2_camera/fisheye1_frame_id: camera_fisheye1_f...
 * /camera/realsense2_camera/fisheye1_optical_frame_id: camera_fisheye1_o...
 * /camera/realsense2_camera/fisheye2_frame_id: camera_fisheye2_f...
 * /camera/realsense2_camera/fisheye2_optical_frame_id: camera_fisheye2_o...
 * /camera/realsense2_camera/fisheye_fps: 30
 * /camera/realsense2_camera/fisheye_frame_id: camera_fisheye_frame
 * /camera/realsense2_camera/fisheye_height: 480
 * /camera/realsense2_camera/fisheye_optical_frame_id: camera_fisheye_op...
 * /camera/realsense2_camera/fisheye_width: 640
 * /camera/realsense2_camera/gyro_fps: 400
 * /camera/realsense2_camera/gyro_frame_id: camera_gyro_frame
 * /camera/realsense2_camera/gyro_optical_frame_id: camera_gyro_optic...
 * /camera/realsense2_camera/imu_optical_frame_id: camera_imu_optica...
 * /camera/realsense2_camera/infra1_frame_id: camera_infra1_frame
 * /camera/realsense2_camera/infra1_optical_frame_id: camera_infra1_opt...
 * /camera/realsense2_camera/infra2_frame_id: camera_infra2_frame
 * /camera/realsense2_camera/infra2_optical_frame_id: camera_infra2_opt...
 * /camera/realsense2_camera/infra_fps: 30
 * /camera/realsense2_camera/infra_height: 480
 * /camera/realsense2_camera/infra_width: 640
 * /camera/realsense2_camera/initial_reset: True
 * /camera/realsense2_camera/json_file_path: 
 * /camera/realsense2_camera/linear_accel_cov: 0.01
 * /camera/realsense2_camera/odom_frame_id: camera_odom_frame
 * /camera/realsense2_camera/pointcloud_texture_index: 0
 * /camera/realsense2_camera/pointcloud_texture_stream: RS2_STREAM_COLOR
 * /camera/realsense2_camera/pose_frame_id: camera_pose_frame
 * /camera/realsense2_camera/pose_optical_frame_id: camera_pose_optic...
 * /camera/realsense2_camera/publish_odom_tf: True
 * /camera/realsense2_camera/publish_tf: True
 * /camera/realsense2_camera/rosbag_filename: 
 * /camera/realsense2_camera/serial_no: 
 * /camera/realsense2_camera/tf_publish_rate: 0.0
 * /camera/realsense2_camera/topic_odom_in: odom_in
 * /camera/realsense2_camera/unite_imu_method: 
 * /camera/realsense2_camera/usb_port_id: 
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES
  /camera/
    realsense2_camera (nodelet/nodelet)
    realsense2_camera_manager (nodelet/nodelet)

auto-starting new master
process[master]: started with pid [4320]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 6ba0533c-dd9a-11ea-836d-dca632bae7db
process[rosout-1]: started with pid [4333]
started core service [/rosout]
process[camera/realsense2_camera_manager-2]: started with pid [4350]
process[camera/realsense2_camera-3]: started with pid [4351]
[ INFO] [1597346592.025426731]: Initializing nodelet with 4 worker threads.
[ INFO] [1597346592.154490254]: RealSense ROS v2.2.15
[ INFO] [1597346592.154567067]: Built with LibRealSense v2.36.0
[ INFO] [1597346592.154632213]: Running with LibRealSense v2.36.0
[ INFO] [1597346592.215553019]:  
[ INFO] [1597346592.624536818]: Device with serial number 950122061295 was found.

[ INFO] [1597346592.624632241]: Device with physical ID 2-1-5 was found.
[ INFO] [1597346592.624674962]: Device with name Intel RealSense D415 was found.
[ INFO] [1597346592.626091945]: Device with port number 2-1 was found.
[ INFO] [1597346592.626195702]: Resetting device...
[ INFO] [1597346598.724537873]:  
[ INFO] [1597346599.222191424]: Device with serial number 950122061295 was found.

[ INFO] [1597346599.222376215]: Device with physical ID 2-1-6 was found.
[ INFO] [1597346599.222479953]: Device with name Intel RealSense D415 was found.
[ INFO] [1597346599.223593703]: Device with port number 2-1 was found.
[ INFO] [1597346599.230656451]: getParameters...
[ INFO] [1597346599.594188548]: setupDevice...
[ INFO] [1597346599.594278972]: JSON file is not provided
[ INFO] [1597346599.594539761]: ROS Node Namespace: camera
[ INFO] [1597346599.594780496]: Device Name: Intel RealSense D415
[ INFO] [1597346599.594971065]: Device Serial No: 950122061295
[ INFO] [1597346599.595162542]: Device physical port: 2-1-6
[ INFO] [1597346599.595338334]: Device FW version: 05.12.06.00
[ INFO] [1597346599.595393647]: Device Product ID: 0x0AD3
[ INFO] [1597346599.595682751]: Enable PointCloud: On
[ INFO] [1597346599.595852784]: Align Depth: Off
[ INFO] [1597346599.596023168]: Sync Mode: On
[ INFO] [1597346599.596284180]: Device Sensors: 
[ INFO] [1597346599.680871637]: Stereo Module was found.
[ INFO] [1597346599.767559022]: RGB Camera was found.
[ INFO] [1597346599.767929920]: Add Filter: pointcloud
[ INFO] [1597346599.770441171]: num_filters: 1
[ INFO] [1597346599.770688313]: Setting Dynamic reconfig parameters.
[ INFO] [1597346605.201642387]: Done Setting Dynamic reconfig parameters.
[ INFO] [1597346605.206593854]: depth stream is enabled - width: 640, height: 480, fps: 15, Format: Z16
[ INFO] [1597346605.212009568]: color stream is enabled - width: 640, height: 480, fps: 15, Format: RGB8
[ INFO] [1597346605.212285450]: setupPublishers...
[ INFO] [1597346605.233504041]: Expected frequency for depth = 15.00000
[ INFO] [1597346605.779340845]: Expected frequency for color = 15.00000
[ INFO] [1597346605.945585660]: setupStreams...
[ INFO] [1597346606.053317645]: insert Depth to Stereo Module
[ INFO] [1597346606.053440383]: insert Color to RGB Camera
[ INFO] [1597346606.368706462]: SELECTED BASE:Depth, 0
[ INFO] [1597346606.420949634]: RealSense Node Is Up!
 13/08 15:23:26,574 WARNING [2870989840] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 13/08 15:23:26,635 WARNING [2870989840] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 13/08 15:23:26,823 WARNING [2870989840] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 13/08 15:23:26,884 WARNING [2870989840] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
[ERROR] [1597346654.164631662]: An error has occurred during frame callback: Error occured during execution of the processing block! See the log for more info
^C[camera/realsense2_camera-3] killing on exit
[camera/realsense2_camera_manager-2] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

The publishing frequencies of both topics now remains steady:

pi@raspberrypi:~ $ rostopic hz /camera/depth/image_rect_raw
WARNING: topic [/camera/depth/image_rect_raw] does not appear to be published yet
subscribed to [/camera/depth/image_rect_raw]
average rate: 53.851
	min: 0.007s max: 0.030s std dev: 0.00822s window: 5
average rate: 17.919
	min: 0.007s max: 0.081s std dev: 0.02063s window: 20
average rate: 16.503
	min: 0.007s max: 0.081s std dev: 0.01655s window: 35
average rate: 16.013
	min: 0.007s max: 0.081s std dev: 0.01433s window: 50
average rate: 15.725
	min: 0.007s max: 0.081s std dev: 0.01285s window: 65
average rate: 15.589
	min: 0.007s max: 0.081s std dev: 0.01194s window: 80
average rate: 15.485
	min: 0.007s max: 0.081s std dev: 0.01110s window: 95
average rate: 15.409
	min: 0.007s max: 0.081s std dev: 0.01045s window: 110
average rate: 15.372
	min: 0.007s max: 0.081s std dev: 0.00997s window: 125
average rate: 15.320
	min: 0.007s max: 0.083s std dev: 0.00975s window: 140
average rate: 15.302
	min: 0.007s max: 0.083s std dev: 0.00932s window: 155
average rate: 15.283
	min: 0.007s max: 0.083s std dev: 0.00898s window: 170
average rate: 15.260
	min: 0.007s max: 0.083s std dev: 0.00864s window: 185
average rate: 15.239
	min: 0.007s max: 0.083s std dev: 0.00833s window: 200
average rate: 15.204
	min: 0.007s max: 0.088s std dev: 0.00833s window: 215
average rate: 15.202
	min: 0.007s max: 0.088s std dev: 0.00814s window: 230
average rate: 15.193
	min: 0.007s max: 0.088s std dev: 0.00795s window: 245
average rate: 15.182
	min: 0.007s max: 0.088s std dev: 0.00799s window: 260
^Caverage rate: 15.182
	min: 0.007s max: 0.088s std dev: 0.00798s window: 261
pi@raspberrypi:~ $ rostopic hz /camera/color/image_raw
WARNING: topic [/camera/color/image_raw] does not appear to be published yet
subscribed to [/camera/color/image_raw]
average rate: 17.492
	min: 0.045s max: 0.069s std dev: 0.01222s window: 3
average rate: 15.317
	min: 0.045s max: 0.076s std dev: 0.00633s window: 18
average rate: 15.115
	min: 0.045s max: 0.085s std dev: 0.00603s window: 33
average rate: 15.029
	min: 0.045s max: 0.085s std dev: 0.00616s window: 48
average rate: 14.992
	min: 0.045s max: 0.095s std dev: 0.00725s window: 63
average rate: 14.967
	min: 0.045s max: 0.095s std dev: 0.00694s window: 78
average rate: 14.929
	min: 0.045s max: 0.095s std dev: 0.00647s window: 93
average rate: 14.904
	min: 0.045s max: 0.095s std dev: 0.00625s window: 108
average rate: 14.922
	min: 0.045s max: 0.095s std dev: 0.00607s window: 123
average rate: 14.940
	min: 0.045s max: 0.095s std dev: 0.00612s window: 138
average rate: 14.934
	min: 0.045s max: 0.095s std dev: 0.00604s window: 153
average rate: 14.929
	min: 0.045s max: 0.095s std dev: 0.00587s window: 168
average rate: 14.922
	min: 0.045s max: 0.095s std dev: 0.00572s window: 182
average rate: 14.918
	min: 0.045s max: 0.095s std dev: 0.00553s window: 197
average rate: 14.910
	min: 0.043s max: 0.095s std dev: 0.00599s window: 212
average rate: 14.905
	min: 0.043s max: 0.095s std dev: 0.00593s window: 227
average rate: 14.905
	min: 0.043s max: 0.095s std dev: 0.00592s window: 242
^Caverage rate: 14.914
	min: 0.043s max: 0.095s std dev: 0.00590s window: 250
pi@raspberrypi:~ $ rostopic echo /camera/color/image_raw/header
seq: 251
stamp: 
  secs: 1597346654
  nsecs: 957410093
frame_id: "camera_color_optical_frame"
---
seq: 252
stamp: 
  secs: 1597346655
  nsecs:  39656204
frame_id: "camera_color_optical_frame"
---
seq: 253
stamp: 
  secs: 1597346655
  nsecs:  96956083
frame_id: "camera_color_optical_frame"
---
seq: 254
stamp: 
  secs: 1597346655
  nsecs: 168185668
frame_id: "camera_color_optical_frame"
---
seq: 255
stamp: 
  secs: 1597346655
  nsecs: 237381844
frame_id: "camera_color_optical_frame"
---
seq: 256
stamp: 
  secs: 1597346655
  nsecs: 291719227
frame_id: "camera_color_optical_frame"
---
seq: 257
stamp: 
  secs: 1597346655
  nsecs: 359919836
frame_id: "camera_color_optical_frame"
---
seq: 258
stamp: 
  secs: 1597346655
  nsecs: 430208521
frame_id: "camera_color_optical_frame"
---
seq: 259
stamp: 
  secs: 1597346655
  nsecs: 500921027
frame_id: "camera_color_optical_frame"
---
seq: 260
stamp: 
  secs: 1597346655
  nsecs: 565344774
frame_id: "camera_color_optical_frame"
---
seq: 261
stamp: 
  secs: 1597346655
  nsecs: 635242487
frame_id: "camera_color_optical_frame"
---
seq: 262
stamp: 
  secs: 1597346655
  nsecs: 702575434
frame_id: "camera_color_optical_frame"
---
seq: 263
stamp: 
  secs: 1597346655
  nsecs: 763258409
frame_id: "camera_color_optical_frame"
---
seq: 264
stamp: 
  secs: 1597346655
  nsecs: 835172347
frame_id: "camera_color_optical_frame"
---
seq: 265
stamp: 
  secs: 1597346655
  nsecs: 902650586
frame_id: "camera_color_optical_frame"
---
seq: 266
stamp: 
  secs: 1597346655
  nsecs: 970377968
frame_id: "camera_color_optical_frame"
---
seq: 267
stamp: 
  secs: 1597346656
  nsecs:  34476167
frame_id: "camera_color_optical_frame"
---
seq: 268
stamp: 
  secs: 1597346656
  nsecs: 100655070
frame_id: "camera_color_optical_frame"
---
seq: 269
stamp: 
  secs: 1597346656
  nsecs: 166564220
frame_id: "camera_color_optical_frame"
---
seq: 270
stamp: 
  secs: 1597346656
  nsecs: 232512296
frame_id: "camera_color_optical_frame"
---
seq: 271
stamp: 
  secs: 1597346656
  nsecs: 300315656
frame_id: "camera_color_optical_frame"
---
seq: 272
stamp: 
  secs: 1597346656
  nsecs: 366258750
frame_id: "camera_color_optical_frame"
---
seq: 273
stamp: 
  secs: 1597346656
  nsecs: 435674400
frame_id: "camera_color_optical_frame"
---
seq: 274
stamp: 
  secs: 1597346656
  nsecs: 500809090
frame_id: "camera_color_optical_frame"
---
seq: 275
stamp: 
  secs: 1597346656
  nsecs: 571697128
frame_id: "camera_color_optical_frame"
---
seq: 276
stamp: 
  secs: 1597346656
  nsecs: 635459891
frame_id: "camera_color_optical_frame"
---
seq: 277
stamp: 
  secs: 1597346656
  nsecs: 702739227
frame_id: "camera_color_optical_frame"
---
pi@raspberrypi:~ $ rostopic echo /camera/depth/image_rect_raw/header
seq: 262
stamp: 
  secs: 1597346654
  nsecs: 755139681
frame_id: "camera_depth_optical_frame"
---
seq: 263
stamp: 
  secs: 1597346654
  nsecs: 817377671
frame_id: "camera_depth_optical_frame"
---
seq: 264
stamp: 
  secs: 1597346654
  nsecs: 887209554
frame_id: "camera_depth_optical_frame"
---
seq: 265
stamp: 
  secs: 1597346654
  nsecs: 953027172
frame_id: "camera_depth_optical_frame"
---
seq: 266
stamp: 
  secs: 1597346655
  nsecs:  18886085
frame_id: "camera_depth_optical_frame"
---
seq: 267
stamp: 
  secs: 1597346655
  nsecs:  85080081
frame_id: "camera_depth_optical_frame"
---
seq: 268
stamp: 
  secs: 1597346655
  nsecs: 155082402
frame_id: "camera_depth_optical_frame"
---
seq: 269
stamp: 
  secs: 1597346655
  nsecs: 217051917
frame_id: "camera_depth_optical_frame"
---
seq: 270
stamp: 
  secs: 1597346655
  nsecs: 284931350
frame_id: "camera_depth_optical_frame"
---
seq: 271
stamp: 
  secs: 1597346655
  nsecs: 356166343
frame_id: "camera_depth_optical_frame"
---
seq: 272
stamp: 
  secs: 1597346655
  nsecs: 419664873
frame_id: "camera_depth_optical_frame"
---
seq: 273
stamp: 
  secs: 1597346655
  nsecs: 484880024
frame_id: "camera_depth_optical_frame"
---
seq: 274
stamp: 
  secs: 1597346655
  nsecs: 552601017
frame_id: "camera_depth_optical_frame"
---
seq: 275
stamp: 
  secs: 1597346655
  nsecs: 619181373
frame_id: "camera_depth_optical_frame"
---
seq: 276
stamp: 
  secs: 1597346655
  nsecs: 683958092
frame_id: "camera_depth_optical_frame"
---
seq: 277
stamp: 
  secs: 1597346655
  nsecs: 751374741
frame_id: "camera_depth_optical_frame"
---
seq: 278
stamp: 
  secs: 1597346655
  nsecs: 817809397
frame_id: "camera_depth_optical_frame"
---
seq: 279
stamp: 
  secs: 1597346655
  nsecs: 882742741
frame_id: "camera_depth_optical_frame"
---
seq: 280
stamp: 
  secs: 1597346655
  nsecs: 951061459
frame_id: "camera_depth_optical_frame"
---
seq: 281
stamp: 
  secs: 1597346656
  nsecs:  21476695
frame_id: "camera_depth_optical_frame"
---
seq: 282
stamp: 
  secs: 1597346656
  nsecs:  83458468
frame_id: "camera_depth_optical_frame"
---
seq: 283
stamp: 
  secs: 1597346656
  nsecs: 148993165
frame_id: "camera_depth_optical_frame"
---
seq: 284
stamp: 
  secs: 1597346656
  nsecs: 216782118
frame_id: "camera_depth_optical_frame"
---
seq: 285
stamp: 
  secs: 1597346656
  nsecs: 284205321
frame_id: "camera_depth_optical_frame"
---
seq: 286
stamp: 
  secs: 1597346656
  nsecs: 349974827
frame_id: "camera_depth_optical_frame"
---
seq: 287
stamp: 
  secs: 1597346656
  nsecs: 417036114
frame_id: "camera_depth_optical_frame"
---
seq: 288
stamp: 
  secs: 1597346656
  nsecs: 484964878
frame_id: "camera_depth_optical_frame"
---
seq: 289
stamp: 
  secs: 1597346656
  nsecs: 553302298
frame_id: "camera_depth_optical_frame"
---
seq: 290
stamp: 
  secs: 1597346656
  nsecs: 616397838
frame_id: "camera_depth_optical_frame"
---
seq: 291
stamp: 
  secs: 1597346656
  nsecs: 683114782
frame_id: "camera_depth_optical_frame"
---
seq: 292
stamp: 
  secs: 1597346656
  nsecs: 749626028
frame_id: "camera_depth_optical_frame"
---
seq: 293
stamp: 
  secs: 1597346656
  nsecs: 816385100
frame_id: "camera_depth_optical_frame"
---
seq: 294
stamp: 
  secs: 1597346656
  nsecs: 883276040
frame_id: "camera_depth_optical_frame"
---
seq: 295
stamp: 
  secs: 1597346656
  nsecs: 953538890
frame_id: "camera_depth_optical_frame"
---
seq: 296
stamp: 
  secs: 1597346657
  nsecs:  17685384
frame_id: "camera_depth_optical_frame"
---

@yiyinglai
Copy link
Author

I then checked running realsense-viewer and the resolution are 1280X720 and frame rate 30 Hz. Both parameters are higer than 640X480 and 15 Hz when launching rs_camera, so maybe this is not related to the processing power of Raspberry Pi?

I found out there is erroneous timestamp even in realsense-viewer: the timestamp of depth stream in this screenshot is negative.
realsense-viewer

@MartyG-RealSense
Copy link
Collaborator

@yiyinglai I believe that there are differences between how librealsense handles the camera and how the RealSense ROS wrapper handles it. So in ROS cases, it will often be reported that the camera is working fine in librealsense programs such as the RealSense Viewer, but may be encountering problems with streaming in the ROS wrapper. Also, changes made by the user in librealsense programs such as the Viewer do not affect the camera's behavior in the ROS wrapper, and vice versa.

So I would advise against comparing the Viewer with the ROS wrapper like-for-like, as they are "apples and oranges" - not directly comparable because of the different ways in which they work.

Your mention of the color FPS dropping from 30 to 17 over time reminds me of a phenomenon that I have heard of before that was related to changes in the environmental lighting causing a drag to be imposed on the camera's FPS. Dorodnic the RealSense SDK Manager has said that FPS can be affected by auto-exposure of RGB if the scene is dark. Is your scene well-lit, please?

@yiyinglai
Copy link
Author

@MartyG-RealSense thanks for the explanation.

The scene was not dark. I have another laptop beside the Raspberry Pi, and realsense-ros worked well on that laptop, so environmental lighting is unlikely the cause in this case.

@doronhi
Copy link
Contributor

doronhi commented Aug 14, 2020

The issue seems to be related to the timestamp. Could you check if the other timestamps shown in the realsense-viewer behave correctly? Specifically frame-timestamp but take a look at all of them. Maybe you can post 3-4 images showing the progress. We can tell how much really passed according to the progress of "frame counter".

In realsense-viewer: "stereo module"->controls->Global Time enabled: change to false. Is the "Frame timestamp" now seem to advance properly?

@MartyG-RealSense
Copy link
Collaborator

@doronhi Thanks so much for your reply, we were both answering at the same time. I had just ran some tests of the RGB mode with my own D415 in the Viewer and compared the metadata to the image kindly provided by @yiyinglai . They were almost the same, except in two respects. I was receiving a Hardware FPS and a Backend Timestamp, whilst these values were both zero in the image of @yiyinglai . This does suggest a problem with the metadata.

image

@doronhi
Copy link
Contributor

doronhi commented Aug 14, 2020

Thanks, @MartyG-RealSense. I had the issue you describe once and I seem to remember it was an installation issue. Probably something with kernel patches, but I don't remember. Can you describe how you managed to create that situation and solve it on your machine?

@yiyinglai
Copy link
Author

@doronhi @MartyG-RealSense I started building everthing again before you commented. This time with kernel 4.19 since I saw some one manged to use realsense-ros with kernel 4.19.

I will update the result afterwards.

@MartyG-RealSense
Copy link
Collaborator

@yiyinglai Thanks, we look forward to the results.

@yiyinglai
Copy link
Author

@doronhi @MartyG-RealSense Hi, thanks for your patience. I tried several times but still wasn't able to get librealsense or realsense-ros working with kernel 4.19 because opencv3 was not working either (I believe librealsense and realsense-ros has some dependencies on opencv).

After switching back to the original setup (I have a backup image, so everthing is exactly the same), I followed @doronhi 's instruciton and disabled Global Time Enabled, and here is the result:
realsense-viewer-GlobalTimeDisabled

This time, the Frame Timestamp entry are always positive and the readings seems correct. Hareware FPS has non-zeros readings now but Backend Timestamp are still zeros.

@MartyG-RealSense
Copy link
Collaborator

Hi @yiyinglai Kernel 4.19 is not officially supported by librealsense. After 4.18, the list of officially supported kernels goes to 5.0 and then 5.3. A kernel not being on the list does not necessarily prevent it from working with libreaksense (5.4 works, even though it is not yet officially validated) but I thought that I should mention it.

@yiyinglai
Copy link
Author

yiyinglai commented Aug 19, 2020

I managed to install opencv-3.4.2 successfully last night and librealsense with kernel 4.19.
realsense-viewer performed similarly to when built with kernel 5.4.

Global Time Enabled
realsense-viewer-kernel-4 19-GlobalTimeEnabled
Global Time Disabled
realsense-viewer-kernel-4 19-GlobalTimeDisabled

Is Backend Timestamp the reason I couldn't get point cloud data in ROS?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 19, 2020

Have you checked whether a point cloud is now visible in RViz, please?

I researched your question above carefully. There was a RealSense user with timestamp problems who fixed it by adding the line below to their launch file - no harm in trying it.

<arg name="filters" default="pointcloud"/>

Other than that I do not have an answer I would feel confident enough in to provide, so I defer back to @doronhi regarding your query about the effect of the backend timestamp on ROS point clouds.

@yiyinglai
Copy link
Author

Hi @MartyG-RealSense , thanks for your comment. The effect of adding <arg name="filters" default="pointcloud"/> to the launch file is the same as specifying it in the launch command with filters:=pointcloud.

I cannot see the point cloud in Rviz, because there is still no data in topic /camera/depth/color/points.

@MartyG-RealSense
Copy link
Collaborator

I did further research and located another case where the backend timestamp was 0 in the Viewer.

IntelRealSense/librealsense#5212

The RealSense team member who replied in that case said that the global timestamp is not affected by the state of the backend timestamp.

Building with RSUSB backend = on (as you indicated that you have done at the start of this case) gives good metadata support, so it is unusual that you are experiencing this problem with a backend timestamp of 0.

The RSUSB installation process is also not dependent on kernel versions or Linux versions and doesn't require patching. I have heard of problems occurring when patching has been applied after an RSUSB backend = On installation was done (because patching is not needed with this method). Can you confirm please whether or not you patched the installation after completing the install with RSUSB, please? If you did patch it, I would recommend doing another build of librealsense with RSUSB but not patching it afterward.

@yiyinglai
Copy link
Author

I confirm that I build librealsense with FORCE_RSUSB_BACKEND=ON and did not patch the kernels afterwards.

@kektobiologist
Copy link

Hi
I'm facing the same issue. depth and color images are published, but no data on point cloud topic. I can view pointcloud in realsense-viewer
System: Linux raspberrypi 5.4.51-v7l+ #1333 SMP Mon Aug 10 16:51:40 BST 2020 armv7l GNU/Linux
OS: Raspbian Buster
ROS distro: melodic
Camera: D435i

  1. Name: Intel RealSense D435i, firmware version: 05.12.06.00, USB type: 3.2
    USB cable: official cable
    librealsense 2.37.0 built with ros catkin command (which just calls cmake and make)
    sudo ./src/catkin/bin/catkin_make_isolated --pkg librealsense2 --install -DFORCE_LIBUVC=true -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/melodic

I am also getting a 0 in Backend Timestamp

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 21, 2020

Hi @yiyinglai and @korroktheslavemaster The next thing you could try is downgrading your firmware from 5.12.6 to 5.12.5. You can perform this action in the RealSense Viewer.

STEP ONE
Download firmware 5.12.5 from the firmware releases page in the link below.

https://dev.intelrealsense.com/docs/firmware-releases

STEP TWO
Launch the RealSense Viewer. Go to the More option at the top of the Viewer's options side-panel. Select the Update Firmware option from its menu and select the firmware file that you downloaded.

image

@yiyinglai
Copy link
Author

yiyinglai commented Aug 24, 2020

Hi @MartyG-RealSense I tried librealsense 2.36.0 and firmware 5.12.05.
realsense-viewer-2 36 0-firmware-5 12 05

And also librealsense 2.35.0 and firmware 5.12.05. In this case, the metadata overlay didn't show up for depth stream.
realsense-viewer-2 35 0-firmware-5 12 05

@korroktheslavemaster any luck on your end?

@MartyG-RealSense
Copy link
Collaborator

Hi @yiyinglai Do you require further assistance with this case, please? Thanks!

@yiyinglai
Copy link
Author

@MartyG-RealSense Yes, the problem still exists.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Sep 4, 2020

Hi @yiyinglai I went through the case step by step from the beginning and made notes, to try to work out the key points of the case so far.

  • The pointcloud2 topics do not publish data, stating "No new messages". Color and depth do publish data on their topics though.
  • There are some control_transfer returned errors on launch. Your process-killing exit is not due to a crash though, as you exited manually yourself after a period of up to 12 minutes. This is presumably why color and depth were able to be successfully published in RViz.
  • You experience the problem of negative / zero timestamps when using the camera in the Viewer.
  • You have tried it with both Kernel 5.4 and kernel 4.19 and have had the same problems with both kernels.

I am wondering if use of the Raspbian OS is one of the complicating factors.

Regarding this error in logs posted earlier: An error has occurred during frame callback: Error occurred during execution of the processing block!

@doronhi has previously said about it in another case: "From what I understand, the problem is that the filters don't keep up with the frames, due to computer load. A new image cannot be pushed to the still full queue and therefore it is missing when the filter is called to process it. Then the exception is issued".

@justinIRBT
Copy link

FYI I have the same issue using the realsense_ros driver (with ros2 eloquent branch) on Raspberry Pi 4 using Rasbian Buster OS as discussed in the case here intel/ros2_intel_realsense#147 (as you can see from the comments, we switched from ros2 driver to this driver's ros2 branch based on suggestion from @doronhi ). It remains unresolved, but I was able to unblock myself by writing my own realsense node based on librealsense2, which is working fine (I used the rs-pointcloud as a starting point.) I would prefer to be using the official driver and all the configuration options it exposes, so I am still interested in a resolution.

@MartyG-RealSense
Copy link
Collaborator

@yiyinglai and @justinIRBT Can you confirm that the problem still exists for you? Thanks very much.

@justinIRBT
Copy link

Yes, it still exists

@MartyG-RealSense
Copy link
Collaborator

I have been over the entire case from the beginning again but have not been able to find much that has not already been looked at or linked to. Possibly one of the existing cases that has already been looked at has a useful clue if looked at with a fresh perspective.

I did find one case with similar symptoms to this one (especially in regard to 'no new messages' from the /camera/depth/color/points topic) that has not been linked to in this discussion yet.

#1071

@yiyinglai
Copy link
Author

Hi @MartyG-RealSense , I am using the camera with a laptop and probably wouldn't use it with Raspberry Pi 4 afterwards. Thanks for your help. Please feel free to close this issue.

@MartyG-RealSense
Copy link
Collaborator

Okay, thanks very much @yiyinglai

@dgrnbrg
Copy link

dgrnbrg commented Jul 5, 2021

I am also encountering this issue, and I believe I can contribute in the debugging of it: I think that the pointcloud filter is doing something similar to the align_depth filter. That filter runs at around 2-3 FPS on a raspberry pi, and as a result, we see the queue backing up & preventing the system from making progress as @doronhi commented above.

@dispectra
Copy link

dispectra commented Jul 13, 2021

I am also encountering this issue, that is: it works fine when opened with realsense-viewer, but no message published at /camera/depth/color/points when launched using roslaunch realsense2_camera demo_pointcloud.launch.

I use Raspberry Pi 4B 8GB, ROS Noetic, Ubuntu 20.04. Kernel 5.4.0-1038-raspi. The camera is Intel RealSense D415.

My workaround was decreasing the fps in the launch file. For the argument depth_fps and color_fps, I set it to 6 (the default was 30) (Why 6? cf). It then just works, the message published in /camera/depth/color/points, and when checked with rostopic hz /camera/depth/color/points, the average rate was 5.408 Hz.

tldr; it works when I decrease the fps to 6.

@MartyG-RealSense
Copy link
Collaborator

Thanks very much @dispectra for sharing the details of the workaround method that worked for you!

I would add that if users of the D455 camera model wish to try your method in future, they should set FPS to 5, as 6 is not supported as an FPS mode on D455.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants