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

errors when roslaunch with LR200 #2103

Closed
wenyan96 opened this issue Oct 7, 2021 · 11 comments
Closed

errors when roslaunch with LR200 #2103

wenyan96 opened this issue Oct 7, 2021 · 11 comments
Labels

Comments

@wenyan96
Copy link

wenyan96 commented Oct 7, 2021

Hi, recently i'm using LR200 to capture some rgb and depth images and want to use them in visual slam.
For this sensor LR200, i used librealsense-legacy and realsense-ros-indigo-devel. I tried mainly two method to build them.

Method 1

http://wiki.ros.org/realsense_camera/Tutorials/Building_librealsense_from_Sources
like the reference i tried to put them in the same workspace

Method 2

#386
i tried what doisyg said in this issue

For both methods i can run the examples file of librealsense like ./cpp-capture successfully. BUT i met the same error as following when i roslaunch : roslaunch realsense_camera r200_nodelet_rgbd.launch

SUMMARY

PARAMETERS`

  • /camera/camera_nodelet_manager/num_worker_threads: 4
  • /camera/depth_rectify_depth/interpolation: 0
  • /camera/disparity_depth/max_range: 4.0
  • /camera/disparity_depth/min_range: 0.5
  • /camera/disparity_registered_sw/max_range: 4.0
  • /camera/disparity_registered_sw/min_range: 0.5
  • /camera/driver/base_frame_id: camera_link
  • /camera/driver/camera_type: R200
  • /camera/driver/color_fps: 30
  • /camera/driver/color_frame_id: camera_rgb_frame
  • /camera/driver/color_height: 480
  • /camera/driver/color_optical_frame_id: camera_rgb_optica...
  • /camera/driver/color_width: 640
  • /camera/driver/depth_fps: 30
  • /camera/driver/depth_frame_id: camera_depth_frame
  • /camera/driver/depth_height: 360
  • /camera/driver/depth_optical_frame_id: camera_depth_opti...
  • /camera/driver/depth_width: 480
  • /camera/driver/enable_color: True
  • /camera/driver/enable_depth: True
  • /camera/driver/enable_fisheye: False
  • /camera/driver/enable_imu: False
  • /camera/driver/enable_ir2: True
  • /camera/driver/enable_ir: True
  • /camera/driver/enable_pointcloud: False
  • /camera/driver/enable_tf: True
  • /camera/driver/fisheye_frame_id: camera_fisheye_frame
  • /camera/driver/fisheye_optical_frame_id: camera_fisheye_op...
  • /camera/driver/imu_frame_id: camera_imu_frame
  • /camera/driver/imu_optical_frame_id: camera_imu_optica...
  • /camera/driver/ir2_frame_id: camera_ir2_frame
  • /camera/driver/ir2_optical_frame_id: camera_ir2_optica...
  • /camera/driver/ir_frame_id: camera_ir_frame
  • /camera/driver/ir_optical_frame_id: camera_ir_optical...
  • /camera/driver/mode: manual
  • /camera/driver/serial_no:
  • /camera/driver/usb_port_id:
  • /camera/points_xyzrgb_sw_registered/queue_size: 100
  • /rosdistro: noetic
  • /rosversion: 1.15.13

NODES
/camera/
camera_nodelet_manager (nodelet/nodelet)
depth_metric (nodelet/nodelet)
depth_metric_rect (nodelet/nodelet)
depth_points (nodelet/nodelet)
depth_rectify_depth (nodelet/nodelet)
depth_registered_sw_metric_rect (nodelet/nodelet)
disparity_depth (nodelet/nodelet)
disparity_registered_sw (nodelet/nodelet)
driver (nodelet/nodelet)
ir_rectify_ir (nodelet/nodelet)
points_xyzrgb_sw_registered (nodelet/nodelet)
register_depth_rgb (nodelet/nodelet)

ROS_MASTER_URI=http://localhost:11311

process[camera/camera_nodelet_manager-1]: started with pid [97411]
process[camera/driver-2]: started with pid [97412]
process[camera/ir_rectify_ir-3]: started with pid [97413]
process[camera/depth_rectify_depth-4]: started with pid [97414]
process[camera/depth_metric_rect-5]: started with pid [97419]
process[camera/depth_metric-6]: started with pid [97425]
process[camera/depth_points-7]: started with pid [97431]
[ INFO] [1633568091.946440709]: Initializing nodelet with 4 worker threads.
process[camera/register_depth_rgb-8]: started with pid [97443]
process[camera/points_xyzrgb_sw_registered-9]: started with pid [97450]
process[camera/depth_registered_sw_metric_rect-10]: started with pid [97455]
process[camera/disparity_depth-11]: started with pid [97463]
process[camera/disparity_registered_sw-12]: started with pid [97468]
[ERROR] [1633568092.319503431]: Failed to load nodelet [/camera/driver] of type [realsense_camera/R200Nodelet] even after refreshing the cache: Failed to load library /home/wenyan/Documents/rs_ros/devel/lib//librealsense_camera_nodelet.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /home/wenyan/Documents/rs_ros/devel/lib//librealsense_camera_nodelet.so: undefined symbol: _ZN2cv6String10deallocateEv)
[ERROR] [1633568092.319575260]: The error before refreshing the cache was: Failed to load library /home/wenyan/Documents/rs_ros/devel/lib//librealsense_camera_nodelet.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /home/wenyan/Documents/rs_ros/devel/lib//librealsense_camera_nodelet.so: undefined symbol: _ZN2cv6String10deallocateEv)
[FATAL] [1633568092.319764125]: Failed to load nodelet '/camera/driver` of type `realsense_camera/R200Nodelet` to manager `camera_nodelet_manager'
[camera/driver-2] process has died [pid 97412, exit code 255, cmd /opt/ros/noetic/lib/nodelet/nodelet load realsense_camera/R200Nodelet camera_nodelet_manager depth:=depth color:=rgb rgb/image_raw:=rgb/image_rect_color ir:=ir ir2:=ir2 fisheye:=fisheye imu:=imu __name:=driver __log:=/home/wenyan/.ros/log/5b53a102-2694-11ec-87ac-270be475c52c/camera-driver-2.log].
log file: /home/wenyan/.ros/log/5b53a102-2694-11ec-87ac-270be475c52c/camera-driver-2*.log

I did find similar errors in some issues, but no one's error like undefined symbol: _ZN2cv6String10deallocateEv), and librealsense_camera_nodelet.so exists in the folder... After check the difference between R200 and LR200, i'm not sure if the error is caused by wrong sensor type? i shouldn't use launch file of r200 but of lr200? For the sensor LR200, i found this issue #245, but i'm still confused about how i should change the files in realsense-ros folder.. Could you give me more details?

OR maybe it's not the reason, there are still other problems?

Really looking forward to any response and appreciate for your help in advance!!!

System Configuration

Version Your Configuration
Operating System Ubuntu 20.04.3 LTS
Kernel 5.11.0-37-generic
ROS noetic
ROS RealSense ?
librealsense legacy
Camera Type-Firmware Intel RealSense LR200, Camera FW: 2.0.71.18
@MartyG-RealSense
Copy link
Collaborator

Hi @wenyan96 The LR200 (a variant of the R200) is listed in the Legacy Librealsense SDK's front-page documentation as being officially compatible with that SDK. My recollection is that R200 ROS launch files could be used with the ZR300 (the successor to the R200), so using a launch file designed for the R200 with the LR200 model is not necessarily a problem. I note though that in regard to realsense_camera, its documentation does list support for ZR300 but not LR200 specifically.

http://wiki.ros.org/realsense_camera#Supported_Camera_Types

Are you able to launch successfully if you use r200_nodelet_default.launch instead of r200_nodelet_rgbd.launch

@wenyan96
Copy link
Author

wenyan96 commented Oct 7, 2021

@MartyG-RealSense Hi, i tried r200_nodelet_default.launch but had the same error.

[ERROR] [1633595023.753421562]: Failed to load nodelet [/camera/driver] of type [realsense_camera/R200Nodelet] even after refreshing the cache: Failed to load library /home/wenyan/Documents/rs_ros/devel/lib//librealsense_camera_nodelet.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /home/wenyan/Documents/rs_ros/devel/lib//librealsense_camera_nodelet.so: undefined symbol: _ZN2cv6String10deallocateEv)
[ERROR] [1633595023.753495533]: The error before refreshing the cache was: Failed to load library /home/wenyan/Documents/rs_ros/devel/lib//librealsense_camera_nodelet.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /home/wenyan/Documents/rs_ros/devel/lib//librealsense_camera_nodelet.so: undefined symbol: _ZN2cv6String10deallocateEv)
[FATAL] [1633595023.753739135]: Failed to load nodelet '/camera/driver` of type `realsense_camera/R200Nodelet` to manager `nodelet_manager'
[camera/driver-2] process has died [pid 106175, exit code 255, cmd /opt/ros/noetic/lib/nodelet/nodelet load realsense_camera/R200Nodelet nodelet_manager depth:=depth color:=color ir:=ir ir2:=ir2 fisheye:=fisheye imu:=imu __name:=driver __log:=/home/wenyan/.ros/log/5b53a102-2694-11ec-87ac-270be475c52c/camera-driver-2.log].
log file: /home/wenyan/.ros/log/5b53a102-2694-11ec-87ac-270be475c52c/camera-driver-2*.log

From issue #245 i thought he/she can run roslaunch with LR200, and i checked the mentioned constants.h file, there are indeed some constants of LR200 in the code.. To avoid the case that i build realsense_camera incorrectly, i'd like to write down what i did as following:

  • build librealsense and can run the files in the example file correctly, and then add export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" in .bashrc and source it.
  • create a catkin_workspace and save indigo-devel branch in catkin_ws/src
  • modify the CMakelists.txt like https://github.com/intel-ros/realsense/files/2401961/CMakeLists.txt.. i just change c++ from 11 to 14 based on it.
  • rosdep update && rosdep install --skip-keys=librealsense --from-paths /home/wenyan/Documents/librealsense/ (this is the path of the clone repo of librealsense, i found this in Cannot install realsense_camera #63 (comment) )
  • catkin_make and source devel/setup.bash
  • roslaunch ---> error

@MartyG-RealSense
Copy link
Collaborator

I will highlight your case to Doronhi the RealSense ROS wrapper developer. Thanks very much for your patience!

@wenyan96
Copy link
Author

wenyan96 commented Oct 7, 2021

@MartyG-RealSense Ok! Thank you and look forward to your good news!

@doronhi
Copy link
Contributor

doronhi commented Oct 10, 2021

Hi,
Just a thought: The error message you receive, undefined symbol: _ZN2cv6String10deallocateEv) relates to the opencv function deallocateEv. I think the issue has more to do with a mix of old ROS distributions and newer opencv. Searching around for this error and ROS I found this link: https://answers.ros.org/question/219640/reference-errors-after-opencv3-installation.
It basically says to get rid of all installations of new opencv versions.

@MartyG-RealSense
Copy link
Collaborator

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

@wenyan96
Copy link
Author

@doronhi Thanks for your reply! But it may not work for me now since i have to work with lots of codes in newer opencv versions... Modifying them could be an extra task..

@wenyan96
Copy link
Author

@MartyG-RealSense Sorry for the late reply. I tried to use librealsense to grab images and etc.. It works for me. maybe i'll try the method mentioned by doronhi afterwards. Thank you all!

@MartyG-RealSense
Copy link
Collaborator

No problem at all, @wenyan96 - good luck with your tests!

@MartyG-RealSense
Copy link
Collaborator

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

@MartyG-RealSense
Copy link
Collaborator

Case closed due to no further comments received.

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