# Rviz error when launching navigation (ROS2, SE3)

**URL:** <https://forum.hello-robot.com/t/rviz-error-when-launching-navigation-ros2-se3/1044>\
**Category:** Ask\
**Created:** [July 18, 2024, 8:00pm UTC](https://forum.hello-robot.com/t/rviz-error-when-launching-navigation-ros2-se3/1044 "2024-07-18T20:00:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![allen](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/allen/32/914_2.png) [@allen](https://forum.hello-robot.com/u/allen)\
**Post date:** [July 18, 2024, 8:00pm UTC](https://forum.hello-robot.com/t/rviz-error-when-launching-navigation-ros2-se3/1044/1 "2024-07-18T20:00:12Z")

</div>

Hi,

I recently ran the following command to launch my navigation code:

```auto
ros2 launch navigation.launch.py map:=<mymap>

```

However, it failed to launch successfully. When I run the command with `use_rviz:=false`, it works fine, so I assume the issue is related to RViz. Below are some of the error logs I encountered:

 ![Screenshot 2024-07-18 at 2.56.58 PM](https://canada1.discourse-cdn.com/flex030/uploads/hello_robot2/original/1X/2c3312000f229f6df8633068c9cdf5968f43d911.jpeg)  
 ![Screenshot 2024-07-18 at 2.57.24 PM](https://canada1.discourse-cdn.com/flex030/uploads/hello_robot2/original/1X/f08a86259c72dcd8adbe2f6c8d432b95b3e7e5f7.jpeg)  
Please let me know if any information is needed! Thanks!

---

<div class="post-metadata">

**Author:** ![hello-vinitha](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/hello-vinitha/32/807_2.png) [@hello-vinitha](https://forum.hello-robot.com/u/hello-vinitha)\
**Post date:** [July 19, 2024, 8:24am UTC](https://forum.hello-robot.com/t/rviz-error-when-launching-navigation-ros2-se3/1044/2 "2024-07-19T08:24:46Z")

</div>

Hi Allen,

Could you confirm how you are connected to the robot? Did you ssh in or are directly connected to the robot via a monitor, keyboard and mouse?

---

<div class="post-metadata">

**Author:** ![allen](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/allen/32/914_2.png) [@allen](https://forum.hello-robot.com/u/allen)\
**Post date:** [July 19, 2024, 5:47pm UTC](https://forum.hello-robot.com/t/rviz-error-when-launching-navigation-ros2-se3/1044/3 "2024-07-19T17:47:12Z")

</div>

Hi @hello-vinitha,

I’m using SSH and Moonlight remote desktop to connect, but I mainly use Moonlight to launch the navigation code so I can see the Rviz2 map. Navigation was working fine a few days ago, but it recently stopped functioning.

Thanks!

---

<div class="post-metadata">

**Author:** ![Mohamed\_Fazil](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/mohamed_fazil/32/261_2.png) [@Mohamed\_Fazil](https://forum.hello-robot.com/u/Mohamed_Fazil)\
**Post date:** [July 22, 2024, 6:53pm UTC](https://forum.hello-robot.com/t/rviz-error-when-launching-navigation-ros2-se3/1044/4 "2024-07-22T18:53:31Z")

</div>

Hi @allen, I believe this issue got fixed with our recent [bug fix](https://github.com/hello-robot/stretch_ros2/commit/d8ce9660e3d922cbdfc6d18f3cb887ba2b38e2b2) to Stretch ROS2. It is related to a bug where importing `cv2` causes other QT applications to crash, which is Rviz, in your case, exits the demo. Have described it in his post

> [@QT applications error out due to conflict with cv2 (Could not load the Qt platform plugin "xcb")](https://forum.hello-robot.com/t/qt-applications-error-out-due-to-conflict-with-cv2-could-not-load-the-qt-platform-plugin-xcb/1047):
>
> We would like to address an existing bug that will likely occur using Python scripts that import the cv2 library and have a component that uses the linux apt installed QT platform to run a GUI. The error output would look like the following: 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. This application failed to start because no Qt platform plugin could be initialized. Reinstalling …

Could you pull the latest `stretch_ros2` repository updates, rebuild your workspace, and then try re-running the demo?

---

<div class="post-metadata">

**Author:** ![allen](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/allen/32/914_2.png) [@allen](https://forum.hello-robot.com/u/allen)\
**Post date:** [July 22, 2024, 7:24pm UTC](https://forum.hello-robot.com/t/rviz-error-when-launching-navigation-ros2-se3/1044/5 "2024-07-22T19:24:44Z")

</div>

Hi @Mohamed_Fazil ! It works now, thanks so much!
