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

control_transfer returned error, index: 768, error: No data available, number: 61 #2425

Closed
PhilipAmadasun opened this issue Jul 26, 2022 · 28 comments
Labels

Comments

@PhilipAmadasun
Copy link

trying to get d435i camera to work with turtlebot2. For some reason the '/scan' does not get any data. This is what I get when I roslaunch turtlebot_navigation gmapping_demo.launch:

PARAMETERS
 * /camera/realsense2_camera/accel_fps: -1
 * /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: -1
 * /camera/realsense2_camera/color_frame_id: camera_color_frame
 * /camera/realsense2_camera/color_height: -1
 * /camera/realsense2_camera/color_optical_frame_id: camera_color_opti...
 * /camera/realsense2_camera/color_width: -1
 * /camera/realsense2_camera/confidence_fps: -1
 * /camera/realsense2_camera/confidence_height: -1
 * /camera/realsense2_camera/confidence_width: -1
 * /camera/realsense2_camera/depth_fps: -1
 * /camera/realsense2_camera/depth_frame_id: camera_depth_frame
 * /camera/realsense2_camera/depth_height: -1
 * /camera/realsense2_camera/depth_optical_frame_id: camera_depth_opti...
 * /camera/realsense2_camera/depth_width: -1
 * /camera/realsense2_camera/device_type: 
 * /camera/realsense2_camera/enable_accel: False
 * /camera/realsense2_camera/enable_color: True
 * /camera/realsense2_camera/enable_confidence: 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: 
 * /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: -1
 * /camera/realsense2_camera/fisheye_frame_id: camera_fisheye_frame
 * /camera/realsense2_camera/fisheye_height: -1
 * /camera/realsense2_camera/fisheye_optical_frame_id: camera_fisheye_op...
 * /camera/realsense2_camera/fisheye_width: -1
 * /camera/realsense2_camera/gyro_fps: -1
 * /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_rgb: False
 * /camera/realsense2_camera/infra_width: 848
 * /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/ordered_pc: False
 * /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/stereo_module/exposure/1: 7500
 * /camera/realsense2_camera/stereo_module/exposure/2: 1
 * /camera/realsense2_camera/stereo_module/gain/1: 16
 * /camera/realsense2_camera/stereo_module/gain/2: 16
 * /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: 
 * /depthimage_to_laserscan/output_frame_id: camera_depth_frame
 * /depthimage_to_laserscan/range_min: 0.45
 * /depthimage_to_laserscan/scan_height: 10
 * /move_base/DWAPlannerROS/acc_lim_theta: 2.0
 * /move_base/DWAPlannerROS/acc_lim_x: 1.0
 * /move_base/DWAPlannerROS/acc_lim_y: 0.0
 * /move_base/DWAPlannerROS/forward_point_distance: 0.325
 * /move_base/DWAPlannerROS/global_frame_id: odom
 * /move_base/DWAPlannerROS/goal_distance_bias: 24.0
 * /move_base/DWAPlannerROS/max_rot_vel: 5.0
 * /move_base/DWAPlannerROS/max_scaling_factor: 0.2
 * /move_base/DWAPlannerROS/max_trans_vel: 0.5
 * /move_base/DWAPlannerROS/max_vel_x: 0.5
 * /move_base/DWAPlannerROS/max_vel_y: 0.0
 * /move_base/DWAPlannerROS/min_rot_vel: 0.4
 * /move_base/DWAPlannerROS/min_trans_vel: 0.1
 * /move_base/DWAPlannerROS/min_vel_x: 0.0
 * /move_base/DWAPlannerROS/min_vel_y: 0.0
 * /move_base/DWAPlannerROS/occdist_scale: 0.5
 * /move_base/DWAPlannerROS/oscillation_reset_dist: 0.05
 * /move_base/DWAPlannerROS/path_distance_bias: 64.0
 * /move_base/DWAPlannerROS/publish_cost_grid_pc: True
 * /move_base/DWAPlannerROS/publish_traj_pc: True
 * /move_base/DWAPlannerROS/rot_stopped_vel: 0.4
 * /move_base/DWAPlannerROS/scaling_speed: 0.25
 * /move_base/DWAPlannerROS/sim_time: 1.0
 * /move_base/DWAPlannerROS/stop_time_buffer: 0.2
 * /move_base/DWAPlannerROS/trans_stopped_vel: 0.1
 * /move_base/DWAPlannerROS/vtheta_samples: 20
 * /move_base/DWAPlannerROS/vx_samples: 6
 * /move_base/DWAPlannerROS/vy_samples: 1
 * /move_base/DWAPlannerROS/xy_goal_tolerance: 0.15
 * /move_base/DWAPlannerROS/yaw_goal_tolerance: 0.3
 * /move_base/GlobalPlanner/allow_unknown: True
 * /move_base/GlobalPlanner/cost_factor: 3.0
 * /move_base/GlobalPlanner/default_tolerance: 0.0
 * /move_base/GlobalPlanner/lethal_cost: 253
 * /move_base/GlobalPlanner/neutral_cost: 50
 * /move_base/GlobalPlanner/old_navfn_behavior: False
 * /move_base/GlobalPlanner/planner_costmap_publish_frequency: 0.0
 * /move_base/GlobalPlanner/planner_window_x: 0.0
 * /move_base/GlobalPlanner/planner_window_y: 0.0
 * /move_base/GlobalPlanner/publish_potential: True
 * /move_base/GlobalPlanner/publish_scale: 100
 * /move_base/GlobalPlanner/use_dijkstra: True
 * /move_base/GlobalPlanner/use_grid_path: False
 * /move_base/GlobalPlanner/use_quadratic: True
 * /move_base/NavfnROS/allow_unknown: False
 * /move_base/NavfnROS/default_tolerance: 0.0
 * /move_base/NavfnROS/planner_window_x: 0.0
 * /move_base/NavfnROS/planner_window_y: 0.0
 * /move_base/NavfnROS/visualize_potential: False
 * /move_base/base_global_planner: navfn/NavfnROS
 * /move_base/base_local_planner: dwa_local_planner...
 * /move_base/controller_frequency: 5.0
 * /move_base/controller_patience: 3.0
 * /move_base/global_costmap/global_frame: map
 * /move_base/global_costmap/inflation_layer/cost_scaling_factor: 5.0
 * /move_base/global_costmap/inflation_layer/enabled: True
 * /move_base/global_costmap/inflation_layer/inflation_radius: 0.5
 * /move_base/global_costmap/map_type: voxel
 * /move_base/global_costmap/max_obstacle_height: 0.6
 * /move_base/global_costmap/obstacle_layer/bump/clearing: False
 * /move_base/global_costmap/obstacle_layer/bump/data_type: PointCloud2
 * /move_base/global_costmap/obstacle_layer/bump/marking: True
 * /move_base/global_costmap/obstacle_layer/bump/max_obstacle_height: 0.15
 * /move_base/global_costmap/obstacle_layer/bump/min_obstacle_height: 0.0
 * /move_base/global_costmap/obstacle_layer/bump/topic: mobile_base/senso...
 * /move_base/global_costmap/obstacle_layer/combination_method: 1
 * /move_base/global_costmap/obstacle_layer/enabled: True
 * /move_base/global_costmap/obstacle_layer/mark_threshold: 0
 * /move_base/global_costmap/obstacle_layer/max_obstacle_height: 0.6
 * /move_base/global_costmap/obstacle_layer/observation_sources: scan bump
 * /move_base/global_costmap/obstacle_layer/obstacle_range: 2.5
 * /move_base/global_costmap/obstacle_layer/origin_z: 0.0
 * /move_base/global_costmap/obstacle_layer/publish_voxel_map: False
 * /move_base/global_costmap/obstacle_layer/raytrace_range: 3.0
 * /move_base/global_costmap/obstacle_layer/scan/clearing: True
 * /move_base/global_costmap/obstacle_layer/scan/data_type: LaserScan
 * /move_base/global_costmap/obstacle_layer/scan/marking: True
 * /move_base/global_costmap/obstacle_layer/scan/max_obstacle_height: 0.35
 * /move_base/global_costmap/obstacle_layer/scan/min_obstacle_height: 0.25
 * /move_base/global_costmap/obstacle_layer/scan/topic: scan
 * /move_base/global_costmap/obstacle_layer/track_unknown_space: True
 * /move_base/global_costmap/obstacle_layer/unknown_threshold: 15
 * /move_base/global_costmap/obstacle_layer/z_resolution: 0.2
 * /move_base/global_costmap/obstacle_layer/z_voxels: 2
 * /move_base/global_costmap/plugins: [{'type': 'costma...
 * /move_base/global_costmap/publish_frequency: 0.5
 * /move_base/global_costmap/robot_base_frame: base_footprint
 * /move_base/global_costmap/robot_radius: 0.2
 * /move_base/global_costmap/static_layer/enabled: True
 * /move_base/global_costmap/static_map: True
 * /move_base/global_costmap/transform_tolerance: 0.5
 * /move_base/global_costmap/update_frequency: 1.0
 * /move_base/local_costmap/global_frame: odom
 * /move_base/local_costmap/height: 4.0
 * /move_base/local_costmap/inflation_layer/cost_scaling_factor: 5.0
 * /move_base/local_costmap/inflation_layer/enabled: True
 * /move_base/local_costmap/inflation_layer/inflation_radius: 0.5
 * /move_base/local_costmap/map_type: voxel
 * /move_base/local_costmap/max_obstacle_height: 0.6
 * /move_base/local_costmap/obstacle_layer/bump/clearing: False
 * /move_base/local_costmap/obstacle_layer/bump/data_type: PointCloud2
 * /move_base/local_costmap/obstacle_layer/bump/marking: True
 * /move_base/local_costmap/obstacle_layer/bump/max_obstacle_height: 0.15
 * /move_base/local_costmap/obstacle_layer/bump/min_obstacle_height: 0.0
 * /move_base/local_costmap/obstacle_layer/bump/topic: mobile_base/senso...
 * /move_base/local_costmap/obstacle_layer/combination_method: 1
 * /move_base/local_costmap/obstacle_layer/enabled: True
 * /move_base/local_costmap/obstacle_layer/mark_threshold: 0
 * /move_base/local_costmap/obstacle_layer/max_obstacle_height: 0.6
 * /move_base/local_costmap/obstacle_layer/observation_sources: scan bump
 * /move_base/local_costmap/obstacle_layer/obstacle_range: 2.5
 * /move_base/local_costmap/obstacle_layer/origin_z: 0.0
 * /move_base/local_costmap/obstacle_layer/publish_voxel_map: False
 * /move_base/local_costmap/obstacle_layer/raytrace_range: 3.0
 * /move_base/local_costmap/obstacle_layer/scan/clearing: True
 * /move_base/local_costmap/obstacle_layer/scan/data_type: LaserScan
 * /move_base/local_costmap/obstacle_layer/scan/marking: True
 * /move_base/local_costmap/obstacle_layer/scan/max_obstacle_height: 0.35
 * /move_base/local_costmap/obstacle_layer/scan/min_obstacle_height: 0.25
 * /move_base/local_costmap/obstacle_layer/scan/topic: scan
 * /move_base/local_costmap/obstacle_layer/track_unknown_space: True
 * /move_base/local_costmap/obstacle_layer/unknown_threshold: 15
 * /move_base/local_costmap/obstacle_layer/z_resolution: 0.2
 * /move_base/local_costmap/obstacle_layer/z_voxels: 2
 * /move_base/local_costmap/plugins: [{'type': 'costma...
 * /move_base/local_costmap/publish_frequency: 2.0
 * /move_base/local_costmap/resolution: 0.05
 * /move_base/local_costmap/robot_base_frame: base_footprint
 * /move_base/local_costmap/robot_radius: 0.2
 * /move_base/local_costmap/rolling_window: True
 * /move_base/local_costmap/static_layer/enabled: True
 * /move_base/local_costmap/static_map: False
 * /move_base/local_costmap/transform_tolerance: 0.5
 * /move_base/local_costmap/update_frequency: 5.0
 * /move_base/local_costmap/width: 4.0
 * /move_base/oscillation_distance: 0.2
 * /move_base/oscillation_timeout: 10.0
 * /move_base/planner_frequency: 1.0
 * /move_base/planner_patience: 5.0
 * /move_base/shutdown_costmaps: False
 * /navigation_velocity_smoother/accel_lim_v: 1.0
 * /navigation_velocity_smoother/accel_lim_w: 2.0
 * /navigation_velocity_smoother/decel_factor: 1.5
 * /navigation_velocity_smoother/frequency: 20.0
 * /navigation_velocity_smoother/robot_feedback: 2
 * /navigation_velocity_smoother/speed_lim_v: 0.8
 * /navigation_velocity_smoother/speed_lim_w: 5.4
 * /rosdistro: kinetic
 * /rosversion: 1.12.17
 * /slam_gmapping/angularUpdate: 0.436
 * /slam_gmapping/astep: 0.05
 * /slam_gmapping/base_frame: base_footprint
 * /slam_gmapping/delta: 0.05
 * /slam_gmapping/iterations: 5
 * /slam_gmapping/kernelSize: 1
 * /slam_gmapping/lasamplerange: 0.005
 * /slam_gmapping/lasamplestep: 0.005
 * /slam_gmapping/linearUpdate: 0.5
 * /slam_gmapping/llsamplerange: 0.01
 * /slam_gmapping/llsamplestep: 0.01
 * /slam_gmapping/lsigma: 0.075
 * /slam_gmapping/lskip: 0
 * /slam_gmapping/lstep: 0.05
 * /slam_gmapping/map_update_interval: 5.0
 * /slam_gmapping/maxRange: 8.0
 * /slam_gmapping/maxUrange: 6.0
 * /slam_gmapping/minimumScore: 200
 * /slam_gmapping/odom_frame: odom
 * /slam_gmapping/ogain: 3.0
 * /slam_gmapping/particles: 80
 * /slam_gmapping/resampleThreshold: 0.5
 * /slam_gmapping/sigma: 0.05
 * /slam_gmapping/srr: 0.01
 * /slam_gmapping/srt: 0.02
 * /slam_gmapping/str: 0.01
 * /slam_gmapping/stt: 0.02
 * /slam_gmapping/temporalUpdate: -1.0
 * /slam_gmapping/xmax: 1.0
 * /slam_gmapping/xmin: -1.0
 * /slam_gmapping/ymax: 1.0
 * /slam_gmapping/ymin: -1.0

NODES
  /camera/
    realsense2_camera (nodelet/nodelet)
    realsense2_camera_manager (nodelet/nodelet)
  /
    depthimage_to_laserscan (nodelet/nodelet)
    kobuki_safety_controller (nodelet/nodelet)
    move_base (move_base/move_base)
    navigation_velocity_smoother (nodelet/nodelet)
    slam_gmapping (gmapping/slam_gmapping)

ROS_MASTER_URI=http://10.130.184.118:11311

process[camera/realsense2_camera_manager-1]: started with pid [21986]
process[camera/realsense2_camera-2]: started with pid [21987]
process[depthimage_to_laserscan-3]: started with pid [21988]
process[slam_gmapping-4]: started with pid [21994]
process[navigation_velocity_smoother-5]: started with pid [22003]
process[kobuki_safety_controller-6]: started with pid [22020]
process[move_base-7]: started with pid [22038]
[ INFO] [1658795584.151521247]: Initializing nodelet with 8 worker threads.
[ INFO] [1658795584.200693690]: RealSense ROS v2.3.0
[ INFO] [1658795584.200723333]: Built with LibRealSense v2.45.0
[ INFO] [1658795584.200736822]: Running with LibRealSense v2.45.0
[ INFO] [1658795584.237538076]:  
[ INFO] [1658795584.476317736]: Using plugin "static_layer"
[ INFO] [1658795584.485368871]: Requesting the map...
[ INFO] [1658795584.494920227]: Device with serial number 035422071769 was found.

[ INFO] [1658795584.494957601]: Device with physical ID 2-2-3 was found.
[ INFO] [1658795584.494972220]: Device with name Intel RealSense D435I was found.
[ INFO] [1658795584.495534862]: Device with port number 2-2 was found.
[ INFO] [1658795584.495563040]: Device USB type: 3.2
[ INFO] [1658795584.497784613]: getParameters...
[ INFO] [1658795584.560551112]: setupDevice...
[ INFO] [1658795584.560573855]: JSON file is not provided
[ INFO] [1658795584.560583548]: ROS Node Namespace: camera
[ INFO] [1658795584.560599170]: Device Name: Intel RealSense D435I
[ INFO] [1658795584.560608562]: Device Serial No: 035422071769
[ INFO] [1658795584.560618137]: Device physical port: 2-2-3
[ INFO] [1658795584.560628530]: Device FW version: 05.13.00.50
[ INFO] [1658795584.560638113]: Device Product ID: 0x0B3A
[ INFO] [1658795584.560646496]: Enable PointCloud: Off
[ INFO] [1658795584.560660402]: Align Depth: Off
[ INFO] [1658795584.560674020]: Sync Mode: Off
[ INFO] [1658795584.560709226]: Device Sensors: 
[ INFO] [1658795584.576828812]: Stereo Module was found.
[ INFO] [1658795584.588891216]: RGB Camera was found.
[ INFO] [1658795584.589128351]: Motion Module was found.
[ INFO] [1658795584.589174014]: (Confidence, 0) sensor isn't supported by current device! -- Skipping...
[ INFO] [1658795584.589211932]: num_filters: 0
[ INFO] [1658795584.589237076]: Setting Dynamic reconfig parameters.
[ WARN] [1658795585.035680824]: Param '/camera/stereo_module/auto_exposure_limit' has value 0 that is not in range [1, 200000]. Removing this parameter from dynamic reconfigure options.
[ WARN] [1658795585.049658644]: Param '/camera/stereo_module/auto_gain_limit' has value 0 that is not in range [16, 248]. Removing this parameter from dynamic reconfigure options.
[ INFO] [1658795585.213533316]: Done Setting Dynamic reconfig parameters.
[ INFO] [1658795585.215467172]: depth stream is enabled - width: 848, height: 480, fps: 30, Format: Z16
[ INFO] [1658795585.219940414]: color stream is enabled - width: 1280, height: 720, fps: 30, Format: RGB8
[ INFO] [1658795585.220032719]: setupPublishers...
[ INFO] [1658795585.233124700]: Expected frequency for depth = 30.00000
[ INFO] [1658795585.350240086]: Expected frequency for color = 30.00000
[ INFO] [1658795585.404484548]: setupStreams...
[ INFO] [1658795585.415673234]: insert Depth to Stereo Module
[ INFO] [1658795585.415784275]: insert Color to RGB Camera
[ INFO] [1658795585.470978728]: SELECTED BASE:Depth, 0
[ INFO] [1658795585.482786048]: RealSense Node Is Up!
[ WARN] [1658795585.591586406]: 
 25/07 17:33:05,592 WARNING [140669272176384] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 25/07 17:33:05,643 WARNING [140669272176384] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 25/07 17:33:05,896 WARNING [140669272176384] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 25/07 17:33:05,947 WARNING [140669272176384] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 25/07 17:33:05,998 WARNING [140669272176384] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 25/07 17:33:06,149 WARNING [140669272176384] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 25/07 17:33:06,301 WARNING [140669272176384] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 25/07 17:34:30,131 WARNING [140669272176384] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61



I don't understand this "control transfer return error` I'm assuming it has something to do with the librealsense wrapper?
@MartyG-RealSense
Copy link
Collaborator

Hi @PhilipAmadasun Is this a separate issue to your earlier recent Gazebo case at #2422, where you are trying to access a real D435i camera this time instead of a simulated D435 please?

If you are using a live camera and the control_transfer returned error that you experienced is generating in the log continously then this can indicate that there is a serious communication problem with the device.

You have already likely tried initial_reset:=true as it is referenced in your other case. Can you confirm that this have been tried with the D435i camera?

Do you experience the same control_transfer returned warnings if you launch with roslaunch realsense2_camera rs_camera.launch

@PhilipAmadasun
Copy link
Author

@MartyG-RealSense Yes I get the same exact issue when I launch this, even with initial_rest:=true

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Jul 27, 2022

Do you have another USB cable that you can try with the camera if you have not done so already to confirm whether or not the apparent communication problem demonstrated by the control_transfer returned warnings is related to the cable that is currently being used with the camera?

@PhilipAmadasun
Copy link
Author

i still get the same problem

@MartyG-RealSense
Copy link
Collaborator

Next, we should consider the possibility that if a basic rs_camera launch does not work then there may be a problem in the installation of the librealsense SDK 2.45.0 and ROS wrapper 2.3.0 that is causing the warnings. If you are using those versions, it looks as though you installed the SDK and ROS wrapper together from packages on ROS Kinetic using the wrapper's Method 1 instructions. Is that correct, please?

If you did use Method 1, did you install librealsense before running the Method 1 installation? If for example you installed librealsense from packages or source code and then ran the Method 1 installation, you would have installed librealsense twice, because Method 1 installs both librealsense and the wrapper. This could cause a conflict between librealsense installations.

@PhilipAmadasun
Copy link
Author

PhilipAmadasun commented Jul 29, 2022

@MartyG-RealSense I can't recall but I believe did method 1 first, I honestly can't remember. But you are saying doing Method1 will also install a wrapper? I have installed from source librealsense version 2.33

@MartyG-RealSense
Copy link
Collaborator

Method 1 uses packages to install both librealsense and the ROS wrapper at the same time, whereas Method 2 (a source code build) only builds the ROS wrapper.

If you used Method 1 first and then installed librealsense 2.33 from source, it is probable that you have two librealsense installations on the same computer that are conflicting with each other. Installing from source and packages on the same computer can lead to a Multiple udev rules detected problem that could prevent the SDK from working correctly.

If you have multiple udev rules then the simple solution is to delete the rule that is at the /etc/udev/rules.d/ folder location, as described by a RealSense team member at IntelRealSense/librealsense#6153 (comment)

@PhilipAmadasun
Copy link
Author

Hi! So I removed librealsense 2.33 from my laptop redid method 1 from scratch. I still get the same error. I looked at /etc/udev/rules.d, and I have 99-realsense-libusb.rules. Do I delete this? I'm confused. This s the error:```

PARAMETERS

  • /camera/realsense2_camera/accel_fps: -1
  • /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: -1
  • /camera/realsense2_camera/color_frame_id: camera_color_frame
  • /camera/realsense2_camera/color_height: -1
  • /camera/realsense2_camera/color_optical_frame_id: camera_color_opti...
  • /camera/realsense2_camera/color_width: -1
  • /camera/realsense2_camera/confidence_fps: -1
  • /camera/realsense2_camera/confidence_height: -1
  • /camera/realsense2_camera/confidence_width: -1
  • /camera/realsense2_camera/depth_fps: -1
  • /camera/realsense2_camera/depth_frame_id: camera_depth_frame
  • /camera/realsense2_camera/depth_height: -1
  • /camera/realsense2_camera/depth_optical_frame_id: camera_depth_opti...
  • /camera/realsense2_camera/depth_width: -1
  • /camera/realsense2_camera/device_type:
  • /camera/realsense2_camera/enable_accel: False
  • /camera/realsense2_camera/enable_color: True
  • /camera/realsense2_camera/enable_confidence: 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:
  • /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: -1
  • /camera/realsense2_camera/fisheye_frame_id: camera_fisheye_frame
  • /camera/realsense2_camera/fisheye_height: -1
  • /camera/realsense2_camera/fisheye_optical_frame_id: camera_fisheye_op...
  • /camera/realsense2_camera/fisheye_width: -1
  • /camera/realsense2_camera/gyro_fps: -1
  • /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_rgb: False
  • /camera/realsense2_camera/infra_width: 848
  • /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/ordered_pc: False
  • /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/stereo_module/exposure/1: 7500
  • /camera/realsense2_camera/stereo_module/exposure/2: 1
  • /camera/realsense2_camera/stereo_module/gain/1: 16
  • /camera/realsense2_camera/stereo_module/gain/2: 16
  • /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.17

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

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

setting /run_id to 69e3dfe0-1219-11ed-b475-d43b04207196
process[rosout-1]: started with pid [12702]
started core service [/rosout]
process[camera/realsense2_camera_manager-2]: started with pid [12719]
process[camera/realsense2_camera-3]: started with pid [12720]
[ INFO] [1659413588.539807210]: Initializing nodelet with 12 worker threads.
[ INFO] [1659413588.577348896]: RealSense ROS v2.3.0
[ INFO] [1659413588.577389094]: Built with LibRealSense v2.45.0
[ INFO] [1659413588.577400584]: Running with LibRealSense v2.45.0
[ INFO] [1659413588.605028919]:
[ INFO] [1659413588.912413148]: Device with serial number 035422071769 was found.

[ INFO] [1659413588.912487340]: Device with physical ID 2-1.2-5 was found.
[ INFO] [1659413588.912520468]: Device with name Intel RealSense D435I was found.
[ INFO] [1659413588.913803131]: Device with port number 2-1.2 was found.
[ INFO] [1659413588.913867909]: Device USB type: 3.2
[ INFO] [1659413588.919009128]: getParameters...
[ INFO] [1659413589.125781987]: setupDevice...
[ INFO] [1659413589.125848476]: JSON file is not provided
[ INFO] [1659413589.125876273]: ROS Node Namespace: camera
[ INFO] [1659413589.125912358]: Device Name: Intel RealSense D435I
[ INFO] [1659413589.125938800]: Device Serial No: 035422071769
[ INFO] [1659413589.125964498]: Device physical port: 2-1.2-5
[ INFO] [1659413589.125994270]: Device FW version: 05.13.00.50
[ INFO] [1659413589.126020580]: Device Product ID: 0x0B3A
[ INFO] [1659413589.126043752]: Enable PointCloud: Off
[ INFO] [1659413589.126072803]: Align Depth: Off
[ INFO] [1659413589.126100873]: Sync Mode: Off
[ INFO] [1659413589.126180192]: Device Sensors:
[ INFO] [1659413589.151301576]: Stereo Module was found.
[ INFO] [1659413589.168193814]: RGB Camera was found.
[ INFO] [1659413589.168429525]: Motion Module was found.
[ INFO] [1659413589.168463126]: (Confidence, 0) sensor isn't supported by current device! -- Skipping...
[ INFO] [1659413589.168482832]: num_filters: 0
[ INFO] [1659413589.168500317]: Setting Dynamic reconfig parameters.
[ WARN] [1659413589.595851375]: Param '/camera/stereo_module/auto_exposure_limit' has value 0 that is not in range [1, 200000]. Removing this parameter from dynamic reconfigure options.
[ WARN] [1659413589.608942614]: Param '/camera/stereo_module/auto_gain_limit' has value 0 that is not in range [16, 248]. Removing this parameter from dynamic reconfigure options.
[ INFO] [1659413589.716907541]: Done Setting Dynamic reconfig parameters.
[ INFO] [1659413589.718322713]: depth stream is enabled - width: 848, height: 480, fps: 30, Format: Z16
[ INFO] [1659413589.721502284]: color stream is enabled - width: 1280, height: 720, fps: 30, Format: RGB8
[ INFO] [1659413589.721569246]: setupPublishers...
[ INFO] [1659413589.729653608]: Expected frequency for depth = 30.00000
[ INFO] [1659413589.788962012]: Expected frequency for color = 30.00000
[ INFO] [1659413589.809496008]: setupStreams...
[ INFO] [1659413589.820504443]: insert Depth to Stereo Module
[ INFO] [1659413589.820552102]: insert Color to RGB Camera
01/08 21:13:09,860 WARNING [140230511249152] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
[ INFO] [1659413589.911063480]: SELECTED BASE:Depth, 0
[ INFO] [1659413589.945362903]: RealSense Node Is Up!
[ WARN] [1659413589.978994124]:
01/08 21:13:09,980 WARNING [140230511249152] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/08 21:13:10,030 WARNING [140230511249152] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/08 21:13:10,306 WARNING [140230511249152] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/08 21:13:10,357 WARNING [140230511249152] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/08 21:13:10,509 WARNING [140230511249152] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/08 21:13:10,661 WARNING [140230511249152] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/08 21:13:10,812 WARNING [140230511249152] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/08 21:13:10,863 WARNING [140230511249152] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/08 21:13:24,530 WARNING [140230511249152] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61

This is the content of the 99-udev-rule thing:

Intel RealSense UVC cameras (R200, F200, SR300 LR200, ZR300, D400, L500)

SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0a80", MODE:="0666", GROUP:="plugdev", RUN+="/usr/local/bin/usb-R200-in_udev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0a66", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0aa5", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0abf", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0acb", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0ad0", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="04b4", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0ad1", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0ad2", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0ad3", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0ad4", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0ad5", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0ad6", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0af2", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0af6", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0afe", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0aff", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b00", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b01", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b03", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b07", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b0c", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b0d", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b3a", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b3d", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b48", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b49", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b4b", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b4d", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b52", MODE:="0666", GROUP:="plugdev"

Intel RealSense recovery devices (DFU)

SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0ab3", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0adb", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0adc", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b55", MODE:="0666", GROUP:="plugdev"

Intel RealSense devices (Movidius, T265)

SUBSYSTEMS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="8087", ATTRS{idProduct}=="0af3", MODE="0666", GROUP="plugdev"
SUBSYSTEMS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="8087", ATTRS{idProduct}=="0b37", MODE="0666", GROUP="plugdev"
SUBSYSTEMS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="03e7", ATTRS{idProduct}=="2150", MODE="0666", GROUP="plugdev"

KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0ad5", MODE:="0777", GROUP:="plugdev", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p'"
DRIVER=="hid_sensor_custom", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0ad5", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"
KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0af2", MODE:="0777", GROUP:="plugdev", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p'"
DRIVER=="hid_sensor*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0af2", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"
KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0afe", MODE:="0777", GROUP:="plugdev", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p'"
DRIVER=="hid_sensor_custom", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0afe", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"
KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0aff", MODE:="0777", GROUP:="plugdev", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p'"
DRIVER=="hid_sensor_custom", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0aff", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"
KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b00", MODE:="0777", GROUP:="plugdev", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p'"
DRIVER=="hid_sensor_custom", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b00", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"
KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b01", MODE:="0777", GROUP:="plugdev", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p'"
DRIVER=="hid_sensor_custom", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b01", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"
KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b3a", MODE:="0777", GROUP:="plugdev", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p'"
DRIVER=="hid_sensor*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b3a", RUN+="/bin/sh -c ' chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"
KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b3d", MODE:="0777", GROUP:="plugdev", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p'"
DRIVER=="hid_sensor*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b3d", RUN+="/bin/sh -c ' chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"
KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b4b", MODE:="0777", GROUP:="plugdev", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p'"
DRIVER=="hid_sensor*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b4b", RUN+="/bin/sh -c ' chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"
KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b4d", MODE:="0777", GROUP:="plugdev", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p'"
DRIVER=="hid_sensor*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b4d", RUN+="/bin/sh -c ' chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"

@PhilipAmadasun
Copy link
Author

There is something wrong wth my "depth_image_to_laserscan" node, its not connected t oanything on my rqt_graph. There is a launch file in turtlebot_bringup called "3dsensor.launch" that activates this node. Maybe you can look at this file and help me. Here it is:

<!-- 
  Turtlebot is a bit low on horsepower...

  We use openni_camera here, turn everything on by default
  (allows the user to conveniently see everything when
  launching this on its own - use with 
  turtebot_rviz_launchers/view_robot.launch to visualise)
  and provide args to disable them so you can optimise the
  horsepower for your application.
  
  For an example of disabling processing modules, check
  any of the turtlebot_rapps (e.g. android_make_a_map.launch
  only enables scan_processing for depthimage_to_laserscan and
  rgb_processing for the android tele-view).
-->
<launch>
  <!-- "camera" should uniquely identify the device. All topics are pushed down
       into the "camera" namespace, and it is prepended to tf frame ids. -->
  <arg name="camera"      default="camera"/>
  <arg name="publish_tf"  default="false"/>
  <arg name="3d_sensor"   default="$(env TURTLEBOT_3D_SENSOR)"/>  <!-- kinect, asus_xtion_pro -->

  <!-- Factory-calibrated depth registration -->
  <arg name="depth_registration"              default="true"/>
  <arg     if="$(arg depth_registration)" name="depth" value="depth_registered" />
  <arg unless="$(arg depth_registration)" name="depth" value="depth" />

  <!-- Processing Modules -->
  <arg name="rgb_processing"                  default="true"/>
  <arg name="ir_processing"                   default="true"/>
  <arg name="depth_processing"                default="true"/>
  <arg name="depth_registered_processing"     default="true"/>
  <arg name="disparity_processing"            default="true"/>
  <arg name="disparity_registered_processing" default="true"/>
  <arg name="scan_processing"                 default="true"/>

  <!-- Worker threads for the nodelet manager -->
  <arg name="num_worker_threads" default="4" />

  <!-- Laserscan topic -->
  <arg name="scan_topic" default="scan"/>

  <include file="$(find turtlebot_bringup)/launch/includes/3dsensor/$(arg 3d_sensor).launch.xml">
    <arg name="camera"                          value="$(arg camera)"/>
    <arg name="publish_tf"                      value="$(arg publish_tf)"/>
    <arg name="depth_registration"              value="$(arg depth_registration)"/>
    <arg name="num_worker_threads"              value="$(arg num_worker_threads)" />

    <!-- Processing Modules -->
    <arg name="rgb_processing"                  value="$(arg rgb_processing)"/>
    <arg name="ir_processing"                   value="$(arg ir_processing)"/>
    <arg name="depth_processing"                value="$(arg depth_processing)"/>
    <arg name="depth_registered_processing"     value="$(arg depth_registered_processing)"/>
    <arg name="disparity_processing"            value="$(arg disparity_processing)"/>
    <arg name="disparity_registered_processing" value="$(arg disparity_registered_processing)"/>
  </include>

   <!--                        Laserscan 
     This uses lazy subscribing, so will not activate until scan is requested.
   -->
  <group if="$(arg scan_processing)">
    <node pkg="nodelet" type="nodelet" name="depthimage_to_laserscan" args="load depthimage_to_laserscan/DepthImageToLaserScanNodelet $(arg camera)/$(arg camera)_nodelet_manager">
      <!-- Pixel rows to use to generate the laserscan. For each column, the scan will
           return the minimum value for those pixels centered vertically in the image. -->
      <param name="scan_height" value="10"/>
      <param name="output_frame_id" value="/$(arg camera)_depth_frame"/>
      <param name="range_min" value="0.45"/>
      <remap from="image" to="camera/depth/image_rect_raw"/>
      <remap from="scan" to="$(arg scan_topic)"/>

      <!-- Somehow topics here get prefixed by "$(arg camera)" when not inside an app namespace,
           so in this case "$(arg scan_topic)" must provide an absolute topic name (issue #88).
           Probably is a bug in the nodelet manager: https://github.com/ros/nodelet_core/issues/7 -->
      <remap from="$(arg camera)/image" to="camera/depth/image_rect_raw"/>
      <remap from="$(arg camera)/scan" to="$(arg scan_topic)"/>
    </node>
  </group>
</launch>

@MartyG-RealSense
Copy link
Collaborator

If you have a rule at /lib/udev/rules.d/60-librealsense2-udev-rules.rule then you can delete the other rule at etc/udev/rules.d

In regard to your second question, I do not have knowledge about use of depth_image_to_laserscan unfortunately.

@PhilipAmadasun
Copy link
Author

@MartyG-RealSense I dont have any such rules in my lib/udev, how do I make one?

@MartyG-RealSense
Copy link
Collaborator

The SDK installation guide at the link below advises to use these two instructions to install the /etc udev rule after navigating to the root directory of the librealsense source code folder.

sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && udevadm trigger

https://dev.intelrealsense.com/docs/compiling-librealsense-for-linux-ubuntu-guide

@PhilipAmadasun
Copy link
Author

@MartyG-RealSense Isn't it supposed to be a 60-realsense-libusb..... file and not a 99-realsense-lib?

@PhilipAmadasun
Copy link
Author

@MartyG-RealSense I also don't have a config file. in my librealsense, its supposed to be in my ros/kinetic/shared directory right?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 5, 2022

If you have a source code build then the udev rule installed is /etc/udev/rules.d/99-realsense-libusb.rules

If you build from packages then the udev rule is /lib/udev/rules.d/60-librealsense2-udev-rules.rules

If both rules are installed on the same computer then the /etc rule is the one that is deleted, because removing the /lib rule can break linkages to packages.

In your case though, you had neither of these rules installed.

If a system is in a tangle, with both package and source code builds and missing / conflicting files, it can be easier just to perform a complete wipe of the computer (including Ubuntu) and re-install everything from the beginning, making sure to only choose one SDK install method this time (such as the ROS wrapper's Method 1).

If it is not possible to wipe the whole computer then remove as much of librealsense as possible.

*. If you built the ROS wrapper from source code, delete the entire catkin workspace folder /catkin_ws/src

*. If you built librealsense from packages, remove them.

dpkg -l | grep "realsense" | cut -d " " -f 3 | xargs sudo dpkg --purge

*. If you have a source code installation of librealsense on your computer, go to its root directory and run the CMake instruction below to uninstall it.

sudo make uninstall && make clean

@PhilipAmadasun
Copy link
Author

PhilipAmadasun commented Aug 5, 2022 via email

@MartyG-RealSense
Copy link
Collaborator

Some resources about using D435 with depthimage_to_laserscan are listed at #2440 (comment)

@PhilipAmadasun
Copy link
Author

PhilipAmadasun commented Aug 6, 2022

@MartyG-RealSense The initial issue is that the scan topic is not receiving any messages. the depdthimage-to-laserscan nodelet only works when the scan topic is receiving data(as I now realize). How do I get the scan topic topic to recieve data, I think this is the main issue that needs to be solved. WHat are the possible reasons why the scan topic does not receive anything?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 7, 2022

I found a case at #1163 where move_base was not receiving depth images when using depthimage_to_laserscan, so the RealSense ROS user in that case created their own adapted 'fork' version of the ROS wrapper that published directly to the /camera/scan topic from the wrapper.

https://github.com/dschnabel/realsense-ros

Because of the age of that case though, the forked wrapper matches to librealsense SDK 2.33.1 instead of 2.50.0, so the edits made to the wrapper would likely have to be recreated in your own fork of 2.50.0 unless you were happy to use the old 2.33.1 SDK.

@PhilipAmadasun
Copy link
Author

@MartyG-RealSense Okay, because this is the 2.33.1 version I will try to build depthimage_to_laser scan in a workspace. Although, I have the ros-kinetic-depthimage-to-laserscan package in my opt/ros directory(which does not seem to have some of the files here,do I just remove that and build another one in the workspace? How do I make sure my the launch file that includes the depthimage-to-laserscan I build?
This is my launch file:

<launch>
  <!-- "camera" should uniquely identify the device. All topics are pushed down
       into the "camera" namespace, and it is prepended to tf frame ids. -->
  <arg name="camera"      default="camera"/>
  <arg name="publish_tf"  default="false"/>
  <arg name="3d_sensor"   default="$(env TURTLEBOT_3D_SENSOR)"/>  <!-- kinect, asus_xtion_pro -->

  <!-- Factory-calibrated depth registration -->
  <arg name="depth_registration"              default="true"/>
  <arg     if="$(arg depth_registration)" name="depth" value="depth_registered" />
  <arg unless="$(arg depth_registration)" name="depth" value="depth" />

  <!-- Processing Modules -->
  <arg name="rgb_processing"                  default="true"/>
  <arg name="ir_processing"                   default="true"/>
  <arg name="depth_processing"                default="true"/>
  <arg name="depth_registered_processing"     default="true"/>
  <arg name="disparity_processing"            default="true"/>
  <arg name="disparity_registered_processing" default="true"/>
  <arg name="scan_processing"                 default="true"/>

  <!-- Worker threads for the nodelet manager -->
  <arg name="num_worker_threads" default="4" />

  <!-- Laserscan topic -->
  <arg name="scan_topic" default="scan"/>

  <include file="$(find turtlebot_bringup)/launch/includes/3dsensor/$(arg 3d_sensor).launch.xml">
    <arg name="camera"                          value="$(arg camera)"/>
    <arg name="publish_tf"                      value="$(arg publish_tf)"/>
    <arg name="depth_registration"              value="$(arg depth_registration)"/>
    <arg name="num_worker_threads"              value="$(arg num_worker_threads)" />

    <!-- Processing Modules -->
    <arg name="rgb_processing"                  value="$(arg rgb_processing)"/>
    <arg name="ir_processing"                   value="$(arg ir_processing)"/>
    <arg name="depth_processing"                value="$(arg depth_processing)"/>
    <arg name="depth_registered_processing"     value="$(arg depth_registered_processing)"/>
    <arg name="disparity_processing"            value="$(arg disparity_processing)"/>
    <arg name="disparity_registered_processing" value="$(arg disparity_registered_processing)"/>
  </include>

   <!--                        Laserscan
     This uses lazy subscribing, so will not activate until scan is requested.
   -->
  <group if="$(arg scan_processing)">
    <node pkg="nodelet" type="nodelet" name="depthimage_to_laserscan" args="load depthimage_to_laserscan/DepthImageToLaserScanNodelet $(arg camera)/$(arg camera)_nodelet_manager">
      <!-- Pixel rows to use to generate the laserscan. For each column, the scan will
           return the minimum value for those pixels centered vertically in the image. -->
      <param name="scan_height" value="10"/>
      <param name="output_frame_id" value="/$(arg camera)_depth_frame"/>
      <param name="range_min" value="0.45"/>
      <remap from="image" to="/camera/depth/image_rect_raw"/>
      <remap from="scan" to="$(arg scan_topic)"/>

      <!-- Somehow topics here get prefixed by "$(arg camera)" when not inside an app namespace,
           so in this case "$(arg scan_topic)" must provide an absolute topic name (issue #88).
           Probably is a bug in the nodelet manager: https://github.com/ros/nodelet_core/issues/7 -->
      <remap from="$(arg camera)/image" to="/camera/depth/image_rect_raw"/>
      <remap from="$(arg camera)/scan" to="$(arg scan_topic)"/>
    </node>
  </group>
</launch>```

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 7, 2022

The impression that I get from #1163 is that the RealSense ROS user incorporated the depthimage_to_laserscan code into their forked RealSense ROS wrapper so that depthimage_to_laserscan does not have to be launched separately as a standalone package.

If the separate depthimage_to_laserscan package that you already have installed does not appear to be outputting anything then it may be worth first trying leaving the existing package in place and running the forked wrapper to see whether anything is output to the /scan topic.

@PhilipAmadasun
Copy link
Author

@MartyG-RealSense If I build the editted wrapper package in a workspace, how do I make sure the already installed "ros-kinetic-realsense2-camera" does not fight with this newly installed wrapper? wouldn't I have two wrappers then fighting against each other like last time?

@MartyG-RealSense
Copy link
Collaborator

If ros-kinetic-realsense2-camera was built from packages using Method 1 then using the package uninstall command should remove all packages that include 'realsense' as part of their name.

dpkg -l | grep "realsense" | cut -d " " -f 3 | xargs sudo dpkg --purge

It would also remove the librealsense SDK though. So you could then install librealsense 2.33.1 from source and then build the edited wrapper.

https://github.com/IntelRealSense/librealsense/releases/tag/v2.33.1

@MartyG-RealSense
Copy link
Collaborator

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

@MartyG-RealSense
Copy link
Collaborator

Case closed due to no further comments received.

@PhilipAmadasun
Copy link
Author

@MartyG-RealSense I found the solution. The depthimage_to_laserscan package wasn't working because the realsense camera could not share information with the nodelets the package uses for some reason. So the problem is fixed by modifying the 3dsensor.launch file:

<!--
  Turtlebot is a bit low on horsepower...

  We use openni_camera here, turn everything on by default
  (allows the user to conveniently see everything when
  launching this on its own - use with
  turtebot_rviz_launchers/view_robot.launch to visualise)
  and provide args to disable them so you can optimise the
  horsepower for your application.
 
  For an example of disabling processing modules, check
  any of the turtlebot_rapps (e.g. android_make_a_map.launch
  only enables scan_processing for depthimage_to_laserscan and
  rgb_processing for the android tele-view).
-->
<launch>
  <!-- "camera" should uniquely identify the device. All topics are pushed down
   	into the "camera" namespace, and it is prepended to tf frame ids. -->
  <arg name="camera"  	default="camera"/>
  <arg name="publish_tf"  default="false"/>
  <arg name="3d_sensor"   default="$(env TURTLEBOT_3D_SENSOR)"/>  <!-- kinect, asus_xtion_pro -->

  <!-- Factory-calibrated depth registration -->
  <arg name="depth_registration"          	default="true"/>
  <arg 	if="$(arg depth_registration)" name="depth" value="depth_registered" />
  <arg unless="$(arg depth_registration)" name="depth" value="depth" />

  <!-- Processing Modules -->
  <arg name="rgb_processing"              	default="true"/>
  <arg name="ir_processing"               	default="true"/>
  <arg name="depth_processing"            	default="true"/>
  <arg name="depth_registered_processing" 	default="true"/>
  <arg name="disparity_processing"        	default="true"/>
  <arg name="disparity_registered_processing" default="true"/>
  <arg name="scan_processing"             	default="true"/>

  <!-- Worker threads for the nodelet manager -->
  <arg name="num_worker_threads" default="4" />

  <!-- Laserscan topic -->
  <arg name="scan_topic" default="scan"/>

  <include file="$(find turtlebot_bringup)/launch/includes/3dsensor/$(arg 3d_sensor).launch.xml">
	<arg name="camera"                      	value="$(arg camera)"/>
	<arg name="publish_tf"                  	value="$(arg publish_tf)"/>
	<arg name="depth_registration"          	value="$(arg depth_registration)"/>
	<arg name="num_worker_threads"          	value="$(arg num_worker_threads)" />

	<!-- Processing Modules -->
	<arg name="rgb_processing"              	value="$(arg rgb_processing)"/>
	<arg name="ir_processing"               	value="$(arg ir_processing)"/>
	<arg name="depth_processing"            	value="$(arg depth_processing)"/>
	<arg name="depth_registered_processing" 	value="$(arg depth_registered_processing)"/>
	<arg name="disparity_processing"        	value="$(arg disparity_processing)"/>
	<arg name="disparity_registered_processing" value="$(arg disparity_registered_processing)"/>
  </include>

   <!--                    	Laserscan
 	This uses lazy subscribing, so will not activate until scan is requested.
   -->
  <!--
  <group if="$(arg scan_processing)">
	<remap from="image" to="/camera/depth/image_rect_raw"/>
	<remap from="scan" to="$(arg scan_topic)"/>
	<remap from="camera_info" to="/camera/depth/camera_info"/>
	<remap from="$(arg camera)/image" to="/camera/depth/image_rect_raw"/>
	<remap from="$(arg camera)/scan" to="$(arg scan_topic)"/>
	<remap from="$(arg camera)/camera_info" to="/camera/depth/camera_info"/>
	<node pkg="nodelet" type="nodelet" name="depthimage_to_laserscan" args="load depthimage_to_laserscan/DepthImageToLaserScanNodelet $(arg camera)/$(arg camera)_nodelet_manager">
  	<param name="scan_height" value="10"/>
  	<param name="output_frame_id" value="/$(arg camera)_depth_frame"/>
  	<param name="range_min" value="0.45"/>
	</node>
  </group>
  -->
  <remap from="image" to="/camera/depth/image_rect_raw"/>
  <remap from="camera_info" to="/camera/depth/camera_info"/>
  <node pkg="depthimage_to_laserscan" type="depthimage_to_laserscan" name="depthimage_to_laserscan" args="">
  <param name="scan_height" 	type="int"	value="1"/> <!-- default: 1 pixel. Number of pixel rows used to generate laser scan. -->
<param name="scan_time"   	type="double" value="0.033"/> <!-- default:0.033, 30 FPS . Time between scans. -->
<param name="range_min"   	type="double" value="0.45"/> <!--default:0.45m. Ranges less than this are considered -Inf. -->
<param name="range_max"   	type="double" value="10.0"/> <!--default: 10m. Ranges less than this are considered +Inf. -->
<param name="output_frame_id" type="str"	value="camera_depth_frame"/> <!--default: camera_depth_frame. Frame id of the laser scan. -->
  </node>
</launch>

Maybe this can help someone else, thanks!

@MartyG-RealSense
Copy link
Collaborator

It's awesome to hear that you found a solution! Thanks so much for the update and for sharing your solution with the RealSense ROS community :)

@adamzr2000
Copy link

adamzr2000 commented Nov 22, 2022

Hello, I am trying to use the turtlebot2 with the d435i camera.

I am using this file as 3D sensor turtlebot_bringup/launch/includes/3dsensor/d435i.launch.xml but the maps created are not very accurate:

image

<!-- Processing Modules -->                                                                     
<arg name="rgb_processing"                  value="$(arg rgb_processing)"/>                     
<arg name="ir_processing"                   value="$(arg ir_processing)"/>                      
<arg name="depth_processing"                value="$(arg depth_processing)"/>                   
<arg name="depth_registered_processing"     value="$(arg depth_registered_processing)"/>        
<arg name="disparity_processing"            value="$(arg disparity_processing)"/>               
<arg name="disparity_registered_processing" value="$(arg disparity_registered_processing)"/>    

Could you show me the modifications you have made to gmapping with the turtlebot and the d435i?

Thanks in advance.

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

3 participants