IntelRealSense / realsense-ros

ROS Wrapper for Intel(R) RealSense(TM) Cameras
http://wiki.ros.org/RealSense
Apache License 2.0
2.55k stars 1.75k forks source link

CMake couldn't find realsense2 in Linux #2729

Closed mericgeren closed 1 year ago

mericgeren commented 1 year ago

Hello,

I am using Linux 18.04LTS with kernel 5.3.0-59-generic and ROS Melodic. I have git cloned ddynamic and realsense-ros ( did git checkout 2.3.2 right after). Also, downloaded the zip file which contains the source code of librealsense v2.50.0 and extracted it directly to home directory. After that, created and moved into build directory at the root of librealsense. Then, using CMake 3.10.2 i built librealsense with the command: cmake ../ -DFORCE_RSUSB_BACKEND=true -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true As suggested here: https://github.com/IntelRealSense/librealsense/issues/6689#issuecomment-648758973. Then, followed steps of realsense-ros installation. When i input the command: catkin_make clean i got this error:

-- +++ processing catkin package: 'realsense2_camera' -- ==> add_subdirectory(realsense-ros/realsense2_camera) -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy CMake Warning at realsense-ros/realsense2_camera/CMakeLists.txt:45 (find_package): By not providing "Findrealsense2.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "realsense2", but CMake did not find one.

Could not find a package configuration file provided by "realsense2" (requested version 2.50.0) with any of the following names:

realsense2Config.cmake
realsense2-config.cmake

Add the installation prefix of "realsense2" to CMAKE_PREFIX_PATH or set "realsense2_DIR" to a directory containing one of the above files. If "realsense2" provides a separate development package or SDK, be sure it has been installed.

CMake Error at realsense-ros/realsense2_camera/CMakeLists.txt:49 (message):

Intel RealSense SDK 2.0 is missing, please install it from https://github.com/IntelRealSense/librealsense/releases

-- Configuring incomplete, errors occurred! See also "/home/baran/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/baran/catkin_ws/build/CMakeFiles/CMakeError.log". Makefile:1554: recipe for target 'cmake_check_build_system' failed make: *** [cmake_check_build_system] Error 1 Invoking "make cmake_check_build_system" failed

Can you help me on this issue please?

MartyG-RealSense commented 1 year ago

Hi @mericgeren The error message states that Intel RealSense SDK 2.0 is missing, please install it.

After you used the CMake instruction to set up building:

cmake ../ -DFORCE_RSUSB_BACKEND=true -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true

There is a further step to input in the Build folder to compile librealsense from source code that is not on the instructions at https://github.com/IntelRealSense/librealsense/issues/6689#issuecomment-648758973

sudo make uninstall && make clean && make -j8 && sudo make install

I have added this command to the instructions. My apologies for the omission.

mericgeren commented 1 year ago

Hi there,

Sorry for the late response. Just tried inputting sudo make uninstall && make clean && make -j8 && sudo make install. When i input that command i got a lot of warning messages with

warning: ISO C forbids conversion of object pointer to function pointer type [-Wpedantic]

But, after the completion of install i was able to open Realsense Viewer and view the stream coming from the camera. Then, i have entered catkin_make clean and run the command without any issues. Later, when i inputted catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release i got the following error:

