moveit2
The MoveIt Motion Planning Framework for ROS 2.
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
moveit_setup::URDFConfig Class Reference

#include <urdf_config.hpp>

Inheritance diagram for moveit_setup::URDFConfig:
Inheritance graph
[legend]
Collaboration diagram for moveit_setup::URDFConfig:
Collaboration graph
[legend]

Public Member Functions

 URDFConfig ()
 
void onInit () override
 Overridable initialization method.
 
void loadPrevious (const std::filesystem::path &package_path, const YAML::Node &node) override
 Loads the configuration from an existing MoveIt configuration.
 
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="")
 
const urdf::Model & getModel () const
 
const std::shared_ptr< urdf::Model > & getModelPtr () const
 
std::string getURDFPackageName () const
 
std::string getURDFContents () const
 
std::filesystem::path getURDFPath () const
 
std::string getXacroArgs () const
 
bool isConfigured () const override
 Return true if this part of the configuration is completely set up.
 
bool isXacroFile () const
 
void collectDependencies (std::set< std::string > &packages) const override
 Collect the package dependencies generated by this configuration.
 
void collectVariables (std::vector< TemplateVariable > &variables) override
 Collect key/value pairs for use in templates.
 
std::string getRobotName () const
 
- Public Member Functions inherited from moveit_setup::SetupConfig
 SetupConfig ()=default
 
 SetupConfig (const SetupConfig &)=default
 
 SetupConfig (SetupConfig &&)=default
 
SetupConfigoperator= (const SetupConfig &)=default
 
SetupConfigoperator= (SetupConfig &&)=default
 
virtual ~SetupConfig ()=default
 
void initialize (const std::shared_ptr< DataWarehouse > &config_data, const rclcpp::Node::SharedPtr &parent_node, const std::string &name)
 Called after construction to initialize the step.
 
const std::string & getName ()
 The name for this part of the configuration.
 
virtual void collectFiles (const std::filesystem::path &, const GeneratedTime &, std::vector< GeneratedFilePtr > &)
 Collect the files generated by this configuration and add them to the vector.
 

Protected Member 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.
 
- Protected Attributes inherited from moveit_setup::SetupConfig
std::shared_ptr< DataWarehouseconfig_data_
 
rclcpp::Node::SharedPtr parent_node_
 
std::string name_
 
std::shared_ptr< rclcpp::Logger > logger_
 

Detailed Description

Definition at line 46 of file urdf_config.hpp.

Constructor & Destructor Documentation

◆ URDFConfig()

moveit_setup::URDFConfig::URDFConfig ( )
inline

Definition at line 49 of file urdf_config.hpp.

Member Function Documentation

◆ collectDependencies()

void moveit_setup::URDFConfig::collectDependencies ( std::set< std::string > &  ) const
overridevirtual

Collect the package dependencies generated by this configuration.

Parameters
[out]packagesNames of ROS packages

Reimplemented from moveit_setup::SetupConfig.

Definition at line 175 of file urdf_config.cpp.

◆ collectVariables()

void moveit_setup::URDFConfig::collectVariables ( std::vector< TemplateVariable > &  )
overridevirtual

Collect key/value pairs for use in templates.

Parameters
[out]variablesWhere to put the new Variables

Reimplemented from moveit_setup::SetupConfig.

Definition at line 180 of file urdf_config.cpp.

◆ getModel()

const urdf::Model & moveit_setup::URDFConfig::getModel ( ) const
inline

Definition at line 65 of file urdf_config.hpp.

◆ getModelPtr()

const std::shared_ptr< urdf::Model > & moveit_setup::URDFConfig::getModelPtr ( ) const
inline

Definition at line 70 of file urdf_config.hpp.

Here is the caller graph for this function:

◆ getRobotName()

std::string moveit_setup::URDFConfig::getRobotName ( ) const
inline

Definition at line 103 of file urdf_config.hpp.

◆ getURDFContents()

std::string moveit_setup::URDFConfig::getURDFContents ( ) const
inline

Definition at line 80 of file urdf_config.hpp.

Here is the caller graph for this function:

