OMPL_Planning

class Motion_Planning.Manipulation.OMPL_Planner.OMPL_Planner(robot, Planner_cfg)[source]

Class for OMPL planning.

__init__(robot, Planner_cfg)[source]

Initialize the OMPL planner.

Parameters:
  • robot (Robot) – The robot object.

  • Planner_cfg (Config) – The configuration for the planner.

set_planner(planner_name)[source]

Set planner for OMPL.

Parameters:

planner_name (str) – The name of the planner to use.

set_target(target)[source]

Set the target object for the manipulation task.

Parameters:

target (Union[str, int]) – The id or name of the target object.

Returns:

The goal state in joint space.

Return type:

list

set_target_pose(target_pose)[source]

Set the target pose for the planner.

Parameters:

pose (Pose) – The target pose for the planning algorithm. This must include the position and orientation of the target.

Returns:

True if the target pose was successfully set, False otherwise.

Return type:

bool

set_obstacles()[source]

Add obstacles to the scene.

add_obstacle(obstacle)[source]

Add obstacle to the list of obstacles. This is useful for adding a specific obstacle to the list.

Parameters:

obstacle_id – id of the obstacle to add.

remove_obstacle(obstacle)[source]

Remove obstacle from the list of obstacles. This is useful for removing a specific obstacle from the list.

Parameters:

obstacle_id – id of the obstacle to remove.

get_obstacles_info()[source]

Check obstacles in the scene and print them to the console.

plan(start, goal)[source]

Plan grasp from start to goal using OMPL.

Parameters:
  • start (list) – The start state in joint space.

  • goal (list) – The goal state in joint space.

Returns:

The planned path as a list of states.

Return type:

list

state_to_list(state)[source]

Convert state to list.

Parameters:

state (ob.State) – The state to convert.

Returns:

The state as a list of values.

Return type:

list