cyberbotics / webots

Webots Robot Simulator
https://cyberbotics.com
Apache License 2.0
3.22k stars 1.69k forks source link

Fail to install webots on WSL2 Ubuntu-22.04 #6570

Open Roberyan opened 3 months ago

Roberyan commented 3 months ago

Describe the Bug Though appointing WEBOTS_HOME,ros2 launch webots_ros2_universal_robot multirobot_launch.py cmd always says "Do you want Webots R2023b to be automatically installed in C:\Program Files\Webots ([Y]es/[N]o)?" And this will fails with [ERROR] [launch]: Caught exception in launch (see debug for traceback): Caught exception when trying to load file of format [py]: [Errno 2] No such file or directory: '/mnt/c/Temp/webots-R2023b_setup.exe' regardless the WEBOTS_HOME

Cmds & results

lby@Roberyan-LAPTOP-U9RB9KFV:~/ros2_ws$ ls "$WEBOTS_HOME"
webots-R2023b_setup.exe
lby@Roberyan-LAPTOP-U9RB9KFV:~/ros2_ws$ echo $WEBOTS_HOME
/mnt/d/Linux/ROS/Webots
lby@Roberyan-LAPTOP-U9RB9KFV:~/ros2_ws$ ros2 launch webots_ros2_universal_robot multirobot_launch.py
[INFO] [launch]: All log files can be found below /home/lby/.ros/log/2024-07-01-18-14-28-674988-Roberyan-LAPTOP-U9RB9KFV-80794
[INFO] [launch]: Default logging verbosity is set to INFO
WARNING: Webots directory `/mnt/d/Linux/ROS/Webots` specified in `WEBOTS_HOME` is not a valid Webots directory or is not found.
Webots R2023b was not found in your system.
- If you want to manually install Webots R2023b please download it from https://github.com/cyberbotics/webots/releases/tag/R2023b.
- If you already have Webots R2023b installed please then specify the `WEBOTS_HOME` environment variable.

Do you want Webots R2023b to be automatically installed in C:\Program Files\Webots ([Y]es/[N]o)?: n
Missing Webots version R2023b
lby@Roberyan-LAPTOP-U9RB9KFV:~/ros2_ws$ ros2 launch webots_ros2_universal_robot multirobot_launch.py
[INFO] [launch]: All log files can be found below /home/lby/.ros/log/2024-07-01-18-14-55-419132-Roberyan-LAPTOP-U9RB9KFV-81038
[INFO] [launch]: Default logging verbosity is set to INFO
WARNING: Webots directory `/mnt/d/Linux/ROS/Webots` specified in `WEBOTS_HOME` is not a valid Webots directory or is not found.
Webots R2023b was not found in your system.
- If you want to manually install Webots R2023b please download it from https://github.com/cyberbotics/webots/releases/tag/R2023b.
- If you already have Webots R2023b installed please then specify the `WEBOTS_HOME` environment variable.

Do you want Webots R2023b to be automatically installed in C:\Program Files\Webots ([Y]es/[N]o)?: y
Installing Webots R2023b... This might take some time.
[ERROR] [launch]: Caught exception in launch (see debug for traceback): Caught exception when trying to load file of format [py]: [Errno 2] No such file or directory: '/mnt/c/Temp/webots-R2023b_setup.exe'
lby@Roberyan-LAPTOP-U9RB9KFV:~/ros2_ws$ 

System

ShuffleWire commented 3 months ago

I'm not familiar with ROS, but I've installed Webots on wsl like you without issue. Did you install it through the apt package manager ?

Roberyan commented 3 months ago

I'm not familiar with ROS, but I've installed Webots on wsl like you without issue. Did you install it through the apt package manager ?

I am following the official tutorial I tried both the apt and source file, they all fail in this step. Did you also use WSL2 for installation?

gabryelreyes commented 1 month ago

'/mnt/c/Temp/webots-R2023b_setup.exe'

How does your WEBOTS_HOME look like? because it looks for me as if you were pointing to the installer but not to the installed application.