Processors

Introduction

Here is an overview of onshape-to-robot pipeline:

_images/architecture.png
  • (1): The assembly is retrieved from Onshape, to produce an intermediate representation of the robot. See the robot.py from the source code.

  • (2): Some operations can be applied on this representation, those are the processors, some of them are listed below.

  • (3): The robot is exported to the desired format (URDF, MuJoCo, etc.) using an exporter.

Note

If you want to tweak your robot in the process, do not hesitate to have a look at the export.py script, which is the entry point of the onshape-to-robot command, and summarize the above-listed steps.

Retrieve and Convert Modes

It is possible to only execute the retrieval step (1), by passing the --retrieve argument to the onshape-to-robot command. This will save the intermediate representation of the robot to a file named robot.pkl in the output directory.

Similarly, steps (2) and (3) can be executed by passing the --convert argument, which will load the robot from the robot.pkl file. Processors will then be executed and the exported will produce the final output. This can be convenient to avoid sending API requests to Onshape while tweaking processors or exporters.

You can also use the --save-pickle argument to save the robot data after retrieval while still proceeding to conversion.

Processors list