refactor launch configuration for robot and environment setup

- Simplified and consolidated launch arguments by removing unused configurations.
- Enhanced `test_env.launch.py` to support dynamic loading of xacro and SRDF arguments via YAML files.
- Added new launch parameters for control space, strategy, and interactive mode to improve flexibility.
- Updated robot description and MoveIt integration to use dynamic configurations.
- Improved clarity and modularity in scene and robot setup processes.
This commit is contained in:
Ilya Uraev 2024-11-30 19:30:13 +03:00
parent 48e8668136
commit de0d5d4440
6 changed files with 313 additions and 244 deletions

View file

@ -2,7 +2,7 @@ import os
import xacro
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch import LaunchDescription, condition
from launch.actions import (
DeclareLaunchArgument,
IncludeLaunchDescription,
@ -30,6 +30,7 @@ def launch_setup(context, *args, **kwargs):
moveit_config_package = LaunchConfiguration("moveit_config_package")
use_sim_time = LaunchConfiguration("use_sim_time")
use_controllers = LaunchConfiguration("use_controllers")
use_skills = LaunchConfiguration("use_skills")
namespace = LaunchConfiguration("namespace")
multi_robot = LaunchConfiguration("multi_robot")
robot_name = robot_name.perform(context)
@ -144,6 +145,7 @@ def launch_setup(context, *args, **kwargs):
"ee_link_name": ee_link_name,
"base_link_name": base_link_name,
}.items(),
condition=IfCondition(use_skills),
)
nodes_to_start = [
@ -247,6 +249,14 @@ def generate_launch_description():
description="Specify if MoveIt should be launched.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"use_skills",
default_value="true",
description="Specify if skills should be launched.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"use_controllers",