ros_urdf
Functions to parse and load to the ROS parameter server the URDF files.
- ros_urdf.urdf_load_from_pkg(pkg_name, model_name, param_name, folder='/urdf', ns=None, args_xacro=None) bool [source]
Function to load a URDF from a ROS package to the parameter server.
- Parameters
pkg_name (str) – The ROS package name.
model_name (str) – The model file name.
param_name (str) – The parameter name.
folder (str) – The folder where the model is located. Default: “/urdf”
ns (str) – The namespace of the parameter.
args_xacro (list of str.) – The xacro arguments in a list. Eg: [‘arg1:=True’,’arg2:=10.0’]
- Returns
True if the URDF was loaded, False otherwise.
- Return type
bool
- ros_urdf.urdf_load_from_path(model_path, param_name, ns=None, args_xacro=None) bool [source]
Function to load a URDF from a file to the parameter server.
- Parameters
model_path (str) – The model file path.
param_name (str) – The parameter name.
ns (str) – The namespace of the parameter.
args_xacro (list of str.) – The xacro arguments in a list. Eg: [‘arg1:=True’,’arg2:=10.0’]
- Returns
True if the URDF was loaded, False otherwise.
- Return type
bool
- ros_urdf.urdf_parse_from_pkg(pkg_name, model_name, folder='/urdf', args_xacro=None) str [source]
Function to parse a URDF from a ROS package and return the URDF string.
- Parameters
pkg_name (str) – The ROS package name.
model_name (str) – The model file name.
folder (str) – The folder where the model is located. Default: “/urdf”
args_xacro (list of str.) – The xacro arguments in a list. Eg: [‘arg1:=True’,’arg2:=10.0’]
- Returns
The URDF string or None if the pkg or file was not found.
- Return type
str
- ros_urdf.urdf_parse_from_path(model_path, args_xacro=None) bool [source]
Function to parse a URDF from a file and return the URDF string.
- Parameters
model_path (str) – The model file path.
args_xacro (list of str.) – The xacro arguments in a list. Eg: [‘arg1:=True’,’arg2:=10.0’]
- Returns
The URDF string or None if the file was not found.
- Return type
str