URDF model using the a variable parameter
I have a model in urdf file. I would like to change the dimension of the model depending on a parameter "x". This parameter will be calculated once in a program. I would like to know how to achieve the setting up the parameter in urdf.
Asked by vk on 2020-09-17 03:14:22 UTC
Answers
Hi @vk I recommend you to check some of the URDF and Xacro tutorials in the wiki.
If you want to add parameters to an URDF description you will need to use Xacro instead of URDF, since URDF does not implement a functionality for that pourpose. Once you have translated your URDF model to Xacro, you will be able to add properly the parameters you want with something like:
<xacro:arg name="x_arg" default="10"/>
<xacro:property name="x_property" value="$(arg x_arg)" />
That will store in x_property
the argument X
you passed to the Xacro file. Note that in order to use the argument in Xacro you will need to define it as a property and access it with $()
keys.
Hope that helps yout.
Regards.
Asked by Weasfas on 2020-09-17 04:11:22 UTC
Comments