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

#include <srdf_config.hpp>

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

Classes

class  GeneratedCartesianLimits
 
class  GeneratedJointLimits
 
class  GeneratedSRDF
 

Public Member Functions

void onInit () override
 Overridable initialization method.
 
bool isConfigured () const override
 Return true if this part of the configuration is completely set up.
 
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 loadSRDFFile (const std::filesystem::path &package_path, const std::filesystem::path &relative_path)
 Load SRDF File.
 
void loadSRDFFile (const std::filesystem::path &srdf_file_path, const std::vector< std::string > &xacro_args=std::vector< std::string >())
 
moveit::core::RobotModelPtr getRobotModel () const
 
planning_scene::PlanningScenePtr getPlanningScene ()
 Provide a shared planning scene.
 
void updateRobotModel (long changed_information=0L)
 
std::vector< std::string > getLinkNames () const
 
void clearCollisionData ()
 
std::vector< srdf::Model::CollisionPair > & getDisabledCollisions ()
 
std::vector< srdf::Model::EndEffector > & getEndEffectors ()
 
std::vector< srdf::Model::Group > & getGroups ()
 
std::vector< std::string > getGroupNames () const
 
std::vector< srdf::Model::GroupState > & getGroupStates ()
 
std::vector< srdf::Model::VirtualJoint > & getVirtualJoints ()
 
std::vector< srdf::Model::PassiveJoint > & getPassiveJoints ()
 
std::string getChildOfJoint (const std::string &joint_name) const
 Return the name of the child link of a joint.
 
void removePoseByName (const std::string &pose_name, const std::string &group_name)
 
std::vector< std::string > getJointNames (const std::string &group_name, bool include_multi_dof=true, bool include_passive=true)
 
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.
 
void collectVariables (std::vector< TemplateVariable > &variables) override
 Collect key/value pairs for use in templates.
 
bool write (const std::filesystem::path &path)
 
std::filesystem::path getPath () const
 
unsigned long getChangeMask () 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 collectDependencies (std::set< std::string > &) const
 Collect the package dependencies generated by this configuration.
 

Protected Member Functions

void getRelativePath ()
 
void loadURDFModel ()
 

Protected Attributes

std::filesystem::path srdf_path_
 Full file-system path to srdf.
 
std::filesystem::path srdf_pkg_relative_path_
 Path relative to loaded configuration package.
 
srdf::SRDFWriter srdf_
 SRDF Data and Writer.
 
std::shared_ptr< urdf::Model > urdf_model_
 
moveit::core::RobotModelPtr robot_model_
 
planning_scene::PlanningScenePtr planning_scene_
 Shared planning scene.
 
unsigned long changes_
 
- 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 64 of file srdf_config.hpp.

Member Function Documentation

◆ clearCollisionData()

void moveit_setup::SRDFConfig::clearCollisionData ( )
inline

Definition at line 96 of file srdf_config.hpp.

◆ collectFiles()

void moveit_setup::SRDFConfig::collectFiles ( const std::filesystem::path &  ,
const GeneratedTime ,
std::vector< GeneratedFilePtr > &   
)
inlineoverridevirtual

Collect the files generated by this configuration and add them to the vector.

Parameters
[in]package_paththe path to the root of the config package
[in]last_gen_timeThe time (if any) when the config package was last generated
[out]filesWhere to put the new generated files

Reimplemented from moveit_setup::SetupConfig.

Definition at line 254 of file srdf_config.hpp.

◆ collectVariables()

void moveit_setup::SRDFConfig::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 215 of file srdf_config.cpp.

◆ getChangeMask()

unsigned long moveit_setup::SRDFConfig::getChangeMask ( ) const
inline

Definition at line 274 of file srdf_config.hpp.

Here is the caller graph for this function:

◆ getChildOfJoint()

std::string moveit_setup::SRDFConfig::getChildOfJoint ( const std::string &  joint_name) const

Return the name of the child link of a joint.

Returns
empty string if joint is not found

Definition at line 168 of file srdf_config.cpp.

Here is the call graph for this function:

◆ getDisabledCollisions()

std::vector< srdf::Model::CollisionPair > & moveit_setup::SRDFConfig::getDisabledCollisions ( )
inline

Definition at line 103 of file srdf_config.hpp.

◆ getEndEffectors()

std::vector< srdf::Model::EndEffector > & moveit_setup::SRDFConfig::getEndEffectors ( )
inline

Definition at line 108 of file srdf_config.hpp.

◆ getGroupNames()

std::vector< std::string > moveit_setup::SRDFConfig::getGroupNames ( ) const
inline

Definition at line 118 of file srdf_config.hpp.

◆ getGroups()

std::vector< srdf::Model::Group > & moveit_setup::SRDFConfig::getGroups ( )
inline

Definition at line 113 of file srdf_config.hpp.

◆ getGroupStates()

std::vector< srdf::Model::GroupState > & moveit_setup::SRDFConfig::getGroupStates ( )
inline

Definition at line 129 of file srdf_config.hpp.

