55 void loadPrevious(
const std::filesystem::path& ,
const YAML::Node& node)
override;
74 return std::filesystem::path(
"config") / (
parent_.
urdf_config_->getRobotName() +
".urdf.xacro");
79 return getSharePath(
"moveit_setup_controllers") /
"templates" /
"config" /
"modified.urdf.xacro";
84 return "A modified version of the original URDF file with additional interfaces (e.g. ros2_control, simulation)";
97 std::vector<GeneratedFilePtr>& files)
override;
109 std::vector<IncludedXacroConfig::Ptr> xacros;
112 if (pair.second->isConfigured())
113 xacros.push_back(pair.second);
120 std::vector<std::string> names;
123 if (pair.second->isConfigured())
124 names.push_back(pair.first);
A virtual class that represents a xacro header that should be included in the modified urdf configura...
std::filesystem::path getRelativePath() const override
Returns the path relative to the configuration package root.
std::filesystem::path getTemplatePath() const override
Returns the full path to the template file.
ModifiedUrdfConfig & parent_
bool hasChanges() const override
Returns true if this file will have changes when it is written to file.
GeneratedModifiedURDF(const std::filesystem::path &package_path, const GeneratedTime &last_gen_time, ModifiedUrdfConfig &parent)
std::string getDescription() const override
Returns an English description of this file's purpose.
A configuration that stores info about modifications to the URDF.
void onInit() override
Overridable initialization method.
std::vector< IncludedXacroConfig::Ptr > getIncludedXacros() 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.
YAML::Node saveToYaml() const override
Optionally save "meta" information for saving in the .setup_assistant yaml file.
std::vector< std::string > getIncludedXacroNames() const
bool isConfigured() const override
Return true if this part of the configuration is completely set up.
void loadPrevious(const std::filesystem::path &, const YAML::Node &node) override
Loads the configuration from an existing MoveIt configuration.
std::shared_ptr< URDFConfig > urdf_config_
std::unordered_map< std::string, IncludedXacroConfig::Ptr > getIncludedXacroMap() const
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.
bool hasChanges() const
Returns true if this or any of the included xacros have changes, requiring the URDF to be regenerated...
std::set< std::string > cached_xacro_names_
where all the data for each part of the configuration is stored.
std::shared_ptr< DataWarehouse > config_data_
Specialization of GeneratedFile for generating a text file from a template.
std::filesystem::path getSharePath(const std::string &package_name)
Return a path for the given package's share folder.
std::filesystem::file_time_type GeneratedTime