ModuleNotFoundError: No module named 'em' import em ModuleNotFoundError: No module named 'em' import em import em ModuleNotFoundError: No module named 'em' ModuleNotFoundError: No module named 'em' realsense-ros/realsense2_camera/CMakeFiles/realsense2_camera_generate_messages_cpp.dir/build.make:72: recipe for target '/home/baran/catkin_ws/devel/include/realsense2_camera/Extrinsics.h' failed make[2]: [/home/baran/catkin_ws/devel/include/realsense2_camera/Extrinsics.h] Error 1 make[2]: Waiting for unfinished jobs.... realsense-ros/realsense2_camera/CMakeFiles/realsense2_camera_generate_messages_cpp.dir/build.make:65: recipe for target '/home/baran/catkin_ws/devel/include/realsense2_camera/IMUInfo.h' failed make[2]: [/home/baran/catkin_ws/devel/include/realsense2_camera/IMUInfo.h] Error 1 realsense-ros/realsense2_camera/CMakeFiles/realsense2_camera_generate_messages_cpp.dir/build.make:79: recipe for target '/home/baran/catkin_ws/devel/include/realsense2_camera/Metadata.h' failed make[2]: [/home/baran/catkin_ws/devel/include/realsense2_camera/Metadata.h] Error 1 realsense-ros/realsense2_camera/CMakeFiles/realsense2_camera_generate_messages_cpp.dir/build.make:86: recipe for target '/home/baran/catkin_ws/devel/include/realsense2_camera/DeviceInfo.h' failed make[2]: [/home/baran/catkin_ws/devel/include/realsense2_camera/DeviceInfo.h] Error 1 CMakeFiles/Makefile2:1997: recipe for target 'realsense-ros/realsense2_camera/CMakeFiles/realsense2_camera_generate_messages_cpp.dir/all' failed make[1]: [realsense-ros/realsense2_camera/CMakeFiles/realsense2_camera_generate_messages_cpp.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... [ 75%] Linking CXX shared library /home/baran/catkin_ws/devel/lib/libddynamic_reconfigure.so [ 75%] Built target ddynamic_reconfigure Makefile:129: recipe for target 'all' failed make: [all] Error 2 Invoking "make -j8 -l8" failed

MartyG-RealSense commented 1 year ago

I have not seen the error ModuleNotFoundError: No module named 'em' before. However, I found a case where a RealSense user who also experienced it resolved it by using the command pip install empy

image

mericgeren commented 1 year ago

Installed empy with commands you have suggested. Now, when i input the command catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release i got this error:

CMakeFiles/Makefile2:1859: recipe for target 'realsense-ros/realsense2_camera/CMakeFiles/realsense2_camera.dir/all' failed make[1]: [realsense-ros/realsense2_camera/CMakeFiles/realsense2_camera.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: [all] Error 2 Invoking "make -j8 -l8" failed

Thank you for your help.

MartyG-RealSense commented 1 year ago

Using the -j parameter can cause a random crash of the build process on some computers, especially ones with a low-end configuration. You could try a smaller j-number such as -j4 or remove it and just use make instead of make -j8, though this results in a longer build time. Also try it without -l8 as this parameter is usually not used in librealsense building.

mericgeren commented 1 year ago

I just tried sudo make uninstall && make clean && make -j4 && sudo make install (a smaller j-number) and sudo make uninstall && make clean && make && sudo make install (without -j parameter). After trying both when i input catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release i still get the same error.

MartyG-RealSense commented 1 year ago

Did you install the ddynamic_reconfigure ROS component before building the wrapper? If not then the command below will install it for Melodic.

sudo apt install ros-melodic-ddynamic-reconfigure

Edit: I see from your original message that you git cloned it.

Someone at https://github.com/IntelRealSense/realsense-ros/issues/2216 experienced the same [realsense-ros/realsense2_camera/CMakeFiles/realsense2_camera.dir/all] Error 2 error as you reported and solved it by doing a clean uninstall and reinstall of librealsense 2.5.0 and wrapper 2.3.2.

A previous source code installation of the wrapper can be removed by deleting the entire /catkin_ws/src catkin workspace folder. A source-built librealsense can be removed by going to the Build folder and performing sudo make uninstall && make clean to uninstall without installing another SDK in its place.


If you do not require the RealSense Viewer tool then you could try installing librealsense and the wrapper together at the same time from packages instead of source code using the instruction sudo apt-get install ros-$ROS_DISTRO-realsense2-camera

With this method (which does not install the Viewer), you do not need to first install librealsense and also do not need to install ddynamic_reconfigure

mericgeren commented 1 year ago

Hi there,

Deleted everything about ddynamic_reconfigure and relasense-ros in catkin workspace. Then, moved to build folder of librealsense installation and inputted the command sudo make uninstall && make clean. Then, built and installed librealsense with commands cmake ../ -DFORCE_RSUSB_BACKEND=true -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true and sudo make uninstall && make clean && make && sudo make install. After that, inputted the command sudo apt install ros-melodic-ddynamic-reconfigure and i got this output:

Reading package lists... Done Building dependency tree
Reading state information... Done The following NEW packages will be installed: ros-melodic-ddynamic-reconfigure 0 upgraded, 1 newly installed, 0 to remove and 369 not upgraded. Need to get 65,4 kB of archives. After this operation, 272 kB of additional disk space will be used. Get:1 http://packages.ros.org/ros/ubuntu bionic/main amd64 ros-melodic-ddynamic-reconfigure amd64 0.3.2-1bionic.20221025.192508 [65,4 kB] Fetched 65,4 kB in 1s (66,3 kB/s)
Selecting previously unselected package ros-melodic-ddynamic-reconfigure. dpkg: warning: files list file for package 'libopencv-samples' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-photo3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-stitching3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-contrib3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'python3-opencv' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-core3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-python' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-imgcodecs3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-videostab3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'opencv-licenses' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-objdetect3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-viz3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-dev' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-features2d3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-superres3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-ml3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-shape3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-imgproc3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-flann3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-video3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-calib3d3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-highgui3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-videoio3.2:amd64' missing; assuming package has no files currently installed (Reading database ... 373583 files and directories currently installed.) Preparing to unpack .../ros-melodic-ddynamic-reconfigure_0.3.2-1bionic.20221025.192508_amd64.deb ... Unpacking ros-melodic-ddynamic-reconfigure (0.3.2-1bionic.20221025.192508) ... Setting up ros-melodic-ddynamic-reconfigure (0.3.2-1bionic.20221025.192508) ...

MartyG-RealSense commented 1 year ago

Which kind of computer are you installing on, please? Is it a PC (desktop or laptop) or a single-board computer like Nvidia Jetson or Raspberry Pi?

mericgeren commented 1 year ago

I am installing on a desktop pc.

MartyG-RealSense commented 1 year ago

If you are installing librealsense and the wrapper separately from source code instead of installing them together at the same time from packages with sudo apt-get install ros-$ROS_DISTRO-realsense2-camera then once librealsense is installed, you should clone the ROS wrapper before installing ddynamic_reconfigure. Did you perform this stage, please?

git clone https://github.com/IntelRealSense/realsense-ros.git
cd realsense-ros/
git checkout `git tag | sort -V | grep -P "^2.\d+\.\d+" | tail -1`
cd ..
mericgeren commented 1 year ago

I haven't installed ROS wrapper yet. Now, trying installing ROS wrapper first.

mericgeren commented 1 year ago

Just tried removing ddynamic_reconfigure with sudo apt autoremove ros-melodic-ddynamic-reconfigure and then, git cloning ROS wrapper with commands you mentioned above and then, installing ddynamic_reconfigure with command: sudo apt install ros-melodic-ddynamic-reconfigure. After inputting i got the follwing output:

Reading package lists... Done Building dependency tree
Reading state information... Done The following NEW packages will be installed: ros-melodic-ddynamic-reconfigure 0 upgraded, 1 newly installed, 0 to remove and 369 not upgraded. Need to get 65,4 kB of archives. After this operation, 272 kB of additional disk space will be used. Get:1 http://packages.ros.org/ros/ubuntu bionic/main amd64 ros-melodic-ddynamic-reconfigure amd64 0.3.2-1bionic.20221025.192508 [65,4 kB] Fetched 65,4 kB in 2s (37,6 kB/s)
Selecting previously unselected package ros-melodic-ddynamic-reconfigure. dpkg: warning: files list file for package 'libopencv-samples' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-photo3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-stitching3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-contrib3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'python3-opencv' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-core3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-python' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-imgcodecs3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-videostab3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'opencv-licenses' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-objdetect3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-viz3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-dev' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-features2d3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-superres3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-ml3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-shape3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-imgproc3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-flann3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-video3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-calib3d3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-highgui3.2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-videoio3.2:amd64' missing; assuming package has no files currently installed (Reading database ... 373583 files and directories currently installed.) Preparing to unpack .../ros-melodic-ddynamic-reconfigure_0.3.2-1bionic.20221025.192508_amd64.deb ... Unpacking ros-melodic-ddynamic-reconfigure (0.3.2-1bionic.20221025.192508) ... Setting up ros-melodic-ddynamic-reconfigure (0.3.2-1bionic.20221025.192508) ...

Edit: When, i try to install packages claimed to be missing in the warnings with command sudo apt install, i get an output like this for each package:

"package name" is already the newest version. "package name" set to manually installed.

MartyG-RealSense commented 1 year ago

At this point, when there have been so many errors, sometimes the only solution that works is to completely wipe the computer (including Ubuntu) and do a fresh install from the beginning. Then it may suddenly work because the wipe and reinstall removed hidden tangles in the system. I can appreciate that a wipe of Ubuntu is not practical in every situation though.

mericgeren commented 1 year ago

Managed to install most of the packages listed above. But, for packages have not installed yet. When try to install i get following messages:

package has no files currently installed dpkg: warning: files list file for package 'opencv-licenses' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv-dev' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libopencv' missing; assuming package has no files currently installed

MartyG-RealSense commented 1 year ago

Are you able to install the packages manually with sudo apt-get instructions?

sudo apt-get install opencv-licenses sudo apt-get install libopencv-dev sudo apt-get install libopencv

mericgeren commented 1 year ago

I wasn't able to. But, then, i deleted everything about realsense-ros in catkin workspace. Then, git cloned realsense-ros before i clone ddynamic_reconfigure and it fixed. But, just inputted roslaunch realsense2_camera rs_camera.launch and nothing happened.

Thank you for all the help you have offered.

MartyG-RealSense commented 1 year ago

You are very welcome.

Does it also not respond if you launch with rs_rgbd.launch instead of rs_camera.launch?

To use rs_rgbd.launch, you should first install support for an RGBD launch with the command below.

sudo apt-get install ros-melodic-rgbd-launch

mericgeren commented 1 year ago

After powering off and powering on the pc, i inputted sudo apt-get install ros-melodic-rgbd-launch and roslaunch realsense2_camera rs_rgbd.launch. Then, i got the following output:

... logging to /home/baran/.ros/log/d08075cc-ee3e-11ed-a7ed-309c234237f8/roslaunch-pppp-MS-7996-6140.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://127.0.0.1:35541/

SUMMARY

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: True
  • /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: -1.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: 30
  • /camera/realsense2_camera/confidence_height: 480
  • /camera/realsense2_camera/confidence_width: 640
  • /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: True
  • /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: -1
  • /camera/realsense2_camera/infra_height: -1
  • /camera/realsense2_camera/infra_rgb: False
  • /camera/realsense2_camera/infra_width: -1
  • /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/reconnect_timeout: 6.0
  • /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: camera/odom_in
  • /camera/realsense2_camera/unite_imu_method: none
  • /camera/realsense2_camera/usb_port_id:
  • /camera/realsense2_camera/wait_for_device_timeout: -1.0
  • /rosdistro: melodic
  • /rosversion: 1.14.13

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

ROS_MASTER_URI=http://127.0.0.1:11311

process[camera/realsense2_camera_manager-1]: started with pid [6162] process[camera/realsense2_camera-2]: started with pid [6163] process[camera/color_rectify_color-3]: started with pid [6164] process[camera/points_xyzrgb_hw_registered-4]: started with pid [6165] [ INFO] [1683619147.629087274]: Initializing nodelet with 8 worker threads. [ INFO] [1683619147.793471650]: RealSense ROS v2.3.2 [ INFO] [1683619147.793510910]: Built with LibRealSense v2.50.0 [ INFO] [1683619147.793529121]: Running with LibRealSense v2.50.0 [ INFO] [1683619147.811495476]:
[ INFO] [1683619147.926354662]: Device with serial number 030422070324 was found.

[ INFO] [1683619147.926412073]: Device with physical ID 1-1-4 was found. [ INFO] [1683619147.926434266]: Device with name Intel RealSense D435 was found. [ INFO] [1683619147.926895214]: Device with port number 1-1 was found. [ INFO] [1683619147.926933714]: Device USB type: 2.1 [ WARN] [1683619147.926952419]: Device 030422070324 is connected using a 2.1 port. Reduced performance is expected.

[ INFO] [1683619148.020269713]: JSON file is not provided [ INFO] [1683619148.020278191]: ROS Node Namespace: camera [ INFO] [1683619148.020288541]: Device Name: Intel RealSense D435 [ INFO] [1683619148.020317221]: Device Serial No: 030422070324 [ INFO] [1683619148.020330437]: Device physical port: 1-1-4 [ INFO] [1683619148.020341877]: Device FW version: 05.13.00.50 [ INFO] [1683619148.020352899]: Device Product ID: 0x0B07 [ INFO] [1683619148.020366391]: Enable PointCloud: Off [ INFO] [1683619148.020380106]: Align Depth: On [ INFO] [1683619148.020392689]: Sync Mode: On [ INFO] [1683619148.020447131]: Device Sensors: [ INFO] [1683619148.122777736]: Stereo Module was found. [ INFO] [1683619148.136705092]: RGB Camera was found. [ INFO] [1683619148.136992923]: (Confidence, 0) sensor isn't supported by current device! -- Skipping... [ INFO] [1683619148.148055246]: num_filters: 1 [ INFO] [1683619148.148127666]: Setting Dynamic reconfig parameters. [ INFO] [1683619151.339925750]: Done Setting Dynamic reconfig parameters. [ INFO] [1683619151.372374539]: depth stream is enabled - width: 640, height: 480, fps: 15, Format: Z16 [ INFO] [1683619151.372790836]: color stream is enabled - width: 640, height: 480, fps: 15, Format: RGB8

[ INFO] [1683619151.376346464]: Expected frequency for depth = 15.00000 [ INFO] [1683619151.393572625]: Expected frequency for color = 15.00000 [ INFO] [1683619151.411092762]: Expected frequency for aligned_depth_to_color = 15.00000

09/05 10:59:11,716 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 [ INFO] [1683619151.767507683]: SELECTED BASE:Depth, 0 [ INFO] [1683619151.784995317]: RealSense Node Is Up! [ WARN] [1683619151.953622606]: 09/05 10:59:11,954 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:12,004 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:12,054 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:12,104 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:12,155 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:12,205 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:12,255 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:12,306 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:12,356 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:12,406 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:12,457 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:12,507 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:12,558 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:12,608 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:12,659 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:12,709 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:12,760 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:12,810 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:12,861 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:12,911 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:12,962 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:13,013 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:13,045 ERROR [140141401626368] (uvc-streamer.cpp:106) uvc streamer watchdog triggered on endpoint: 130 09/05 10:59:13,063 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:13,114 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:13,164 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:13,215 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:13,268 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:13,318 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 [ WARN] [1683619153.341746567]: Hardware Notification:Depth stream start failure,1.68362e+12,Error,Hardware Error 09/05 10:59:14,281 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:14,332 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:14,382 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:14,534 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0 09/05 10:59:14,584 WARNING [140141955901184] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0

Edit:

When i input the command roslaunch realsense2_camera rs_camera.launch it just froze and i had to power-cycle the pc.

MartyG-RealSense commented 1 year ago

The rs_rgbd launch file has depth-color alignment enabled by default, so please try disabling alignment with the launch instruction below to see whether it reduces the number of control_transfer returned warnings.

roslaunch realsense2_camera rs_rgbd.launch align_depth:=false

mericgeren commented 1 year ago

Just tried inputting roslaunch realsense2_camera rs_rgbd.launch align_depth:=false. The pc doesn't freeze. But, this time i still get same error messages i got when i tried inputting roslaunch realsense2_camera rs_rgbd.launch

MartyG-RealSense commented 1 year ago

Is there any data displayed in RViz? Sometimes streams will perform normally in RViz even when control_transfer returned warnings are generating continuously in the ROS terminal's log.

mericgeren commented 1 year ago

When, i try to display in RViz i see "Global Status: Error" and under that Fixed Frame with a message states: "Fixed Frame [map] does not exist"

Edit: I got the status "Ok" By changing map of Fixed Frame field to "camera_color_frame" and then, get RViz to show frames coming from the camera by adding a image with "/camera/color/image_raw" at it's Image Topic field. ow, i can see frames coming from the camera in a image window to the bottom-left. But, the issue is i have to do these changes each time i want to display camera view through RViz by inputting rviz rviz

MartyG-RealSense commented 1 year ago

Is the configuration saved for the next RViz session if you go to the File menu option and select Save Config

mericgeren commented 1 year ago

When trying to Save Config a pop-up window appears which displays the message: "Failed to open /opt/ros/melodic/share/rviz/default.rviz for writing."

MartyG-RealSense commented 1 year ago

The link below suggests dealing with this error by selecting Save Config As instead of Save Config and saving a configuration to a directory inside your catkin_ws folder.

https://get-help.robotigniteacademy.com/t/cannot-save-rviz-config-file/13091

mericgeren commented 1 year ago

Thanks for the support. Just tried Save Config As to save default.rviz to a directory inside catkin workspace. But, it insisted on opening the rviz configuration file at /opt/ros/melodic/share/rviz. So, i had to use the command sudo nano /opt/ros/melodic/share/rviz/default.rviz and copy the contents of the rviz file i have saved into catkin workspace. After doing that i got my rviz configured at opening.

MartyG-RealSense commented 1 year ago

That's great to hear that you found a solution!

mericgeren commented 1 year ago

Thanks for all the support along the way. If you don't mind i am closing this issue as solved.

MartyG-RealSense commented 1 year ago

You are very welcome. I don't mind at all. :) Thanks very much for the update!