Issues with Demo FUNmap Script on Stretch3

From these demo instructions (Demo 1 - Mapping & Navigation - Stretch Docs), we were unable to get FUNmap script to work as RViz does not show up.
Script: ros2 launch stretch_funmap mapping.launch.py

I have attached ROS logs but I did not see any glaring errors…

hello-robot@stretch-se3-3059:~$ ros2 launch stretch_funmap mapping.launch.py
[INFO] [launch]: All log files can be found below /home/hello-robot/.ros/log/2025-03-17-11-00-22-634293-stretch-se3-3059-6478
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [launch.user]: D435i launched in high resolution
[INFO] [realsense2_camera_node-1]: process started with pid [6495]
[INFO] [stretch_driver-5]: process started with pid [6503]
[INFO] [d435i_accel_correction-2]: process started with pid [6497]
[INFO] [joint_state_publisher-3]: process started with pid [6499]
[INFO] [robot_state_publisher-4]: process started with pid [6501]
[INFO] [funmap-6]: process started with pid [6505]
[INFO] [rviz2-7]: process started with pid [6507]
[rviz2-7] QObject::moveToThread: Current thread (0x5cf4c763a170) is not the object's thread (0x5cf4c7642640).
[rviz2-7] Cannot move to target thread (0x5cf4c763a170)
[rviz2-7] 
[rviz2-7] qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/hello-robot/.local/lib/python3.10/site-packages/cv2/qt/plugins" even though it was found.
[rviz2-7] This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
[rviz2-7] 
[rviz2-7] Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc.
[rviz2-7] 
[d435i_accel_correction-2] [INFO] [1742234423.435820331] [d435i_accel_correction_node]: d435i_accel_correction_node started
[realsense2_camera_node-1] [INFO] [1742234423.724156445] [camera]: RealSense ROS v4.55.1
[realsense2_camera_node-1] [INFO] [1742234423.724265744] [camera]: Built with LibRealSense v2.55.1
[realsense2_camera_node-1] [INFO] [1742234423.724278859] [camera]: Running with LibRealSense v2.55.1
[realsense2_camera_node-1] [INFO] [1742234423.815840411] [camera]: Device with serial number 239122074250 was found.
[realsense2_camera_node-1] 
[realsense2_camera_node-1] [INFO] [1742234423.815912055] [camera]: Device with physical ID /sys/devices/pci0000:00/0000:00:0d.0/usb2/2-1/2-1:1.0/video4linux/video0 was found.
[realsense2_camera_node-1] [INFO] [1742234423.815923039] [camera]: Device with name Intel RealSense D435I was found.
[realsense2_camera_node-1] [INFO] [1742234423.816107385] [camera]: Device with port number 2-1 was found.
[realsense2_camera_node-1] [INFO] [1742234423.816122252] [camera]: Device USB type: 3.2
[realsense2_camera_node-1] [INFO] [1742234423.816131349] [camera]: Resetting device...
[ERROR] [rviz2-7]: process has died [pid 6507, exit code -6, cmd '/opt/ros/humble/lib/rviz2/rviz2 -d /home/hello-robot/ament_ws/install/stretch_funmap/share/stretch_funmap/rviz/stretch_mapping.rviz --ros-args'].
[funmap-6] /home/hello-robot/ament_ws/src/stretch_ros2/stretch_funmap/.venv/lib/python3.10/site-packages/matplotlib/projections/__init__.py:63: UserWarning: Unable to import Axes3D. This may be due to multiple versions of Matplotlib being installed (e.g. as a system package and as a pip package). As a result, the 3D projection is not available.
[funmap-6]   warnings.warn("Unable to import Axes3D. This may be due to multiple versions of "
[stretch_driver-5] [INFO] [1742234424.422857068] [stretch_driver]: For use with S T R E T C H (TM) RESEARCH EDITION from Hello Robot Inc.
[stretch_driver-5] [INFO] [1742234424.423135931] [stretch_driver]: stretch_driver started
[funmap-6] [INFO] [1742234424.987574056] [funmap]: funmap started
[stretch_driver-5] [WARN] [1742234425.160633758] [stretch_driver]: Robot not homed. Call /home_the_robot service.
[stretch_driver-5] Key mapped to End-Of-Arm Tool: eoa_wrist_dw3_tool_sg3
[stretch_driver-5] [INFO] [1742234426.184210075] [stretch_driver]: Changed to mode = position
[stretch_driver-5] [INFO] [1742234426.186753352] [stretch_driver]: broadcast_odom_tf = True
[stretch_driver-5] [INFO] [1742234426.217347206] [stretch_driver]: rate = 30.0 Hz
[stretch_driver-5] [INFO] [1742234426.217660235] [stretch_driver]: twist timeout = 0.5 s
[stretch_driver-5] [INFO] [1742234426.217867978] [stretch_driver]: base_frame_id = base_link
[stretch_driver-5] [INFO] [1742234426.218062625] [stretch_driver]: odom_frame_id = odom
[funmap-6] [INFO] [1742234426.280022562] [funmap]: Node funmap connected to /home_the_robot service.
[funmap-6] [INFO] [1742234426.281099635] [funmap]: Node funmap connected to /stow_the_robot service.
[funmap-6] [INFO] [1742234426.282440289] [funmap]: Node funmap connected to /stop_the_robot service.
[funmap-6] [INFO] [1742234426.283342784] [funmap]: Node funmap connected to /switch_to_trajectory_mode service.
[funmap-6] [INFO] [1742234426.284106423] [funmap]: Node funmap connected to /switch_to_position_mode service.
[funmap-6] [INFO] [1742234426.284913848] [funmap]: Node funmap connected to /switch_to_navigation_mode service.
[funmap-6] [INFO] [1742234426.288832598] [funmap]: Node funmap waiting to receive first point cloud.
[realsense2_camera_node-1] [INFO] [1742234430.003039234] [camera]: Device with serial number 239122074250 was found.
[realsense2_camera_node-1] 
[realsense2_camera_node-1] [INFO] [1742234430.003087585] [camera]: Device with physical ID /sys/devices/pci0000:00/0000:00:0d.0/usb2/2-1/2-1:1.0/video4linux/video0 was found.
[realsense2_camera_node-1] [INFO] [1742234430.003098589] [camera]: Device with name Intel RealSense D435I was found.
[realsense2_camera_node-1] [INFO] [1742234430.003231881] [camera]: Device with port number 2-1 was found.
[realsense2_camera_node-1] [INFO] [1742234430.003242873] [camera]: Device USB type: 3.2
[realsense2_camera_node-1] [INFO] [1742234430.003626436] [camera]: getParameters...
[realsense2_camera_node-1] [INFO] [1742234430.337820503] [camera]: JSON file is loaded! (/home/hello-robot/ament_ws/install/stretch_core/share/stretch_core/config/HighAccuracyPreset.json)
[realsense2_camera_node-1] [INFO] [1742234430.337943071] [camera]: Device Name: Intel RealSense D435I
[realsense2_camera_node-1] [INFO] [1742234430.337962375] [camera]: Device Serial No: 239122074250
[realsense2_camera_node-1] [INFO] [1742234430.337977746] [camera]: Device physical port: /sys/devices/pci0000:00/0000:00:0d.0/usb2/2-1/2-1:1.0/video4linux/video0
[realsense2_camera_node-1] [INFO] [1742234430.337992486] [camera]: Device FW version: 5.15.1
[realsense2_camera_node-1] [INFO] [1742234430.338005601] [camera]: Device Product ID: 0x0B3A
[realsense2_camera_node-1] [INFO] [1742234430.338017840] [camera]: Sync Mode: On
[realsense2_camera_node-1] [WARN] [1742234430.445617276] [camera]: re-enable the stream for the change to take effect.
[realsense2_camera_node-1] [WARN] [1742234430.446120854] [camera]: re-enable the stream for the change to take effect.
[realsense2_camera_node-1] [WARN] [1742234430.450797196] [camera]: re-enable the stream for the change to take effect.
[realsense2_camera_node-1] [ERROR] [1742234430.451177976] [camera]: Given value, 63 is invalid. Set ROS param back to: 100
[realsense2_camera_node-1] [INFO] [1742234430.454140841] [camera]: Stopping Sensor: Depth Module
[realsense2_camera_node-1] [INFO] [1742234430.454204490] [camera]: Stopping Sensor: RGB Camera
[realsense2_camera_node-1] [INFO] [1742234430.454217850] [camera]: Stopping Sensor: Motion Module
[realsense2_camera_node-1] [INFO] [1742234430.471588544] [camera]: Starting Sensor: Depth Module
[realsense2_camera_node-1] [INFO] [1742234430.474213102] [camera]: Open profile: stream_type: Depth(0), Format: Z16, Width: 1280, Height: 720, FPS: 15
[realsense2_camera_node-1] [INFO] [1742234430.477680219] [camera]: Starting Sensor: RGB Camera
[realsense2_camera_node-1] [INFO] [1742234430.480274548] [camera]: Open profile: stream_type: Color(0), Format: RGB8, Width: 1280, Height: 720, FPS: 15
[realsense2_camera_node-1] [INFO] [1742234430.507457501] [camera]: Starting Sensor: Motion Module
[realsense2_camera_node-1] [INFO] [1742234430.508561032] [camera]: Open profile: stream_type: Accel(0)Format: MOTION_XYZ32F, FPS: 100
[realsense2_camera_node-1] [INFO] [1742234430.508591693] [camera]: Open profile: stream_type: Gyro(0)Format: MOTION_XYZ32F, FPS: 200
[realsense2_camera_node-1] [INFO] [1742234430.510083392] [camera]: RealSense Node Is Up!
[funmap-6] [INFO] [1742234431.296783104] [funmap]: Node funmap received first point cloud, so continuing.
[funmap-6] [INFO] [1742234431.323825769] [stretch_funmap]: MoveBase __init__: self.debug_directory = /home/hello-robot/stretch_user/debug/

Hey @zyaskawa, the QT error is the issue.

@Mohamed_Fazil has more details about the issue in his post here: QT applications error out due to conflict with cv2 (Could not load the Qt platform plugin "xcb")

Would you try adding the below to mapping.launch.py? You’ll need to recompile the Ament workspace as well.

import os

os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = '/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so'
1 Like

Thank you for the suggestion! I believe I am now able to FUNmap!

1 Like