moveit2
The MoveIt Motion Planning Framework for ROS 2.
Classes | Functions | Variables
moveit_configs_utils.moveit_configs_builder Namespace Reference

Classes

class  MoveItConfigs
 
class  MoveItConfigsBuilder
 

Functions

def get_pattern_matches (folder, pattern)
 

Variables

 moveit_configs_utils_path = Path(get_package_share_directory("moveit_configs_utils"))
 

Detailed Description

Simplify loading moveit config parameters.

This module provides builder-pattern based class to simplify loading moveit related parameters found in
robot_moveit_config package generated by moveit setup assistant.

By default it expects the following structure for the moveit configs package

robot_name_moveit_config/
    .setup_assistant -> Used to retrieve information about the SRDF file and
                        the URDF file used when generating the package
    config/
        kinematics.yaml -> IK solver's parameters
        joint_limits.yaml -> Overriding position/velocity/acceleration limits from the URDF file
        moveit_cpp.yaml -> MoveItCpp related parameters
        *_planning.yaml -> planning pipelines parameters
        pilz_cartesian_limits.yaml -> Pilz planner parameters
        moveit_controllers.yaml -> trajectory execution manager's parameters
        ...

Example:
    moveit_configs = MoveItConfigsBuilder("robot_name").to_moveit_configs()
    ...
    moveit_configs.package_path
    moveit_configs.robot_description
    moveit_configs.robot_description_semantic
    moveit_configs.robot_description_kinematics
    moveit_configs.planning_pipelines
    moveit_configs.trajectory_execution
    moveit_configs.planning_scene_monitor
    moveit_configs.sensors_3d
    moveit_configs.move_group_capabilities
    moveit_configs.joint_limits
    moveit_configs.moveit_cpp
    moveit_configs.pilz_cartesian_limits
    # Or to get all the parameters as a dictionary
    moveit_configs.to_dict()

Each function in MoveItConfigsBuilder has a file_path as an argument which is used to override the default
path for the file

Example:
    moveit_configs = MoveItConfigsBuilder("robot_name")
                    # Relative to robot_name_moveit_configs
                    .robot_description_semantic(Path("my_config") / "my_file.srdf")
                    .to_moveit_configs()
    # Or
    moveit_configs = MoveItConfigsBuilder("robot_name")
                    # Absolute path to robot_name_moveit_config
                    .robot_description_semantic(Path.home() / "my_config" / "new_file.srdf")
                    .to_moveit_configs()

Function Documentation

◆ get_pattern_matches()

def moveit_configs_utils.moveit_configs_builder.get_pattern_matches (   folder,
  pattern 
)
Given all the files in the folder, find those that match the pattern.

If there are groups defined, the groups are returned. Otherwise the path to the matches are returned.

Definition at line 69 of file moveit_configs_builder.py.

Here is the caller graph for this function:

Variable Documentation

◆ moveit_configs_utils_path

moveit_configs_utils.moveit_configs_builder.moveit_configs_utils_path = Path(get_package_share_directory("moveit_configs_utils"))

Definition at line 66 of file moveit_configs_builder.py.