Closed
Description
- Windows: Windows 10
- Linux: Ubuntu 20.04
- ROS 2: foxy
Plugin version: 1.54.3
What is the bug
I'm not sure if this is a vscode-ros issue vs a vscode-remote-extensionpack issue, but I thought I would start here. Launching Rviz on the Linux remote machine works in the Windows' VS Code's integrated terminal, assuming you have an X11 client running and you have exported the DISPLAY environment variable beforehand:
$ export DISPLAY=localhost:11.0
$ ros2 launch mypackage rviz.launch.py
$ # success!
rviz.launch.py:
from launch import LaunchDescription
from launch_ros.actions import Node
def generate_launch_description():
start_rviz_cmd = Node(
package='rviz2',
executable='rviz2',
name='rviz2',
output='screen')
# Create the launch description and populate
ld = LaunchDescription()
# Add any conditioned actions
ld.add_action(start_rviz_cmd)
return ld
launch.json:
{
"version": "0.2.0",
"environment": [{"name": "DISPLAY", "value": "localhost:11.0"}],
"configurations": [
{
"name": "Launch rviz",
"request": "launch",
"target": "/path/myrepo/install/mypackage/share/mypackage/launch/rviz.launch.py",
"type": "ros",
},
]
}
When I add this launch file to launch.json, it does not work when invoked via the UI. Instead the following error is thrown in the Windows' VS Code UI:
"Unable to open 'raise.c': Unable to read file'vscode-remote://ssh-remote+<long_string>/build/glibc-eX1tMB/glibc-2.31/sysdeps/unix/sysv/linux/raise.c'"
Steps to reproduce
- Have ROS2 installed on Linux machine
- Open workspace on Windows machine using VS Code with
ms-iot.vscode-ros
andms-vscode-remote.vscode-remote-extensionpack
extensions installed on remote Linux machine. - Add rviz.launch.py file to workspace
- Add launch config to launch.json
- Run via "Run and Debug" > select "Launch rviz" from drop-down > "Start debugging" (green arrow)
- Error
Expected behavior
Rviz UI should come up on Windows machine like it does when launched from integrated terminal.
Additional context
I also set up my C:/Users//.ssh/config as described here:
microsoft/vscode-remote-release#4600