ms-iot / ROSOnWindows

ROS on Windows Documentation Repository
https://aka.ms/ros/docs
MIT License
213 stars 49 forks source link

Rviz not opening #366

Open marpeja opened 2 years ago

marpeja commented 2 years ago

I didn't have any problems until now opening Rviz, however, when trying to open it now I get the following traceback and it just stays like this:

image

I get this after typing in a cmd run as administrator the following sequence:

c:\opt\ros\foxy\x64\setup.bat c:\opt\ros\foxy\x64\share\gazebo\setup.bat set "SDF_PATH=c:\opt\ros\foxy\x64\share\sdformat\1.6" cd c:\nav2_ws install\setup.bat set GAZEBO_MODEL_PATH=C:\nav2_ws\install\turtlebot3_gazebo\share\turtlebot3_gazebo\models;%GAZEBO_MODEL_PATH% set TURTLEBOT3_MODEL=waffle ros2 launch turtlebot3_navigation2 navigation2.launch.py map:=c:\nav2_ws\map.yaml

Athough with that same sequence but changing the last line for ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py I had no problems launching gazebo.

I tried deleting and installing everything again (ros2 and nav2 according to your tutorials) but it keeps like this.

I also tried following this shorter sequence, but the output is the same:

cd c:\nav2_ws install\setup.bat set GAZEBO_MODEL_PATH=C:\nav2_ws\install\turtlebot3_gazebo\share\turtlebot3_gazebo\models;%GAZEBO_MODEL_PATH% set TURTLEBOT3_MODEL=waffle ros2 launch turtlebot3_navigation2 navigation2.launch.py map:=c:\nav2_ws\map.yaml

Moreover I tried just to launch rviz with ros2 run rviz2 rviz2 and it does start: image

Any idea if I am doing something wrong?

AB#509373

ooeygui commented 2 years ago

In the chocolatey package rviz2.exe is included twice - once in foxy\x64\bin and once in foxy\x64\Lib. Running from Bin (the path) causes rviz2 to fail due to linker issues. running from lib works as expected.

Which is weird.

Workaround is to delete the rviz2.exe in the bin directory. I'll root cause.