ms-iot / vscode-ros

Visual Studio Code extension for Robot Operating System (ROS) development
https://marketplace.visualstudio.com/items?itemName=ms-iot.vscode-ros
MIT License
402 stars 93 forks source link

[bug] URDF preview #1276

Open kevin-thankyou-lin opened 6 months ago

kevin-thankyou-lin commented 6 months ago

(Please add appropriate labels)

\<Version of the plugin> Tried the latest version 0.92

Version: 1.87.0-insider
Commit: 8fa84589eef3538dbc763ff98dc7d5a8a0c56374
Date: 2024-02-09T05:46:41.377Z
Electron: 27.3.1
ElectronBuildId: 26731440
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Linux x64 5.15.0-94-generic

what is the bug

URDF preview would give an error saying xacro led to an error. However, when I manually source the setup script, xacro works:

bash ~/ros2_humble/install/local_setup.bash && xacro <path/to/r2d2.urdf> && env

and produces a valid urdf.

So, I went into the repo's code to update this line which would initially lead to the error notification when trying to preview:

xacroCommand = `bash --login -c "xacro '${filename}' && env"`;

I manually updated the above line to contain to bash ~/ros2_humble/install/local_setup.bash && xacro <path/to/r2d2.urdf> && env

Then, I re-generated a .vsix file and reinstalled the extension. After doing so, I don't get the error notification, but PreviewURDF gives me a blank screen.

Repro steps

\<how to reproduce the bug. Please attach sample files or github repo if appropriate.>

  1. Install ros2 humble from source (so it's not in the default /opt/ros/... location
  2. Install xacro from source
  3. Use the PreviewURDF function

expected behavior

I should see the robot URDF.

additional context

Robot URDF attached

r2d2-txt-because-github-doesnt-like-urdf.txt

zacharyyamaoka commented 5 months ago

I am havin the same issue. Black screen.

image