Parameter of move_group and move_group_interface for OMPL

asked 2021-01-25 05:00:20 -0500

ravnicas gravatar image

As the title suggests i'm having problems with the passed params to the move_group node, and to the cpp implementation of the MoveGroupInterface.

I want to use the OMPL planning pipeline and choose different types of planners, also to define specific parameters, "longest_valid_segment_fraction" mostly. I've read and run the panda examples, which dont change the parameters and changed the examples to work on my own robot.

I'm passing all of the OMPL parameters within the launch file to the move_group node like this:

my_node = Node(package='moveit_ros_move_group',
                           executable='move_group',
                           output='screen',
                           parameters=[robot_description,
                                       robot_description_semantic,
                                       kinematics_yaml,
                                       ompl_planning_pipeline_config,
                                       trajectory_execution,
                                       fake_controller,
                                       planning_scene_monitor_parameters,
                                       moveit_yaml,
                                       joint_limits,
                                       {'source_list': ["/tf", "/fake_controller_joint_states"]}])

where ompl_planning_pipeline_config looks like this:

planner_configs:
 SBLkConfigDefault:
  type: geometric::SBL
  range: 0.0  # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup()
 and others: ...

master:
 default_planner_config: SBLkConfigDefault
  planner_configs:
    - SBLkConfigDefault
    - ...
  projection_evaluator: joints(master_joint_a1, master_joint_a2)
  longest_valid_segment_fraction: "0.005"

I'm also starting a moveit_group_interface node, the same as in the example:

run_move_group_demo = Node(name='my_demo_run',
                           package='my_demo_run',
                           executable='my_demo_run',
                           prefix='xterm -e',
                           output='screen',
                           parameters=[robot_description,
                                       planning_pipelines,
                                       robot_description_semantic,
                                       kinematics_yaml,
                                       ompl_planning_pipeline_config,
                                       {'planning_pipeline':'ompl'}],
                           arguments = ['--ros-args', '--log-level', 'INFO'])

Which also gets the "planning_pipeline" and "planning_pipelines_config" parameters.

Now i'd like to access the planner configs from within the interface node via:

moveit::planning_interface::MoveGroupInterface move_group_int(move_group_node, "master");
move_group_int.setPlannerId("SBL");

This returns "Cannot find planning configuration for planning group 'master' .... " and is using the defaults instead.

edit retag flag offensive close merge delete