Skip to content

Consistent parameter loading for different motion planning pipelines #892

@AndyZe

Description

@AndyZe

hybrid_planning and moveit_task_constructor are two components of MoveIt that are currently supposed to work with interchangeable planning pipelines, e.g. CHOMP and OMPL.

This gets tricky in ROS2 because CHOMP and OMPL have different parameters and we don't know what they will be ahead of time. So, hard-coded versions of declare_parameter are not really possible.

One way to get around this in some cases is to set node_options.automatically_declare_parameters_from_overrides(true);. Then, whatever you have in the yaml file will be automatically declared. I think this is a decent solution but it doesn't do any type or error catching.

node_options.automatically_declare_parameters_from_overrides(true); does not work for plugins because the constructor is passed a const node_options argument, e.g.

GlobalPlannerComponent::GlobalPlannerComponent(const rclcpp::NodeOptions& options)

^ So we cannot change the node options for this plugin.

@sjahr has suggested that OMPL can read its own parameters in the OMPL interface class. That seems like a good idea to me.

Another option is to look at how moveit_cpp does it. Does it have a good general solution that could be used in other places?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions