-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_navigation.sh
96 lines (76 loc) · 2.63 KB
/
run_navigation.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/bin/bash
#####################
# Script to run the navigation terminals as specified on 11/18/2023
# Generated by GPT4 and not tested, use with caution!
####################
# Function to run commands in a new terminal
run_in_new_terminal() {
gnome-terminal -- bash -c "$1; exec bash"
}
# Start Realsense on Fetch
run_in_new_terminal "ssh [email protected]
source ~/ros2_foxy/install/setup.bash
cd ~/ros2_ws
colcon build
. install/setup.bash
ros2 launch realsense2_camera rs_launch.py"
# Verify Realsense
run_in_new_terminal "ssh [email protected]
source ~/ros2_foxy/install/setup.bash
rostopic hz /ros2_camera/color/image_raw"
# Run Image Compression Node on Fetch
run_in_new_terminal "ssh [email protected]
source ~/ros2_foxy/install/setup.bash
cd ~/ros2_ws
colcon build
. install/setup.bash
ros2 run image_compression color_image_compression_node.py"
# Verify Image Compression
run_in_new_terminal "ssh [email protected]
source ~/ros2_foxy/install/setup.bash
rostopic hz /image_compressed"
# Run ROS2 to ROS1 Bridge
run_in_new_terminal "ssh [email protected]
source /opt/ros/noetic/setup.bash
rosparam load ~/ros2_ws/src/image_compression/params/bridge.yaml
source ~/ros2_foxy/install/setup.bash
ros2 run ros1_bridge parameter_bridge"
# Run Talker Node in ROS2 on Computer
run_in_new_terminal "ros2 run demo_nodes_cpp talker"
# Run Listener in ROS1 on Fetch
run_in_new_terminal "ssh [email protected]
source /opt/ros/noetic/setup.bash
rosrun roscpp_tutorials listener"
# Run Image Uncompression Node on Computer
run_in_new_terminal "cd ~/lifelong_lerf_ws
colcon build
. install/setup.bash
ros2 run camera_bringup realsense_compressed_converter.py"
# Verify Image Uncompression
run_in_new_terminal "rostopic hz /repub_image_raw"
# Run RTABMAP and RVIZ on Computer
run_in_new_terminal "cd ~/lifelong_lerf_ws
colcon build
. install/setup.bash
ros2 launch realsense_rtabmap_slam_bringup new_rtabmap.launch.py"
# Run Navigation on Computer
run_in_new_terminal "cd ~/lifelong_lerf_ws
colcon build
. install/setup.bash
ros2 launch realsense_rtabmap_slam_bringup navigation.launch.py"
# Verify Navigation
run_in_new_terminal "rostopic echo /cmd_vel
rostopic echo /navigate_to_pose/_action/status"
# Run Twist to String Conversion on Computer
run_in_new_terminal "cd ~/lifelong_lerf_ws
colcon build
. install/setup.bash
ros2 run realsense_rtabmap_slam_bringup twist_to_string.py"
# Run String to Twist Conversion on Fetch
run_in_new_terminal "ssh [email protected]
source /opt/ros/noetic/setup.bash
cd lifelong_lerf_fetch_ws
catkin_make
source devel/setup.bash
rosrun nuc_bridge string_to_twist.py"
echo "All commands executed. Check each terminal for output."