◆ getURDFPackageName()

std::string moveit_setup::URDFConfig::getURDFPackageName ( ) const
inline

Definition at line 75 of file urdf_config.hpp.

◆ getURDFPath()

std::filesystem::path moveit_setup::URDFConfig::getURDFPath ( ) const
inline

Definition at line 85 of file urdf_config.hpp.

◆ getXacroArgs()

std::string moveit_setup::URDFConfig::getXacroArgs ( ) const
inline

Definition at line 90 of file urdf_config.hpp.

◆ isConfigured()

bool moveit_setup::URDFConfig::isConfigured ( ) const
overridevirtual

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

Reimplemented from moveit_setup::SetupConfig.

Definition at line 170 of file urdf_config.cpp.

◆ isXacroFile()

bool moveit_setup::URDFConfig::isXacroFile ( ) const

Definition at line 165 of file urdf_config.cpp.

Here is the call graph for this function:

◆ load()

void moveit_setup::URDFConfig::load ( )
protected

Definition at line 137 of file urdf_config.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadFromPackage()

void moveit_setup::URDFConfig::loadFromPackage ( const std::filesystem::path &  package_name,
const std::filesystem::path &  relative_path,
const std::string &  xacro_args = "" 
)

Definition at line 120 of file urdf_config.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadFromPath() [1/2]

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

Load URDF File.

Definition at line 75 of file urdf_config.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadFromPath() [2/2]

void moveit_setup::URDFConfig::loadFromPath ( const std::filesystem::path &  urdf_file_path,
const std::vector< std::string > &  xacro_args 
)

Definition at line 84 of file urdf_config.cpp.

Here is the call graph for this function:

◆ loadPrevious()

void moveit_setup::URDFConfig::loadPrevious ( const std::filesystem::path &  ,
const YAML::Node &   
)
overridevirtual

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_pathThe path to the root folder of the configuration.

Reimplemented from moveit_setup::SetupConfig.

Definition at line 47 of file urdf_config.cpp.

Here is the call graph for this function:

◆ onInit()

void moveit_setup::URDFConfig::onInit ( )
overridevirtual

Overridable initialization method.

Reimplemented from moveit_setup::SetupConfig.

Definition at line 42 of file urdf_config.cpp.

◆ saveToYaml()

YAML::Node moveit_setup::URDFConfig::saveToYaml ( ) const
overridevirtual

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

Reimplemented from moveit_setup::SetupConfig.

Definition at line 63 of file urdf_config.cpp.

◆ setPackageName()

void moveit_setup::URDFConfig::setPackageName ( )
protected

Definition at line 93 of file urdf_config.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ urdf_from_xacro_

bool moveit_setup::URDFConfig::urdf_from_xacro_
protected

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

Definition at line 122 of file urdf_config.hpp.

◆ urdf_model_

std::shared_ptr<urdf::Model> moveit_setup::URDFConfig::urdf_model_
protected

URDF robot model.

Definition at line 129 of file urdf_config.hpp.

◆ urdf_path_

std::filesystem::path moveit_setup::URDFConfig::urdf_path_
protected

Full file-system path to urdf.

Definition at line 113 of file urdf_config.hpp.

◆ urdf_pkg_name_

std::string moveit_setup::URDFConfig::urdf_pkg_name_
protected

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

Definition at line 116 of file urdf_config.hpp.

◆ urdf_pkg_relative_path_

std::filesystem::path moveit_setup::URDFConfig::urdf_pkg_relative_path_
protected

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

Definition at line 119 of file urdf_config.hpp.

◆ urdf_string_

std::string moveit_setup::URDFConfig::urdf_string_
protected

URDF robot model string.

Definition at line 132 of file urdf_config.hpp.

◆ xacro_args_

std::string moveit_setup::URDFConfig::xacro_args_
protected

xacro arguments in two different formats

Definition at line 125 of file urdf_config.hpp.

◆ xacro_args_vec_

std::vector<std::string> moveit_setup::URDFConfig::xacro_args_vec_
protected

Definition at line 126 of file urdf_config.hpp.


The documentation for this class was generated from the following files: