2024-11-12 22:23:12 +03:00
|
|
|
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",
|
|
|
|
"robot_type": "rbs_arm",
|
|
|
|
"description_package": "rbs_arm",
|
|
|
|
"description_file": "rbs_arm_modular.xacro",
|
|
|
|
"robot_name": "rbs_arm",
|
refactor launch files for enhanced MoveIt integration and cleanup
- **RBS Bringup Launch File:**
- Enabled MoveIt by default (`use_moveit: true`).
- Removed unused arguments (`gripper_name`, `hardware`) for cleaner configuration.
- Updated `robot_description_kinematics` to use the new kinematics file path handling.
- **RBS Robot Launch File:**
- Streamlined robot description setup, removing unnecessary parameters like `gripper_name`, `hardware`, and pose arguments (`x`, `y`, `z`, `roll`, etc.).
- Updated robot description and semantic description to use launch configurations.
- Refactored kinematics file handling for clarity.
- **Skills Launch File:**
- Updated kinematics YAML loading to use `load_yaml_abs` for absolute path resolution.
- Standardized `robot_description`, `robot_description_semantic`, and `kinematics` parameters.
- **General Improvements:**
- Consolidated redundant logic across launch files.
- Improved maintainability by removing hardcoded and unused configurations.
2024-11-22 02:16:20 +03:00
|
|
|
"use_moveit": "true",
|
2024-11-12 22:23:12 +03:00
|
|
|
"moveit_config_package": "rbs_arm",
|
|
|
|
"moveit_config_file": "rbs_arm.srdf.xacro",
|
|
|
|
"use_sim_time": "true",
|
|
|
|
"use_controllers": "true",
|
|
|
|
"scene_config_file": "",
|
|
|
|
"base_link_name": "base_link",
|
|
|
|
"ee_link_name": "gripper_grasp_point",
|
2024-11-15 23:25:02 +03:00
|
|
|
"control_space": "task",
|
|
|
|
"control_strategy": "position",
|
2024-11-18 23:59:49 +03:00
|
|
|
"interactive": "false"
|
2024-11-12 22:23:12 +03:00
|
|
|
}.items(),
|
|
|
|
)
|
|
|
|
|
|
|
|
nodes_to_start = [
|
|
|
|
main_script,
|
|
|
|
]
|
|
|
|
return nodes_to_start
|
|
|
|
|
|
|
|
|
|
|
|
def generate_launch_description():
|
|
|
|
declared_arguments = []
|
|
|
|
|
|
|
|
return LaunchDescription(
|
|
|
|
declared_arguments + [OpaqueFunction(function=launch_setup)]
|
|
|
|
)
|