runtime/rbs_bringup/launch/rbs_bringup.launch.py
Bill Finger ea4ae0ed69 feat(rbs): refactor controller paths and launch configuration
- Rename default controllers file `rbs_arm0_controllers.yaml` to `controllers.yaml` across all launch files
- Enhance `runtime.launch.py` by adding imports (`URDF_parser`, `ControllerManager`, `yaml`) and new arguments (`scene_config_file`, `ee_link_name`, `base_link_name`)
  - Implement xacro argument loading via YAML
  - Configure `robot_builder` to save controllers to `controllers.yaml` based on URDF parsing
- Add `control.launch.py` in `rbs_bringup` for dynamic controller spawning based on strategies/configurations
- Add `rbs_bringup.launch.py` as a unified entry point for single robot setup, initializing core settings like gripper, robot type, and controllers
- Remove `launch_env.launch.py`
- Remove `multi_robot.launch.py`
- Enhance `rbs_robot.launch.py` with `ee_link_name` and `base_link_name` arguments for end-effector and base link customization
- Add `ee_link_name` and `base_link_name` to `skills.launch.py` for flexible robot setup in skills
- Update `mtp_jtc_cart.cpp` with `base_link` and `robot_ee_link` parameters for KDL chain retrieval
- Remove `single_robot.launch.py` for simplified single robot deployment
2024-11-12 22:23:12 +03:00

52 lines
1.5 KiB
Python

from launch import LaunchDescription
from launch.actions import (
IncludeLaunchDescription,
OpaqueFunction,
)
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import (
PathJoinSubstitution,
)
from launch_ros.substitutions import FindPackageShare
def launch_setup(context, *args, **kwargs):
main_script = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
[
PathJoinSubstitution(
[FindPackageShare("rbs_runtime"), "launch", "runtime.launch.py"]
)
]
),
launch_arguments={
"with_gripper": "true",
"gripper_name": "rbs_gripper",
"robot_type": "rbs_arm",
"description_package": "rbs_arm",
"description_file": "rbs_arm_modular.xacro",
"robot_name": "rbs_arm",
"use_moveit": "false",
"moveit_config_package": "rbs_arm",
"moveit_config_file": "rbs_arm.srdf.xacro",
"use_sim_time": "true",
"hardware": "gazebo",
"use_controllers": "true",
"scene_config_file": "",
"base_link_name": "base_link",
"ee_link_name": "gripper_grasp_point",
}.items(),
)
nodes_to_start = [
main_script,
]
return nodes_to_start
def generate_launch_description():
declared_arguments = []
return LaunchDescription(
declared_arguments + [OpaqueFunction(function=launch_setup)]
)