gnome-terminal -x bash -c " sudo -u root whoami && sleep 13 && cd /home/nvidia/dji/catkin_ws_psdk && source devel/setup.bash && rosrun dji_psdk_ros main_controller_node;exec bash"
以上命令无法生效时,使用下面的命令:注意每一行有换行
gnome-terminal -x bash -c "sudo -s <
sleep 3
cd /home/nvidia/dji/catkin_ws_psdk
source devel/setup.bash
rosrun dji_psdk_ros dji_vehicle_node
EOF
exec bash"