Turtlebot3入门手册之六:开始使用和远程操作

来源:互联网 发布:mac口红代购 编辑:程序博客网 时间:2024/06/08 18:03

官方教程:http://turtlebot3.robotis.com/en/latest/bringup.html

在开始使用turtlebot3之前,推荐在bashrc里面增加一个export命令:

gedit ~/.bashrc
在最后增加一句:

export TURTLEBOT3_MODEL = burger
如果是在测试waffle,上面的burger就修改为waffle。

同样,在此博客以及该系列的其他博客,都用[PC][turtle][waffle]来区别命令执行的主体:

[PC]运行roscore

roscore

以下是分别调试turtle和waffle时的步骤:

1.[turtle]打开基本包:

roslaunch turtlebot3_bringup turtlebot3_robot.launch
如果出现lost sync with device之类的错误,表示传感器未正确连接。

[PC]新开一个终端(在终端右键open terminal,或者右键状态栏上的终端,new terminal),运行RViz

export TURTLEBOT3_MODEL=burgerroslaunch turtlebot3_bringup turtlebot3_model.launch
如下图所示:


2. [waffle]打开基本包

roslaunch turtlebot3_bringup turtlebot3_robot.launch
[PC]新开一个终端,运行RViz:

export TURTLEBOT3_MODEL=waffleroslaunch turtlebot3_bringup turtlebot3_model.launch

如果顺利的话,就能看到激光雷达的正常工作了。

3 远程操作

因为实验室没有别的手柄,所以远程操作部分,就只翻译键盘操作模式了,教程也支持xbox360,RC100,PS3Joystick,Wii,leak motion和安卓App,但是这个App在miui9上测试不可用,故以下时键盘的教程:

[PC]先打开roscore

roscore

在waffle或者burger上运行:

roslaunch turtlebot3_bringup turtlebot3_robot.launch
[PC]待waffle或者burger不再出现新的东西的时候,在PC上新开终端:

roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
注意顺序,出现下面的内容就表示,运行成功,可以开始使用键盘控制了:

Control Your Turtlebot3!---------------------------Moving around:        w   a    s    d        xw/x : increase/decrease linear velocitya/d : increase/decrease angular velocityspace key, s : force stopCTRL-C to quit