本文针对如何利用Turtlebot3可实现的各种应用进行讲解
步骤:
[Remote PC]安装应用包
cd ~/catkin_ws/src
git clone https://github.com/ROBOTIS-GIT/turtlebot3_applications.git
cd ~/catkin_ws && catkin_make
TurtleBot跟随演示
注意:需要在无障碍环境进行,只需要使用HLS-LFCD LDS雷达即可
[TurtleBot] 更改配置
vim ~/catkin_ws/src/turtlebot3/turtlebot3_bringup/launch/turtlebot3_lidar.launch
修改前:
修改后:
[Remote PC]安装依赖包
sudo apt-get install python-pip
sudo pip install -U scikit-learn numpy scipy
sudo pip install --upgrade pip
测试:
[Remote PC] 运行roscore
Roscore
[TurtleBot] 启动burger
roslaunch turtlebot3_bringup turtlebot3_robot.launch
[Remote PC] 启动filter
roslaunch turtlebot3_follow_filter turtlebot3_follow_filter.launch
[Remote PC] 启动跟随
cd ~/catkin_ws/src/turtlebot3_applications/turtlebot3_follower/src
rosrun turtlebot3_follower follower.py
TurtleBot全景演示
turtlebot3_panorama演示通过使用pano_ros来实现全景图
依赖:Raspicam,参考Raspicam:(https://github.com/UbiquityRobotics/raspicam_node)
依赖:OpenCV和cvbridge ,参考opencv(http://docs.opencv.org/2.4/doc/tutorials/introduction/linux_install/linux_install.html)
[TurtleBot]启动Raspberry Pi cam V2
roslaunch raspicam_node camerav2_1280x960.launch
[Remote PC] 启动panorama
roslaunch turtlebot3_panorama panorama.launch
[Remote PC] 开始全景图制作
rosservice call turtlebot3_panorama/take_pano 0 360.0 30.0 0.3
参数设置:
模式:
0 : 旋转拍照 (例如:旋转,停止,拍照,旋转,停止,拍照...)
1 : 持续(拍照时要保持旋转)
2 : 停止拍照和创建全景图
全景图像的总角度(角度)
角度间隔 (角度) 用于旋转拍照模式 或 时间间隔 (秒) 用于其他模式
旋转速度 (弧度/秒)
[Remote PC] 查看结果
rqt_image_view image:=/turtlebot3_panorama/panorama