原创博客:转载请表明出处:http://www.cnblogs.com/zxouxuewei/
1.首先安装joystick遥控器驱动:
sudo apt-get install ros-indigo-joystick-drivers ros-indigo-turtlebot-teleop
2.运行tulterbot机器人:
roslaunch rbx1_bringup fake_turtlebot.launch
3.在rviz三维视图中查看机器人:
rosrun rviz rviz -d `rospack find rbx1_nav`/sim.rviz
4.通过按键控制机器人:
roslaunch rbx1_nav keyboard_teleop.launch
输出如下信息:此时可将光标移动到此窗口。通过提示的按键控制tulterbot机器人相应的移动:
Control Your Turtlebot! --------------------------- Moving around: u i o j k l m , . q/z : increase/decrease max speeds by 10% w/x : increase/decrease only linear speed by 10% e/c : increase/decrease only angular speed by 10% space key, k : force stop anything else : stop smoothly CTRL-C to quit currently: speed 0.2 turn 1
rqt_graph框图如下
5.使用joystick遥感控制机器人移动:安装虚拟遥感:
sudo apt-get install joystick
6.运行遥感:
arbotix_gui
当移动以上红点,即可在rviz视图中看到tulterbot机器人移动:
查看rqt_graph节点框图: