moveit2
The MoveIt Motion Planning Framework for ROS 2.
|
#include <control_xacro_config.hpp>
Classes | |
class | GeneratedControlHeader |
class | GeneratedInitialPositions |
Public Member Functions | |
void | loadFromDescription () |
Load the original command interfaces from the original (unmodified) URDF. More... | |
bool | hasAllControlTagsInOriginal () const |
std::string | getJointsXML () const |
Return the additional joint xml needed for ros2_control tags. More... | |
void | collectFiles (const std::filesystem::path &package_path, const GeneratedTime &last_gen_time, std::vector< GeneratedFilePtr > &files) override |
Collect the files generated by this configuration and add them to the vector. More... | |
void | collectVariables (std::vector< TemplateVariable > &variables) override |
Collect key/value pairs for use in templates. More... | |
SetupConfig overrides | |
void | onInit () override |
Overridable initialization method. More... | |
void | loadPrevious (const std::filesystem::path &, const YAML::Node &node) override |
Loads the configuration from an existing MoveIt configuration. More... | |
YAML::Node | saveToYaml () const override |
Optionally save "meta" information for saving in the .setup_assistant yaml file. More... | |
bool | isConfigured () const override |
Return true if this part of the configuration is completely set up. More... | |
IncludedXacroConfig overrides | |
std::string | getFilepath () const override |
The file path to use in the <xacro:include> tag. More... | |
bool | hasChanges () const override |
Returns if the xacro and its properties have changed, resulting in the whole urdf needing regeneration. More... | |
std::vector< std::pair< std::string, std::string > > | getArguments () const override |
Returns a list of name/value pairs for arguments that the modified urdf should have. More... | |
std::vector< std::string > | getCommands () const override |
Return a list of additional commands that need to be inserted after the xacro is included. More... | |
Data access and modification | |
const ControlInterfaces & | getAvailableControlInterfaces () const |
const ControlInterfaces & | getDefaultControlInterfaces () const |
void | setControlInterfaces (const ControlInterfaces &ci) |
Use the specified controller interfaces for all the lacking joints. More... | |
const ControlInterfaces | getControlInterfaces (const std::vector< std::string > &joint_names) const |
Get all the control interfaces for all of the specified joint names. More... | |
Public Member Functions inherited from moveit_setup::IncludedXacroConfig | |
void | onInit () override |
Overridable initialization method. More... | |
Public Member Functions inherited from moveit_setup::SetupConfig | |
SetupConfig ()=default | |
SetupConfig (const SetupConfig &)=default | |
SetupConfig (SetupConfig &&)=default | |
SetupConfig & | operator= (const SetupConfig &)=default |
SetupConfig & | operator= (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 void | collectDependencies (std::set< std::string > &) const |
Collect the package dependencies generated by this configuration. More... | |
Protected Member Functions | |
void | getControlInterfaces (const std::string &joint_name, ControlInterfaces &ci) const |
Protected Attributes | |
std::vector< std::string > | joint_names_ |
std::unordered_map< std::string, ControlInterfaces > | original_joint_interfaces_ |
A list of all joints used by the current SRDF groups. More... | |
std::unordered_map< std::string, ControlInterfaces > | new_joint_interfaces_ |
ControlInterfaces | default_ci_ |
ControlInterfaces | available_ci_ |
srdf::Model::GroupState | initial_group_state_ |
bool | changed_ |
Protected Attributes inherited from moveit_setup::IncludedXacroConfig | |
std::shared_ptr< URDFConfig > | urdf_config_ |
Protected Attributes inherited from moveit_setup::SetupConfig | |
std::shared_ptr< DataWarehouse > | config_data_ |
rclcpp::Node::SharedPtr | parent_node_ |
std::string | name_ |
std::shared_ptr< rclcpp::Logger > | logger_ |
Additional Inherited Members | |
Public Types inherited from moveit_setup::IncludedXacroConfig | |
using | Ptr = std::shared_ptr< IncludedXacroConfig > |
Definition at line 57 of file control_xacro_config.hpp.
|
inlineoverridevirtual |
Collect the files generated by this configuration and add them to the vector.
[in] | package_path | the path to the root of the config package |
[in] | last_gen_time | The time (if any) when the config package was last generated |
[out] | files | Where to put the new generated files |
Reimplemented from moveit_setup::SetupConfig.
Definition at line 178 of file control_xacro_config.hpp.
|
overridevirtual |
Collect key/value pairs for use in templates.
[out] | variables | Where to put the new Variables |
Reimplemented from moveit_setup::SetupConfig.
Definition at line 314 of file control_xacro_config.cpp.
|
overridevirtual |
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 from moveit_setup::IncludedXacroConfig.
Definition at line 91 of file control_xacro_config.cpp.
|
inline |
Definition at line 88 of file control_xacro_config.hpp.
|
overridevirtual |
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 from moveit_setup::IncludedXacroConfig.
Definition at line 98 of file control_xacro_config.cpp.
|
protected |
const ControlInterfaces moveit_setup::controllers::ControlXacroConfig::getControlInterfaces | ( | const std::vector< std::string > & | joint_names | ) | const |
Get all the control interfaces for all of the specified joint names.
Definition at line 222 of file control_xacro_config.cpp.
|
inline |
Definition at line 93 of file control_xacro_config.hpp.
|
overridevirtual |
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
Implements moveit_setup::IncludedXacroConfig.
Definition at line 81 of file control_xacro_config.cpp.
std::string moveit_setup::controllers::ControlXacroConfig::getJointsXML | ( | ) | const |
Return the additional joint xml needed for ros2_control tags.
Definition at line 232 of file control_xacro_config.cpp.
bool moveit_setup::controllers::ControlXacroConfig::hasAllControlTagsInOriginal | ( | ) | const |
Definition at line 160 of file control_xacro_config.cpp.
|
overridevirtual |
Returns if the xacro and its properties have changed, resulting in the whole urdf needing regeneration.
Implements moveit_setup::IncludedXacroConfig.
Definition at line 86 of file control_xacro_config.cpp.
|
overridevirtual |
Return true if this part of the configuration is completely set up.
Reimplemented from moveit_setup::SetupConfig.
Definition at line 76 of file control_xacro_config.cpp.
void moveit_setup::controllers::ControlXacroConfig::loadFromDescription | ( | ) |
Load the original command interfaces from the original (unmodified) URDF.
Needs to be run whenever the URDF/SRDF may have changed
Definition at line 116 of file control_xacro_config.cpp.
|
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.
package_path | The path to the root folder of the configuration. |
Reimplemented from moveit_setup::SetupConfig.
Definition at line 55 of file control_xacro_config.cpp.
|
overridevirtual |
Overridable initialization method.
Reimplemented from moveit_setup::SetupConfig.
Definition at line 46 of file control_xacro_config.cpp.
|
overridevirtual |
Optionally save "meta" information for saving in the .setup_assistant yaml file.
Reimplemented from moveit_setup::SetupConfig.
Definition at line 68 of file control_xacro_config.cpp.
void moveit_setup::controllers::ControlXacroConfig::setControlInterfaces | ( | const ControlInterfaces & | ci | ) |
Use the specified controller interfaces for all the lacking joints.
Definition at line 165 of file control_xacro_config.cpp.
|
protected |
Definition at line 193 of file control_xacro_config.hpp.
|
protected |
Definition at line 196 of file control_xacro_config.hpp.
|
protected |
Definition at line 193 of file control_xacro_config.hpp.
|
protected |
Definition at line 194 of file control_xacro_config.hpp.
|
protected |
Definition at line 190 of file control_xacro_config.hpp.
|
protected |
Definition at line 191 of file control_xacro_config.hpp.
|
protected |
A list of all joints used by the current SRDF groups.
Definition at line 191 of file control_xacro_config.hpp.