Class SRDFConfig

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class SRDFConfig : public moveit_setup::SetupConfig

Public Functions

virtual void onInit() override

Overridable initialization method.

inline virtual bool isConfigured() const override

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

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 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>())
inline moveit::core::RobotModelPtr getRobotModel() const
planning_scene::PlanningScenePtr getPlanningScene()

Provide a shared planning scene.

void 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

std::vector<std::string> getLinkNames() const
inline void clearCollisionData()
inline std::vector<srdf::Model::CollisionPair> &getDisabledCollisions()
inline std::vector<srdf::Model::EndEffector> &getEndEffectors()
inline std::vector<srdf::Model::Group> &getGroups()
inline std::vector<std::string> getGroupNames() const
inline std::vector<srdf::Model::GroupState> &getGroupStates()
inline std::vector<srdf::Model::VirtualJoint> &getVirtualJoints()
inline 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.

Returns:

empty string if joint is not found

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)
inline virtual 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.

Parameters:
  • package_path[in] the path to the root of the config package

  • last_gen_time[in] The time (if any) when the config package was last generated

  • files[out] Where to put the new generated files

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 bool write(const std::filesystem::path &path)
inline std::filesystem::path getPath() const
inline unsigned long getChangeMask() const

Protected 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_
class GeneratedCartesianLimits : public moveit_setup::TemplatedGeneratedFile

Public Functions

inline virtual std::filesystem::path getRelativePath() const override

Returns the path relative to the configuration package root.

inline virtual std::filesystem::path getTemplatePath() const override

Returns the full path to the template file.

inline virtual std::string getDescription() const override

Returns an English description of this file’s purpose.

inline virtual bool hasChanges() const override

Returns true if this file will have changes when it is written to file.

class GeneratedJointLimits : public moveit_setup::YamlGeneratedFile

Public Functions

inline GeneratedJointLimits(const std::filesystem::path &package_path, const GeneratedTime &last_gen_time, SRDFConfig &parent)
inline virtual std::filesystem::path getRelativePath() const override

Returns the path relative to the configuration package root.

inline virtual std::string getDescription() const override

Returns an English description of this file’s purpose.

inline virtual bool hasChanges() const override

Returns true if this file will have changes when it is written to file.

virtual bool writeYaml(YAML::Emitter &emitter) override

Protected Attributes

SRDFConfig &parent_
class GeneratedSRDF : public moveit_setup::GeneratedFile

Public Functions

inline GeneratedSRDF(const std::filesystem::path &package_path, const GeneratedTime &last_gen_time, SRDFConfig &parent)
inline virtual std::filesystem::path getRelativePath() const override

Returns the path relative to the configuration package root.

inline virtual std::string getDescription() const override

Returns an English description of this file’s purpose.

inline virtual bool hasChanges() const override

Returns true if this file will have changes when it is written to file.

inline virtual bool write() override

Writes the file to disk.

Protected Attributes

SRDFConfig &parent_