mfrigerio17 / robot-model-tools

A set of python facilities to work with articulated robot models
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Export of parametric robot models #1

Open mfrigerio17 opened 1 year ago

mfrigerio17 commented 1 year ago

Parametric model formats such as the KinDSL can be imported. However some formats like the URDF do not support model parameters (?), thus the same model cannot be exported.

A warning should be generated in this case. Using the additional file with parameter values (already accounted for, in the command line options), could also address the issue

mfrigerio17 commented 1 year ago

Export to KinDSL also fails, although the format supports parameters. So, having a parametric KinDSL model as input, and asking to export to KinDSL (regardless that it makes little sense), fails instead of resulting in a no-op.

(note that we do not want to implement the check, not to do anything when input and output formats coincide. This case shall be useful to evaluate how "lossy" the tool is, or whether it can even improve the serialization without altering the model itself)

mfrigerio17 commented 1 year ago

Commit 6f89aa2a59 partially addresses this issue, by resolving the parameters of the input model before exporting to URDF.

The same could be done when exporting a .kindsl, although this format does support parameters.... However, exporting a parametric model from a parametric input model, is non trivial due to possible differences in e.g. the representation of orientations (meaning one parameter in the input model may correspond to complex expressions for the exported model