From 9267c0d194694f2b1e1ebfb2bacec2d297e78cad Mon Sep 17 00:00:00 2001 From: Aditya Pulipaka Date: Fri, 11 Apr 2025 13:24:28 -0500 Subject: [PATCH] otherFiles --- .bashrc | 2 ++ chaseTurt_launch.py | 16 ++++++++++++++++ initTurt_launch.py | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 .bashrc create mode 100644 chaseTurt_launch.py create mode 100644 initTurt_launch.py diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..e317d9c --- /dev/null +++ b/.bashrc @@ -0,0 +1,2 @@ +source ~/ros2_humble/install/local_setup.bash +source ~/adipu_ws/install/setup.bash diff --git a/chaseTurt_launch.py b/chaseTurt_launch.py new file mode 100644 index 0000000..19fbd88 --- /dev/null +++ b/chaseTurt_launch.py @@ -0,0 +1,16 @@ +from launch import LaunchDescription +from launch_ros.actions import Node + +def generate_launch_description(): + return LaunchDescription([ + Node( + package='adipu_turtlesim_controller', + executable='chaser_node', + name='turtle_chaser' + ), + Node( + package='adipu_turtlesim_controller', + executable='chaser_flipper_node', + name='turtle_flipper' + ) + ]) \ No newline at end of file diff --git a/initTurt_launch.py b/initTurt_launch.py new file mode 100644 index 0000000..b4bade7 --- /dev/null +++ b/initTurt_launch.py @@ -0,0 +1,32 @@ +from launch import LaunchDescription +from launch_ros.actions import Node +from launch.actions import ExecuteProcess, TimerAction + +def generate_launch_description(): + launchDesc = LaunchDescription([ + Node( + package='turtlesim', + executable='turtlesim_node', + name='sim' + ), + Node( + package='adipu_turtlesim_controller', + executable='mouse_follow_node', + name='mouse' + ) + ]) + + launchDesc.add_action( + ExecuteProcess( + cmd=[ + "ros2", + "service", + "call", + "/spawn", + "turtlesim/srv/Spawn", + "{x: 2.0, y: 2.0, theta: 0.0, name: 'turtle2'}" + ], + output='screen' + ) + ) + return launchDesc \ No newline at end of file