From ecfff8fab1bff5b03c4f9eecc723a2b2505a4638 Mon Sep 17 00:00:00 2001 From: Sharwin24 Date: Sat, 5 Jul 2025 20:01:03 -0500 Subject: [PATCH 1/3] Created python launch file --- delta_robot/launch/delta_robot.launch.py | 47 +++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/delta_robot/launch/delta_robot.launch.py b/delta_robot/launch/delta_robot.launch.py index 6c118ca..7c7db2f 100644 --- a/delta_robot/launch/delta_robot.launch.py +++ b/delta_robot/launch/delta_robot.launch.py @@ -1 +1,46 @@ -# Launch file for Delta Robot +from launch import LaunchDescription +from launch_ros.actions import Node +import os +from ament_index_python.packages import get_package_share_directory + + +def generate_launch_description(): + config_file = os.path.join( + get_package_share_directory('delta_robot'), + 'config', + 'delta_config.yaml' + ) + + return LaunchDescription([ + Node( + package='delta_robot', + executable='kinematics', + name='kinematics', + output='screen', + parameters=[config_file], + ), + Node( + package='delta_robot', + executable='motion_planner', + name='motion_planner', + output='screen', + ), + Node( + package='delta_robot', + executable='motor_controller', + name='motor_controller', + output='screen', + ), + Node( + package='delta_robot', + executable='range_scanner', + name='range_scanner', + output='screen', + ), + Node( + package='delta_robot', + executable='trajectory_generator', + name='trajectory_generator', + output='screen', + ), + ]) From ceab8abf52a9c3b84769241c6584c54a5d6f1625 Mon Sep 17 00:00:00 2001 From: Sharwin24 Date: Sat, 5 Jul 2025 20:08:17 -0500 Subject: [PATCH 2/3] Deleted old launch files and created new python launch file --- .../launch/delta_motion_planner.launch.xml | 7 ----- delta_robot/launch/delta_robot.launch.py | 27 +++++++++++++------ delta_robot/launch/kinematics.launch.xml | 5 ---- delta_robot/launch/motor_control.launch.xml | 3 --- delta_robot/launch/traj_gen.launch.xml | 3 --- 5 files changed, 19 insertions(+), 26 deletions(-) delete mode 100644 delta_robot/launch/delta_motion_planner.launch.xml delete mode 100644 delta_robot/launch/kinematics.launch.xml delete mode 100644 delta_robot/launch/motor_control.launch.xml delete mode 100644 delta_robot/launch/traj_gen.launch.xml diff --git a/delta_robot/launch/delta_motion_planner.launch.xml b/delta_robot/launch/delta_motion_planner.launch.xml deleted file mode 100644 index 891e51c..0000000 --- a/delta_robot/launch/delta_motion_planner.launch.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/delta_robot/launch/delta_robot.launch.py b/delta_robot/launch/delta_robot.launch.py index 7c7db2f..8956454 100644 --- a/delta_robot/launch/delta_robot.launch.py +++ b/delta_robot/launch/delta_robot.launch.py @@ -1,23 +1,25 @@ from launch import LaunchDescription from launch_ros.actions import Node -import os +from launch.actions import IncludeLaunchDescription +from launch.launch_description_sources import XMLLaunchDescriptionSource from ament_index_python.packages import get_package_share_directory +from launch.substitutions import PathJoinSubstitution def generate_launch_description(): - config_file = os.path.join( - get_package_share_directory('delta_robot'), - 'config', - 'delta_config.yaml' - ) - return LaunchDescription([ Node( package='delta_robot', executable='kinematics', name='kinematics', output='screen', - parameters=[config_file], + parameters=[ + PathJoinSubstitution([ + get_package_share_directory('delta_robot'), + 'config', + 'delta_config.yaml' + ]) + ], ), Node( package='delta_robot', @@ -43,4 +45,13 @@ def generate_launch_description(): name='trajectory_generator', output='screen', ), + IncludeLaunchDescription( + XMLLaunchDescriptionSource( + PathJoinSubstitution([ + get_package_share_directory('delta_robot_sensors'), + 'launch', + 'sensors.launch.xml' + ]) + ) + ) ]) diff --git a/delta_robot/launch/kinematics.launch.xml b/delta_robot/launch/kinematics.launch.xml deleted file mode 100644 index e8cd2d2..0000000 --- a/delta_robot/launch/kinematics.launch.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/delta_robot/launch/motor_control.launch.xml b/delta_robot/launch/motor_control.launch.xml deleted file mode 100644 index 9213bef..0000000 --- a/delta_robot/launch/motor_control.launch.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/delta_robot/launch/traj_gen.launch.xml b/delta_robot/launch/traj_gen.launch.xml deleted file mode 100644 index c0f9868..0000000 --- a/delta_robot/launch/traj_gen.launch.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file From 67e7529c349d6f91392815477628efaa48c82a4b Mon Sep 17 00:00:00 2001 From: Sharwin24 Date: Sat, 5 Jul 2025 20:09:51 -0500 Subject: [PATCH 3/3] Using Different launch description source --- delta_robot/launch/delta_robot.launch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/delta_robot/launch/delta_robot.launch.py b/delta_robot/launch/delta_robot.launch.py index 8956454..559668c 100644 --- a/delta_robot/launch/delta_robot.launch.py +++ b/delta_robot/launch/delta_robot.launch.py @@ -1,7 +1,7 @@ from launch import LaunchDescription from launch_ros.actions import Node from launch.actions import IncludeLaunchDescription -from launch.launch_description_sources import XMLLaunchDescriptionSource +from launch.launch_description_sources import AnyLaunchDescriptionSource from ament_index_python.packages import get_package_share_directory from launch.substitutions import PathJoinSubstitution @@ -46,7 +46,7 @@ def generate_launch_description(): output='screen', ), IncludeLaunchDescription( - XMLLaunchDescriptionSource( + AnyLaunchDescriptionSource( PathJoinSubstitution([ get_package_share_directory('delta_robot_sensors'), 'launch',