◆ getJointNames()

std::vector< std::string > moveit_setup::SRDFConfig::getJointNames ( const std::string &  group_name,
bool  include_multi_dof = true,
bool  include_passive = true 
)

Definition at line 193 of file srdf_config.cpp.

Here is the call graph for this function:

◆ getLinkNames()

std::vector< std::string > moveit_setup::SRDFConfig::getLinkNames ( ) const

Definition at line 158 of file srdf_config.cpp.

◆ getPassiveJoints()

std::vector< srdf::Model::PassiveJoint > & moveit_setup::SRDFConfig::getPassiveJoints ( )
inline

Definition at line 139 of file srdf_config.hpp.

◆ getPath()

std::filesystem::path moveit_setup::SRDFConfig::getPath ( ) const
inline

Definition at line 269 of file srdf_config.hpp.

◆ getPlanningScene()

planning_scene::PlanningScenePtr moveit_setup::SRDFConfig::getPlanningScene ( )

Provide a shared planning scene.

Definition at line 145 of file srdf_config.cpp.

Here is the call graph for this function:

◆ getRelativePath()

void moveit_setup::SRDFConfig::getRelativePath ( )
protected

Definition at line 110 of file srdf_config.cpp.

◆ getRobotModel()

moveit::core::RobotModelPtr moveit_setup::SRDFConfig::getRobotModel ( ) const
inline

Definition at line 82 of file srdf_config.hpp.

Here is the caller graph for this function:

◆ getVirtualJoints()

std::vector< srdf::Model::VirtualJoint > & moveit_setup::SRDFConfig::getVirtualJoints ( )
inline

Definition at line 134 of file srdf_config.hpp.

◆ isConfigured()

bool moveit_setup::SRDFConfig::isConfigured ( ) const
inlineoverridevirtual

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

Reimplemented from moveit_setup::SetupConfig.

Definition at line 69 of file srdf_config.hpp.

◆ loadPrevious()

void moveit_setup::SRDFConfig::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 srdf_config.cpp.

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

◆ loadSRDFFile() [1/2]

void moveit_setup::SRDFConfig::loadSRDFFile ( const std::filesystem::path &  package_path,
const std::filesystem::path &  relative_path 
)

Load SRDF File.

Definition at line 76 of file srdf_config.cpp.

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

◆ loadSRDFFile() [2/2]

void moveit_setup::SRDFConfig::loadSRDFFile ( const std::filesystem::path &  srdf_file_path,
const std::vector< std::string > &  xacro_args = std::vector<std::string>() 
)

Definition at line 84 of file srdf_config.cpp.

Here is the call graph for this function:

◆ loadURDFModel()

void moveit_setup::SRDFConfig::loadURDFModel ( )
protected

Definition at line 63 of file srdf_config.cpp.

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

◆ onInit()

void moveit_setup::SRDFConfig::onInit ( )
overridevirtual

Overridable initialization method.

Reimplemented from moveit_setup::SetupConfig.

Definition at line 41 of file srdf_config.cpp.

◆ removePoseByName()

void moveit_setup::SRDFConfig::removePoseByName ( const std::string &  pose_name,
const std::string &  group_name 
)

Definition at line 179 of file srdf_config.cpp.

Here is the call graph for this function:

◆ saveToYaml()

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

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

Reimplemented from moveit_setup::SetupConfig.

Definition at line 56 of file srdf_config.cpp.

◆ updateRobotModel()

void moveit_setup::SRDFConfig::updateRobotModel ( long  changed_information = 0L)

Update the robot model with the new SRDF, AND mark the changes that have been made to the model changed_information should be composed of InformationFields

Definition at line 119 of file srdf_config.cpp.

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

◆ write()

bool moveit_setup::SRDFConfig::write ( const std::filesystem::path &  path)
inline

Definition at line 264 of file srdf_config.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ changes_

unsigned long moveit_setup::SRDFConfig::changes_
protected

Definition at line 303 of file srdf_config.hpp.

◆ planning_scene_

planning_scene::PlanningScenePtr moveit_setup::SRDFConfig::planning_scene_
protected

Shared planning scene.

Definition at line 300 of file srdf_config.hpp.

◆ robot_model_

moveit::core::RobotModelPtr moveit_setup::SRDFConfig::robot_model_
protected

Definition at line 297 of file srdf_config.hpp.

◆ srdf_

srdf::SRDFWriter moveit_setup::SRDFConfig::srdf_
protected

SRDF Data and Writer.

Definition at line 293 of file srdf_config.hpp.

◆ srdf_path_

std::filesystem::path moveit_setup::SRDFConfig::srdf_path_
protected

Full file-system path to srdf.

Definition at line 287 of file srdf_config.hpp.

◆ srdf_pkg_relative_path_

std::filesystem::path moveit_setup::SRDFConfig::srdf_pkg_relative_path_
protected

Path relative to loaded configuration package.

Definition at line 290 of file srdf_config.hpp.

◆ urdf_model_

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

Definition at line 295 of file srdf_config.hpp.


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