17.1. TB3 follower 跟隨者

備註:

  • 這個跟隨者 demo 只使用 360 度 LDS-01 光達來實現。所使用的分類演算法,是基於之前所 fitting 的人物及障礙物位置的樣本,來採取行動。它可讓機器人跟隨在前方 50cm 距離和 140 度範圍間的人移動。

  • 在有障礙物的空間內執行跟隨者 demo,可能效果不好。建議在空曠無障礙的空間執行。

[TB3 SBC 端] 為了能跑此 demo,LiDAR 光達啟動檔內的參數需要修改。以下範例,使用 Pluma 來修改啟動檔。 在 param tag 的 param name=”frame_id” 行內,將值 base_scan 替換為 odom,然後儲存啟動檔. 請參考下圖.

$ pluma ~/catkin_ws/src/turtlebot3/turtlebot3_bringup/launch/turtlebot3_lidar.launch

備註: TurtleBot3 follower 跟隨者展示,需要 scikit-learn、NumPy 及 ScyPy 套件

[Remote PC 端] 安裝 scikit-learn、NumPy 及 ScyPy 套件

$ sudo apt-get install python-pip
$ sudo pip install -U scikit-learn numpy scipy
$ sudo pip install --upgrade pip

[Remote PC 端] 當安裝完成,在 Remote PC 端執行 roscore 指令

$ roscore

[TB3 SBC 端] 啟動 TurtleBot3_bringup 程式

$ roslaunch turtlebot3_bringup turtlebot3_robot.launch

[Remote PC 端] 以下指令啟動 turtlebot3_follow_filter 程式

$ roslaunch turtlebot3_follow_filter turtlebot3_follow_filter.launch

[Remote PC 端] 以下指令啟動執行 turtlebot3_follower 程式

$ roslaunch turtlebot3_follower turtlebot3_follower.launch

Last updated