#!/bin/bash

# 启动终端窗口并运行节点
source install/setup.bash  # ros workspace
{
	gnome-terminal --title="0mc" --tab "XXD_ros" -- bash -c "ros2 run mc mc_node"
}&

sleep 0.1s
{
	gnome-terminal --title="1rtk" --tab "XXD_ros" -- bash -c "ros2 run rtk rtk_node"
}&

sleep 0.1s
{
	gnome-terminal --title="2rslidar" --tab "XXD_ros" -- bash -c "ros2 launch rslidar_sdk start.py"
}&

sleep 0.1s
{
	gnome-terminal --title="3lidar" --tab "XXD_ros" -- bash -c "ros2 run lidar lidar_node"
}&

sleep 0.1s
{
	gnome-terminal --title="4lslidar" --tab "XXD_ros" -- bash -c "ros2 launch lslidar_c16_decoder lslidar_c16_launch.py"
}&

sleep 0.1s
{
	gnome-terminal --title="5PL" --tab "XXD_ros" -- bash -c "ros2 run pl pl_node"
}&

sleep 0.1s
{
	gnome-terminal --title="6extract" --tab "XXD_ros" -- bash -c "ros2 run extract extractor_node"
}&

sleep 0.1s
{
	gnome-terminal --title="7FU" --tab "XXD_ros" -- bash -c "ros2 run fu fu_node"
}&

sleep 0.1s
{
	gnome-terminal --title="8remote" --tab "XXD_ros" -- bash -c "ros2 run auto_ctrl auto_node"
}&

# sleep 0.1s
# {
# 	gnome-terminal --title="8route" --tab "XXD_ros" -- bash -c "ros2 run route route_node"
# }&

# sleep 0.1s
# {
# 	gnome-terminal --title="gather" --tab "XXD_ros" -- bash -c "ros2 run gather gather_node"
# }&

###########################
###         MQTT        ###
###########################

########################################## ZXWL

# sleep 0.1s
# {
# 	gnome-terminal --title="sub" --tab "XXD_ros" -- bash -c "ros2 run sub sub_node"
# }&

# sleep 0.1s
# {
# 	gnome-terminal --title="GPS" --tab "XXD_ros" -- bash -c "ros2 run pub_gps pub_gps_node"
# }&

# sleep 0.1s
# {
# 	gnome-terminal --title="chassis" --tab "XXD_ros" -- bash -c "ros2 run pub_chassis pub_chassis_node"
# }&

########################################## JingMen
./pubJM.sh