moveit2
The MoveIt Motion Planning Framework for ROS 2.
Public Types | Public Member Functions | Protected Attributes | List of all members
moveit_setup::IncludedXacroConfig Class Referenceabstract

A virtual class that represents a xacro header that should be included in the modified urdf configuration. More...

#include <included_xacro_config.hpp>

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

Public Types

using Ptr = std::shared_ptr< IncludedXacroConfig >
 

Public Member Functions

void onInit () override
 Overridable initialization method. More...
 
virtual std::string getFilepath () const =0
 The file path to use in the <xacro:include> tag. More...
 
virtual bool hasChanges () const =0
 Returns if the xacro and its properties have changed, resulting in the whole urdf needing regeneration. More...
 
virtual std::vector< std::pair< std::string, std::string > > getArguments () const
 Returns a list of name/value pairs for arguments that the modified urdf should have. More...
 
virtual std::vector< std::string > getCommands () const
 Return a list of additional commands that need to be inserted after the xacro is included. More...
 
- 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. More...
 
const std::string & getName ()
 The name for this part of the configuration. More...
 
virtual bool isConfigured () const
 Return true if this part of the configuration is completely set up. More...
 
virtual void loadPrevious (const std::filesystem::path &, const YAML::Node &)
 Loads the configuration from an existing MoveIt configuration. More...
 
virtual YAML::Node saveToYaml () const
 Optionally save "meta" information for saving in the .setup_assistant yaml file. More...
 
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. More...
 
virtual void collectDependencies (std::set< std::string > &) const
 Collect the package dependencies generated by this configuration. More...
 
virtual void collectVariables (std::vector< TemplateVariable > &)
 Collect key/value pairs for use in templates. More...
 

Protected Attributes

std::shared_ptr< URDFConfigurdf_config_
 
- 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

A virtual class that represents a xacro header that should be included in the modified urdf configuration.

Definition at line 47 of file included_xacro_config.hpp.

Member Typedef Documentation

◆ Ptr

Definition at line 93 of file included_xacro_config.hpp.

Member Function Documentation

◆ getArguments()

virtual std::vector<std::pair<std::string, std::string> > moveit_setup::IncludedXacroConfig::getArguments ( ) const
inlinevirtual

Returns a list of name/value pairs for arguments that the modified urdf should have.

Result will be <xacro:arg name="pair.first" default="pair.second" />

Reimplemented in moveit_setup::controllers::ControlXacroConfig.

Definition at line 78 of file included_xacro_config.hpp.

◆ getCommands()

virtual std::vector<std::string> moveit_setup::IncludedXacroConfig::getCommands ( ) const
inlinevirtual

Return a list of additional commands that need to be inserted after the xacro is included.

e.g. If the included xacro includes a macro definition, the command to run the macro could be here.

Reimplemented in moveit_setup::controllers::ControlXacroConfig.

Definition at line 88 of file included_xacro_config.hpp.

◆ getFilepath()

virtual std::string moveit_setup::IncludedXacroConfig::getFilepath ( ) const
pure virtual

The file path to use in the <xacro:include> tag.

If the file is in MoveIt config's config folder, just the file name is fine. Alternatively you can return a package string a la $(find SOME_PACKAGE_NAME)/relative/path/to/header.xacro

Implemented in moveit_setup::controllers::ControlXacroConfig.

◆ hasChanges()

virtual bool moveit_setup::IncludedXacroConfig::hasChanges ( ) const
pure virtual

Returns if the xacro and its properties have changed, resulting in the whole urdf needing regeneration.

Implemented in moveit_setup::controllers::ControlXacroConfig.

◆ onInit()

void moveit_setup::IncludedXacroConfig::onInit ( )
inlineoverridevirtual

Overridable initialization method.

Reimplemented from moveit_setup::SetupConfig.

Definition at line 50 of file included_xacro_config.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ urdf_config_

std::shared_ptr<URDFConfig> moveit_setup::IncludedXacroConfig::urdf_config_
protected

Definition at line 96 of file included_xacro_config.hpp.


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