2020年10月30日 星期五

[ROS] roslaunch: 在新的 Terminal 視窗啟動節點

使用 roslaunch 啟動節點時,預設所有節點都使用相同的 Terminal 視窗。若要開啟新的 Terminal 視窗來啟動節點,可以使用 <node> 標籤的 launch-prefix 屬性。如下所示,依據使用的 Terminal 來做設定。

 

使用 gnome-terminal

<node name="foo" pkg="bar" type="bar_node" output="screen" launch-prefix="gnome-terminal -x" />

 

使用 xterm

<node name="foo" pkg="bar" type="bar_node" output="screen" launch-prefix="xterm -e" />

 

 

參考資料

 

  • launching nodes in a new terminal with roslaunch

https://answers.ros.org/question/30754/launching-nodes-in-a-new-terminal-with-roslaunch/

 

  • Using a shell script to call multiple ROS launch files

https://stackoverflow.com/questions/24171574/using-a-shell-script-to-call-multiple-ros-launch-files

 

沒有留言:

張貼留言

和我聯絡

名稱

以電子郵件傳送 *

訊息 *