Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions xarm_moveit_config/launch/_robot_moveit_common.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def launch_setup(context, *args, **kwargs):
kinematics_suffix = LaunchConfiguration('kinematics_suffix', default='')

use_sim_time = LaunchConfiguration('use_sim_time', default=False)
add_mtc = LaunchConfiguration('add_mtc', default=False)

moveit_config_package_name = 'xarm_moveit_config'
xarm_type = '{}{}'.format(robot_type.perform(context), dof.perform(context) if robot_type.perform(context) in ('xarm', 'lite') else '')
Expand Down Expand Up @@ -237,21 +238,26 @@ def launch_setup(context, *args, **kwargs):
# 'ros.filtered_cloud_topic': 'filtered_cloud',
# }

# MTC ExecuteTaskSolution capability (requires ros-${ROS_DISTRO}-moveit-task-constructor-capabilities)
move_group_params = [
robot_description_parameters,
ompl_planning_pipeline_config,
trajectory_execution,
plan_execution,
moveit_controllers,
planning_scene_monitor_parameters,
# sensor_manager_parameters,
{'use_sim_time': use_sim_time},
]
if add_mtc.perform(context) in ('True', 'true'):
move_group_params.append({'capabilities': 'move_group/ExecuteTaskSolutionCapability'})

# Start the actual move_group node/action server
move_group_node = Node(
package='moveit_ros_move_group',
executable='move_group',
output='screen',
parameters=[
robot_description_parameters,
ompl_planning_pipeline_config,
trajectory_execution,
plan_execution,
moveit_controllers,
planning_scene_monitor_parameters,
# sensor_manager_parameters,
{'use_sim_time': use_sim_time},
],
parameters=move_group_params,
)

# rviz with moveit configuration
Expand Down
14 changes: 10 additions & 4 deletions xarm_moveit_config/launch/_robot_moveit_common2.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,26 @@ def launch_setup(context, *args, **kwargs):
use_sim_time = LaunchConfiguration('use_sim_time', default=False)
moveit_config_dump = LaunchConfiguration('moveit_config_dump')
rviz_config = LaunchConfiguration('rviz_config', default='')
add_mtc = LaunchConfiguration('add_mtc', default=False)

moveit_config_dump = moveit_config_dump.perform(context)
moveit_config_dict = yaml.load(moveit_config_dump, Loader=yaml.FullLoader)
moveit_config_package_name = 'xarm_moveit_config'

# MTC ExecuteTaskSolution capability (requires ros-${ROS_DISTRO}-moveit-task-constructor-capabilities)
move_group_params = [
moveit_config_dict,
{'use_sim_time': use_sim_time},
]
if add_mtc.perform(context) in ('True', 'true'):
move_group_params.append({'capabilities': 'move_group/ExecuteTaskSolutionCapability'})

# Start the actual move_group node/action server
move_group_node = Node(
package='moveit_ros_move_group',
executable='move_group',
output='screen',
parameters=[
moveit_config_dict,
{'use_sim_time': use_sim_time},
],
parameters=move_group_params,
)

# rviz with moveit configuration
Expand Down
4 changes: 3 additions & 1 deletion xarm_moveit_config/launch/_robot_moveit_fake.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def launch_setup(context, *args, **kwargs):
geometry_mesh_tcp_rpy = LaunchConfiguration('geometry_mesh_tcp_rpy', default='"0 0 0"')

no_gui_ctrl = LaunchConfiguration('no_gui_ctrl', default=False)
add_mtc = LaunchConfiguration('add_mtc', default=False)
ros_namespace = LaunchConfiguration('ros_namespace', default='').perform(context)

ros2_control_plugin = 'uf_robot_hardware/UFRobotFakeSystemHardware'
Expand Down Expand Up @@ -106,7 +107,7 @@ def launch_setup(context, *args, **kwargs):
geometry_mesh_tcp_xyz=geometry_mesh_tcp_xyz,
geometry_mesh_tcp_rpy=geometry_mesh_tcp_rpy,
).to_moveit_configs()

# robot description launch
# xarm_description/launch/_robot_description.launch.py
robot_description_launch = IncludeLaunchDescription(
Expand All @@ -126,6 +127,7 @@ def launch_setup(context, *args, **kwargs):
'attach_xyz': attach_xyz,
'attach_rpy': attach_rpy,
'no_gui_ctrl': no_gui_ctrl,
'add_mtc': add_mtc,
'use_sim_time': 'false',
'moveit_config_dump': yaml.dump(moveit_config.to_dict()),
}.items(),
Expand Down
2 changes: 2 additions & 0 deletions xarm_moveit_config/launch/xarm6_moveit_fake.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

def generate_launch_description():
hw_ns = LaunchConfiguration('hw_ns', default='xarm')
add_mtc = LaunchConfiguration('add_mtc', default='false')

# robot moveit fake launch
# xarm_moveit_config/launch/_robot_moveit_fake.launch.py
Expand All @@ -25,6 +26,7 @@ def generate_launch_description():
'robot_type': 'xarm',
'hw_ns': hw_ns,
'no_gui_ctrl': 'false',
'add_mtc': add_mtc,
}.items(),
)

Expand Down