-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinitialize_ros_communication.bash
executable file
·55 lines (47 loc) · 3.65 KB
/
initialize_ros_communication.bash
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
# Only the following arguments are accepted: beaumont, waterwitch
if [ "$#" -ne 1 ]; then
echo "Usage: $0 {beaumont|waterwitch}"
exit 1
fi
VEHICLE=$1
if [ "$VEHICLE" != "beaumont" ] && [ "$VEHICLE" != "waterwitch" ]; then
echo "Invalid argument: $VEHICLE"
echo "Usage: $0 {beaumont|waterwitch}"
exit 1
fi
if [ "$VEHICLE" == "beaumont" ]; then
# Initialize a ros2 parameter bridge for each thruster
ros2 run ros_gz_bridge parameter_bridge /beaumont/for_star_top@std_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /beaumont/for_star_bot@std_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /beaumont/for_port_top@std_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /beaumont/for_port_bot@std_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /beaumont/aft_star_top@std_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /beaumont/aft_star_bot@std_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /beaumont/aft_port_top@std_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /beaumont/aft_port_bot@std_msgs/msg/[email protected] & disown
# Initialize a ros2 parameter bridge for the claws
ros2 run ros_gz_bridge parameter_bridge /Beaumont/claws/cmd_vel@std_msgs/msg/[email protected] & disown
# Initialize a ros2 parameter bridge for the imu
ros2 run ros_gz_bridge parameter_bridge /imu@sensor_msgs/msg/[email protected] & disown
# Initialize a ros2 parameter bridge for each camera
ros2 run ros_gz_bridge parameter_bridge /front_camera@sensor_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /tooling_camera@sensor_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /top_camera@sensor_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /bottom_camera@sensor_msgs/msg/[email protected] & disown
elif [ "$VEHICLE" == "waterwitch" ]; then
ros2 run ros_gz_bridge parameter_bridge /waterwitch/for_star@std_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /waterwitch/for_port@std_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /waterwitch/aft_star@std_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /waterwitch/aft_port@std_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /waterwitch/star_top@std_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /waterwitch/port_top@std_msgs/msg/[email protected] & disown
# Initialize a ros2 parameter bridge for each camera
ros2 run ros_gz_bridge parameter_bridge /front_camera_forward@sensor_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /front_camera_downtilt@sensor_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /back_camera_forward@sensor_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /back_camera_downtilt@sensor_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /front_camera_forward_servo@std_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /front_camera_downtilt_servo@std_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /back_camera_forward_servo@std_msgs/msg/[email protected] & disown
ros2 run ros_gz_bridge parameter_bridge /back_camera_downtilt_servo@std_msgs/msg/[email protected] & disown
fi