URDF Import Tutorial

This step-by-step tutorial will demonstrate how to create a new Vortex Assembly file from a URDF file stored on your machine. The documentation of the basic usage and limitations of the URDF import script can be found on the URDF Import page. The example VxAssembly displayed below can be obtained from the URDF attached here: pi_robot.urdf.

Prerequisites

Before starting this tutorial, we recommend you have the Getting Started Tutorials covered first.

You must have Vortex Studio 2021a and Python 3.8 installed to be able to complete this tutorial.

You should be familiar with URDF files and their structure.

The URDF file you wish to convert must be on your machine and obey the basic URDF standard. For example, some URDF files are further reduced in size using xacro, and you will need to expand the xacro reduced file into a full URDF file before using the importer in this case.

Importing a URDF to a Vortex Assembly

  1. Locate the URDF file that you wish to convert on your computer. You will need the path of the file as input for the URDF import script. 
  2. Identify the desired output location of the and desired name of the Vortex Assembly which will be produced. Remember that the directory where the output Vortex Assembly will be saved must already exist, if it doesn't then it should be created at this step.
  3. Locate the script in the Vortex installation folder.
               • The script is stored at: <Vortex_install_dir>\bin\vxurdf and the script name is: urdf_to_vxassembly.py.
  4. Open a command line and navigate to your desired folder. The folder to which you navigate changes your working directory, and the script input also allows the use of relative locations for the script path, URDF input path and VxAssembly output path.
  5. Change directories in the command line to the folder that contains the Python script using:

    cd <script location>


          • <script location> - Identified in Step 3 as: <Vortex_install_dir>\bin\vxurdf with the script name: urdf_to_vxassembly.py.

  6. Run the command below substituting the locations you have identified;

    <python38> urdf_to_vxassembly.py --input_urdf <path_to_urdf_input> --output_vxassembly <path_to_vxassembly_output>

• <python38> - You may already have Python 3.8 added to your path, in this case it is likely you can run Python using 'Python' or 'Python38' as a command. If not, you can use the path (either absolute or relative) to your Python 3.8 installation.

• <path_to_urdf_input> - Identified in Step 1. The .urdf file extension is recommended in the file path.

• <path_to_vxassembly_output> - Identified in Step 3. The .vxassembly file extension is not required in the path. Here, the name of the output file is decided by the file path input.

•  In the command above, the flags --input_urdf and --output_vxassembly tell the script whether the following path corresponds to the input URDF or output Vortex Assembly. These commands can be shortened to -i and -o respectively if you wish. Note that you may also use paths relative to the current directory of the command line in place of absolute paths. 

Your new Vortex Assembly file can be found in the desired output location and opened with the Vortex Editor. All properties of a Vortex Assembly which cannot be set using the information contained in the URDF file will be set to the standard defaults in Vortex.