Skip to content

A VSCode extension for visualizing the URDF file and xacro file.

License

Notifications You must be signed in to change notification settings

MorningFrog/urdf-visualizer

Repository files navigation

icon

Urdf Visualizer

English / 简体中文

A VSCode extension for visualizing URDF files and xacro files.

用于可视化 URDF 和 xacro 文件的 VSCode 扩展.

License Installs Downloads Rating Version Stars

Features

demonstration

  • Visualization of URDF and Xacro files
  • Switch the display of visual and/or collision
  • Visualize joint and/or link coordinate systems
  • Display the joint name when hovering the mouse
  • Drag and control joint angles
  • Measure distance, angle or area
  • multilingual support: English, Simplified Chinese

    If you need more language support, you can raise it in the issue of the repository

Extension Settings

This extension contributes the following settings:

  • urdf-visualizer.packages: The root directory of ROS/ROS2 packages, used to resolve the package://<package_name> paths in URDF/Xacro files. It is recommended to set this in the .vscode/settings.json of your workspace as an object, where the key is the package name and the value is its path. Example:
    // settings.json
    {
      // other settings
      "urdf-visualizer.packages": {
          "fake_robot": "${workspaceFolder}/src/fake_robot"
      },
      // other settings
    }
    Currently, only ${workspaceFolder} and ${env:<environment_variables>} are supported as special symbols in the path:
    • ${workspaceFolder} represents the absolute path of the workspace
    • ${env:<environment_variables>} represents the value of the environment variable <environment_variables>
  • urdf-visualizer.renderOnSave: Whether to automatically re-render when the file is saved.
  • urdf-visualizer.reRenderWhenSwitchFile: Whether to automatically re-render when switching between active files.
  • urdf-visualizer.backgroundColor: Set the background color; it needs to be a hexadecimal color code starting with #.
  • urdf-visualizer.showTips: Switch the display of operation tips.

Instructions

Important

Open VSCode in the folder contains all files required by the urdf/xacro file. Open VSCode only with the urdf/xacro file will make it unable to find mesh files.

Operations:

  • Rotate perspective: Hold down the left mouse button and drag in the blank space
  • Moving perspective: Hold down the right mouse button and drag
  • Rotate/Move Joint: Hold down the left mouse button and drag on the link directly connected to the joint
  • Measure distance/angle/area: Click the button on one of the three buttons in the upper right corner to start measuring

measure

Install

There are three installation methods:

  • Search for "URDF Visualizer" in VSCode extensions and install it.
  • In VSCode, use Ctrl+Shift+P to open the Command Panel and enter ext install morningfrog.urdf-visualizer.
  • Download the .vsix file in the Release of the repository, then select Install from VISX in the upper right corner of the VSCode extension, and choose the downloaded .vsix file for installation.

Known Issues

  • When measuring area, if concave polygons appear, the area result may be incorrect

Release Notes

4.0.1

  • Fixed the issue where VSCode below version 1.75 cannot preview when urdf is not configured as XML.
  • Optimized the operation tips and added a setting to switch the display of operation tips.

4.0.0

  • Added multilingual support (i18n), automatically selecting extension languages based on VSCode language.

3.x

  • Add measurement functions for distance/angle/area.
  • Add operation prompts

2.x

  • Add the visualization of joint angles.
  • Optimized the extension's experience.

1.x

Initial release of URDF Visualizer.