add planner configs to planning group in moveit config
This commit is contained in:
parent
ed430a825d
commit
1f7dc11289
1 changed files with 19 additions and 8 deletions
|
@ -4,7 +4,7 @@ from launch.actions import DeclareLaunchArgument, OpaqueFunction
|
||||||
from launch.substitutions import (
|
from launch.substitutions import (
|
||||||
LaunchConfiguration,
|
LaunchConfiguration,
|
||||||
)
|
)
|
||||||
from moveit_configs_utils import MoveItConfigsBuilder
|
from moveit_configs_utils import MoveItConfigsBuilder, moveit_configs_builder
|
||||||
|
|
||||||
|
|
||||||
def generate_launch_description():
|
def generate_launch_description():
|
||||||
|
@ -88,7 +88,6 @@ def launch_setup(context, *args, **kwargs):
|
||||||
}
|
}
|
||||||
use_sim_time = {"use_sim_time": use_sim_time}
|
use_sim_time = {"use_sim_time": use_sim_time}
|
||||||
|
|
||||||
|
|
||||||
moveit_config = (
|
moveit_config = (
|
||||||
MoveItConfigsBuilder(robot_name="rbs_arm", package_name="rbs_mill_assist")
|
MoveItConfigsBuilder(robot_name="rbs_arm", package_name="rbs_mill_assist")
|
||||||
.trajectory_execution(file_path="moveit/moveit_controllers.yaml")
|
.trajectory_execution(file_path="moveit/moveit_controllers.yaml")
|
||||||
|
@ -96,19 +95,31 @@ def launch_setup(context, *args, **kwargs):
|
||||||
.pilz_cartesian_limits("moveit/pilz_cartesian_limits.yaml")
|
.pilz_cartesian_limits("moveit/pilz_cartesian_limits.yaml")
|
||||||
.robot_description_kinematics("moveit/kinematics.yaml")
|
.robot_description_kinematics("moveit/kinematics.yaml")
|
||||||
.robot_description_semantic("srdf/rbs_arm.srdf", mappings={})
|
.robot_description_semantic("srdf/rbs_arm.srdf", mappings={})
|
||||||
.planning_pipelines(pipelines=["ompl", "stomp"], default_planning_pipeline="stomp")
|
.planning_pipelines(
|
||||||
|
pipelines=["ompl", "stomp", "chomp"], default_planning_pipeline="ompl"
|
||||||
|
)
|
||||||
.to_moveit_configs()
|
.to_moveit_configs()
|
||||||
)
|
)
|
||||||
|
planners_ids = [
|
||||||
|
"RRTstar",
|
||||||
|
"PRM",
|
||||||
|
"BiTRRT",
|
||||||
|
"SPARStwo",
|
||||||
|
]
|
||||||
|
(
|
||||||
|
moveit_config.planning_pipelines["ompl"]
|
||||||
|
.setdefault("arm", {})
|
||||||
|
# .setdefault("planner_configs", {})
|
||||||
|
.update(
|
||||||
|
{"planner_configs":planners_ids}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
move_group_node = Node(
|
move_group_node = Node(
|
||||||
package="moveit_ros_move_group",
|
package="moveit_ros_move_group",
|
||||||
executable="move_group",
|
executable="move_group",
|
||||||
namespace=namespace,
|
namespace=namespace,
|
||||||
parameters=[
|
parameters=[moveit_config.to_dict(), robot_description, use_sim_time],
|
||||||
moveit_config.to_dict(),
|
|
||||||
robot_description,
|
|
||||||
use_sim_time
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
planning_scene_publisher = Node(
|
planning_scene_publisher = Node(
|
||||||
package="rbs_mill_assist",
|
package="rbs_mill_assist",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue