Class URDFConfig

Inheritance Relationships

Base Type

Class Documentation

class URDFConfig : public moveit_setup::SetupConfig

Public Functions

inline URDFConfig()
virtual void onInit() override

Overridable initialization method.

virtual void loadPrevious(const std::filesystem::path &package_path, const YAML::Node &node) override

Loads the configuration from an existing MoveIt configuration.

The data can be loaded directly from files in the configuration via the package path.

Certain other pieces of “meta” information may be stored in the .setup_assistant yaml file in the root of the configuration. If there is a node in that file that matches this config’s name, it is passed in as an argument.

Parameters:

package_path – The path to the root folder of the configuration.

virtual YAML::Node saveToYaml() const override

Optionally save “meta” information for saving in the .setup_assistant yaml file.

void loadFromPath(const std::filesystem::path &urdf_file_path, const std::string &xacro_args = "")

Load URDF File.

void loadFromPath(const std::filesystem::path &urdf_file_path, const std::vector<std::string> &xacro_args)
void loadFromPackage(const std::filesystem::path &package_name, const std::filesystem::path &relative_path, const std::string &xacro_args = "")
inline const urdf::Model &getModel() const
inline const std::shared_ptr<urdf::Model> &getModelPtr() const
inline std::string getURDFPackageName() const
inline std::string getURDFContents() const
inline std::filesystem::path getURDFPath() const
inline std::string getXacroArgs() const
virtual bool isConfigured() const override

Return true if this part of the configuration is completely set up.

bool isXacroFile() const
virtual void collectDependencies(std::set<std::string> &packages) const override

Collect the package dependencies generated by this configuration.

Parameters:

packages[out] Names of ROS packages

virtual void collectVariables(std::vector<TemplateVariable> &variables) override

Collect key/value pairs for use in templates.

Parameters:

variables[out] Where to put the new Variables

inline std::string getRobotName() const

Protected Functions

void setPackageName()
void load()

Protected Attributes

std::filesystem::path urdf_path_

Full file-system path to urdf.

std::string urdf_pkg_name_

Name of package containing urdf (note: this may be empty b/c user may not have urdf in pkg)

std::filesystem::path urdf_pkg_relative_path_

Path relative to urdf package (note: this may be same as urdf_path_)

bool urdf_from_xacro_

Flag indicating whether the URDF was loaded from .xacro format.

std::string xacro_args_

xacro arguments in two different formats

std::vector<std::string> xacro_args_vec_
std::shared_ptr<urdf::Model> urdf_model_

URDF robot model.

std::string urdf_string_

URDF robot model string.