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

visp_auto_tracker: How do I connect with realsense? #141

Open
adamheo-inha opened this issue Aug 13, 2024 · 1 comment
Open

visp_auto_tracker: How do I connect with realsense? #141

adamheo-inha opened this issue Aug 13, 2024 · 1 comment

Comments

@adamheo-inha
Copy link

Hello.

I want to try visp_auto_tracker with realsense product (D455 or D435).
I use 22.04 & humble.
I put vision_visp and realsense in the same src and build it.
I tried launch visp while receiving topic from realsense, but it failed.

$ ros2 launch realsense2_camera rs_launch.py

$ ros2 launch visp_auto_tracker tracklive_usb.xml 
[INFO] [launch]: All log files can be found below /home/adamheo/.ros/log/2024-08-13-16-39-15-737063-u22-69591
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [visp_auto_tracker_main-1]: process started with pid [69592]
[INFO] [usb_cam_node_exe-2]: process started with pid [69594]
[usb_cam_node_exe-2] [INFO] [1723534755.847504597] [usb_cam]: camera_name value: /camera/image_raw
[usb_cam_node_exe-2] [WARN] [1723534755.847560865] [usb_cam]: framerate: 30.000000
[usb_cam_node_exe-2] [INFO] [1723534755.848445402] [usb_cam]: camera calibration URL: package://visp_auto_tracker/models/calibration.ini
[usb_cam_node_exe-2] [INFO] [1723534755.848932148] [usb_cam]: Starting '/camera/image_raw' (/dev/video0) at 640x480 via mmap (yuyv) at 30 FPS
[usb_cam_node_exe-2] This device supports the following formats:
[usb_cam_node_exe-2] 	16-bit Depth 256 x 144 (90 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 424 x 240 (90 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 424 x 240 (60 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 424 x 240 (30 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 424 x 240 (15 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 424 x 240 (5 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 480 x 270 (90 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 480 x 270 (60 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 480 x 270 (30 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 480 x 270 (15 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 480 x 270 (5 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 640 x 360 (90 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 640 x 360 (60 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 640 x 360 (30 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 640 x 360 (15 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 640 x 360 (5 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 640 x 480 (90 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 640 x 480 (60 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 640 x 480 (30 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 640 x 480 (15 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 640 x 480 (5 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 848 x 100 (100 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 848 x 480 (90 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 848 x 480 (60 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 848 x 480 (30 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 848 x 480 (15 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 848 x 480 (5 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 1280 x 720 (30 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 1280 x 720 (15 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 1280 x 720 (5 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 256 x 144 (90 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 424 x 240 (90 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 424 x 240 (60 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 424 x 240 (30 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 424 x 240 (15 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 424 x 240 (5 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 480 x 270 (90 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 480 x 270 (60 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 480 x 270 (30 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 480 x 270 (15 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 480 x 270 (5 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 640 x 360 (90 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 640 x 360 (60 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 640 x 360 (30 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 640 x 360 (15 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 640 x 360 (5 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 640 x 480 (90 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 640 x 480 (60 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 640 x 480 (30 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 640 x 480 (15 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 640 x 480 (5 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 848 x 100 (100 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 848 x 480 (90 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 848 x 480 (60 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 848 x 480 (30 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 848 x 480 (15 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 848 x 480 (5 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 1280 x 720 (30 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 1280 x 720 (15 Hz)
[usb_cam_node_exe-2] 	16-bit Depth 1280 x 720 (5 Hz)
[usb_cam_node_exe-2] terminate called after throwing an instance of 'std::invalid_argument'
[usb_cam_node_exe-2]   what():  Specified format `yuyv` is unsupported by the selected device `/dev/video0`
[visp_auto_tracker_main-1] [WARN] [1723534755.882686187] [rclcpp]: li: verbose= 1
[visp_auto_tracker_main-1] [WARN] [1723534755.882722334] [rclcpp]: li: data-directory= /home/dt/data/
[visp_auto_tracker_main-1] [WARN] [1723534755.882727719] [rclcpp]: li: #single-image= QRPattern.png
[visp_auto_tracker_main-1] [WARN] [1723534755.882730791] [rclcpp]: li: video-input-path=images/%010d.ppm
[visp_auto_tracker_main-1] [WARN] [1723534755.882733544] [rclcpp]: li: detector-type= zbar 
[visp_auto_tracker_main-1] [WARN] [1723534755.882736096] [rclcpp]: li: ad-hoc-recovery= 1
[visp_auto_tracker_main-1] [WARN] [1723534755.882738428] [rclcpp]: li: mbt-convergence-steps= 1
[visp_auto_tracker_main-1] [WARN] [1723534755.882741534] [rclcpp]: li: log-pose= 1
[visp_auto_tracker_main-1] [WARN] [1723534755.882746655] [rclcpp]: li: 
[visp_auto_tracker_main-1] [WARN] [1723534755.882748940] [rclcpp]: li: #point 1
[visp_auto_tracker_main-1] [WARN] [1723534755.882751232] [rclcpp]: li: flashcode-coordinates= -0.0255
[visp_auto_tracker_main-1] [WARN] [1723534755.882772511] [rclcpp]: li: flashcode-coordinates= -0.0255
[visp_auto_tracker_main-1] [WARN] [1723534755.882775782] [rclcpp]: li: flashcode-coordinates= 0.000
[visp_auto_tracker_main-1] [WARN] [1723534755.882778641] [rclcpp]: li: #point 2
[visp_auto_tracker_main-1] [WARN] [1723534755.882781099] [rclcpp]: li: flashcode-coordinates= 0.0255
[visp_auto_tracker_main-1] [WARN] [1723534755.882783760] [rclcpp]: li: flashcode-coordinates= -0.0255
[visp_auto_tracker_main-1] [WARN] [1723534755.882786376] [rclcpp]: li: flashcode-coordinates= 0.000
[visp_auto_tracker_main-1] [WARN] [1723534755.882788769] [rclcpp]: li: #point 3
[visp_auto_tracker_main-1] [WARN] [1723534755.882790829] [rclcpp]: li: flashcode-coordinates= 0.0255
[visp_auto_tracker_main-1] [WARN] [1723534755.882793247] [rclcpp]: li: flashcode-coordinates= 0.0255
[visp_auto_tracker_main-1] [WARN] [1723534755.882795573] [rclcpp]: li: flashcode-coordinates= 0.000
[visp_auto_tracker_main-1] [WARN] [1723534755.882798230] [rclcpp]: li: #point 4
[visp_auto_tracker_main-1] [WARN] [1723534755.882800298] [rclcpp]: li: flashcode-coordinates= -0.0255
[visp_auto_tracker_main-1] [WARN] [1723534755.882802971] [rclcpp]: li: flashcode-coordinates= 0.0255
[visp_auto_tracker_main-1] [WARN] [1723534755.882805389] [rclcpp]: li: flashcode-coordinates= 0.000
[visp_auto_tracker_main-1] [WARN] [1723534755.882807705] [rclcpp]: li: 
[visp_auto_tracker_main-1] [WARN] [1723534755.882809828] [rclcpp]: li: #point 1
[visp_auto_tracker_main-1] [WARN] [1723534755.882811984] [rclcpp]: li: inner-coordinates= -0.03825
[visp_auto_tracker_main-1] [WARN] [1723534755.882815232] [rclcpp]: li: inner-coordinates= -0.03825
[visp_auto_tracker_main-1] [WARN] [1723534755.882817768] [rclcpp]: li: inner-coordinates= 0.000
[visp_auto_tracker_main-1] [WARN] [1723534755.882820298] [rclcpp]: li: #point 2
[visp_auto_tracker_main-1] [WARN] [1723534755.882822347] [rclcpp]: li: inner-coordinates= 0.03825
[visp_auto_tracker_main-1] [WARN] [1723534755.882824816] [rclcpp]: li: inner-coordinates= -0.03825
[visp_auto_tracker_main-1] [WARN] [1723534755.882827360] [rclcpp]: li: inner-coordinates= 0.000
[visp_auto_tracker_main-1] [WARN] [1723534755.882829587] [rclcpp]: li: #point 3
[visp_auto_tracker_main-1] [WARN] [1723534755.882831610] [rclcpp]: li: inner-coordinates= 0.03825
[visp_auto_tracker_main-1] [WARN] [1723534755.882833888] [rclcpp]: li: inner-coordinates= 0.03825
[visp_auto_tracker_main-1] [WARN] [1723534755.882836159] [rclcpp]: li: inner-coordinates= 0.000
[visp_auto_tracker_main-1] [WARN] [1723534755.882838612] [rclcpp]: li: #point 4
[visp_auto_tracker_main-1] [WARN] [1723534755.882840648] [rclcpp]: li: inner-coordinates= -0.03825
[visp_auto_tracker_main-1] [WARN] [1723534755.882842909] [rclcpp]: li: inner-coordinates= 0.03825
[visp_auto_tracker_main-1] [WARN] [1723534755.882845186] [rclcpp]: li: inner-coordinates= 0.000
[visp_auto_tracker_main-1] [WARN] [1723534755.882847384] [rclcpp]: li: 
[visp_auto_tracker_main-1] [WARN] [1723534755.882849515] [rclcpp]: li: #point 1
[visp_auto_tracker_main-1] [WARN] [1723534755.882851601] [rclcpp]: li: outer-coordinates= -0.0765
[visp_auto_tracker_main-1] [WARN] [1723534755.882854178] [rclcpp]: li: outer-coordinates= -0.0765
[visp_auto_tracker_main-1] [WARN] [1723534755.882856616] [rclcpp]: li: outer-coordinates= 0.000
[visp_auto_tracker_main-1] [WARN] [1723534755.882859044] [rclcpp]: li: #point 2
[visp_auto_tracker_main-1] [WARN] [1723534755.882861081] [rclcpp]: li: outer-coordinates= 0.0765
[visp_auto_tracker_main-1] [WARN] [1723534755.882863426] [rclcpp]: li: outer-coordinates= -0.0765
[visp_auto_tracker_main-1] [WARN] [1723534755.882865899] [rclcpp]: li: outer-coordinates= 0.000
[visp_auto_tracker_main-1] [WARN] [1723534755.882868128] [rclcpp]: li: #point 3
[visp_auto_tracker_main-1] [WARN] [1723534755.882870206] [rclcpp]: li: outer-coordinates= 0.0765
[visp_auto_tracker_main-1] [WARN] [1723534755.882872487] [rclcpp]: li: outer-coordinates= 0.0765
[visp_auto_tracker_main-1] [WARN] [1723534755.882874700] [rclcpp]: li: outer-coordinates= 0.000
[visp_auto_tracker_main-1] [WARN] [1723534755.882877100] [rclcpp]: li: #point 4
[visp_auto_tracker_main-1] [WARN] [1723534755.882879140] [rclcpp]: li: outer-coordinates= -0.0765
[visp_auto_tracker_main-1] [WARN] [1723534755.882881401] [rclcpp]: li: outer-coordinates= 0.0765
[visp_auto_tracker_main-1] [WARN] [1723534755.882883606] [rclcpp]: li: outer-coordinates= 0.000
[visp_auto_tracker_main-1] [WARN] [1723534755.882885811] [rclcpp]: li: 
[visp_auto_tracker_main-1] [WARN] [1723534755.882888012] [rclcpp]: li: #variance-file=var.txt
[visp_auto_tracker_main-1] [WARN] [1723534755.882890506] [rclcpp]: li: #variance-limit=0.03
[visp_auto_tracker_main-1] [INFO] [1723534755.882946573] [rclcpp]: Loaded 4 flashcode extremity points, 4 inner contour points and 4 outer contour points.
[visp_auto_tracker_main-1] [INFO] [1723534755.882964401] [rclcpp]: Tracker set to:hybrid (mbt+klt)
[visp_auto_tracker_main-1] [INFO] [1723534755.882967555] [rclcpp]: Detector set to:QR code
[visp_auto_tracker_main-1] [INFO] [1723534755.883143826] [rclcpp]: Model content=V1
[visp_auto_tracker_main-1] # 3D Points
[visp_auto_tracker_main-1] 8                  # Number of points
[visp_auto_tracker_main-1] -0.0765  -0.0765	0.000  # Point 0: X Y Z
[visp_auto_tracker_main-1]  0.0765  -0.0765	0.000
[visp_auto_tracker_main-1]  0.0765   0.0765	0.000
[visp_auto_tracker_main-1] -0.0765   0.0765	0.000
[visp_auto_tracker_main-1] -0.03825 -0.03825	0.000	
[visp_auto_tracker_main-1]  0.03825 -0.03825	0.000
[visp_auto_tracker_main-1]  0.03825  0.03825	0.000
[visp_auto_tracker_main-1] -0.03825  0.03825 0.000  # Point 7
[visp_auto_tracker_main-1] # 3D Lines
[visp_auto_tracker_main-1] 0                  # Number of lines
[visp_auto_tracker_main-1] # Faces from 3D lines
[visp_auto_tracker_main-1] 0                  # Number of faces
[visp_auto_tracker_main-1] # Faces from 3D points
[visp_auto_tracker_main-1] 2                  # Number of faces
[visp_auto_tracker_main-1] 4 0 1 2 3          # Face 0: [number of points] [index of the 3D points]...
[visp_auto_tracker_main-1] 4 4 5 6 7
[visp_auto_tracker_main-1] # 3D cylinders
[visp_auto_tracker_main-1] 0                  # Number of cylinders
[visp_auto_tracker_main-1] # 3D circles
[visp_auto_tracker_main-1] 0                  # Number of circles
[visp_auto_tracker_main-1] 
[visp_auto_tracker_main-1] terminate called after throwing an instance of 'vpException'
[visp_auto_tracker_main-1]   what():  QRCode detector not available. libzbar support is missing
[ERROR] [usb_cam_node_exe-2]: process has died [pid 69594, exit code -6, cmd '/opt/ros/humble/lib/usb_cam/usb_cam_node_exe --ros-args -r __node:=usb_cam --params-file /tmp/launch_params_clwyuvy7 --params-file /tmp/launch_params_m8po4_14 --params-file /tmp/launch_params_z_0ppmob --params-file /tmp/launch_params_pf_c5sg_ --params-file /tmp/launch_params_w6k2fhi0 --params-file /tmp/launch_params_bomkvn3t'].
[ERROR] [visp_auto_tracker_main-1]: process has died [pid 69592, exit code -6, cmd '/home/adamheo/pitin_ws/install/visp_auto_tracker/lib/visp_auto_tracker/visp_auto_tracker_main --ros-args -r __node:=visp_auto_tracker --params-file /tmp/launch_params_wvf2tkgt --params-file /tmp/launch_params_kmyq7dtf --params-file /tmp/launch_params_g9bdyn79 --params-file /tmp/launch_params_vucw2vk8 -r /camera/camera_info:=/camera_info -r /camera/image_raw:=/image_raw'].

Please let me know which part I need to modify to solve this issue.

@fspindle
Copy link
Contributor

You should install libzbar-dev ubuntu package, and rebuild ViSP ensuring the in visp-build/ViSP-third-party.txt file you see something similar to:

  Detection:
    Use zbar:                    yes (ver 0.2x.yy)

Then, you need also to rebuild visp_auto_tracker ros package.

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

No branches or pull requests

2 participants