Kobuki底盘 连接线 电源线 主机 工作站 Kinect
Ubuntu16.0 ROS kinetic Turtlebot 包
或者
Ubuntu14.0 ROS indigo Turtlebot 包
ROS indigo 安装网址
ROS kinetic 安装网址
Indigo :
1. sudo apt-get update
2. sudo apt-get install ros-indigo-turtlebot ros-indigo-turtlebot-apps ros-indigo-turtlebot-interactions ros-indigo-turtlebot-simulator ros-indigo-kobuki-ftdi ros-indigo-rocon-remocon ros-indigo-rocon-qt-library ros-indigo-ar-track-alvar-msgs
Kinetic:
1 sudo apt-get update
2 sudo apt-get install ros-kinetic-turtlebot ros-kinetic-turtlebot-apps ros-kinetic-turtlebot-interactions ros-kinetic-turtlebot-simulator ros-kinetic-kobuki-ftdi ros-kinetic-rocon-* ros-kinetic-ar-track-alvar-msgs
连接各电源线与数据线,开启turtlebot 电源
运行底盘驱动
roslaunch turtlebot_bringup minimal.launch
运行键盘控制
roslaunch turtlebot_teleop keyboard_teleop.launch
可以看到,键盘能够控制turtlebot 前后左右及旋转。
实际运行过程中主机被安装在turtlebot上一起运动,所以需要用工作站与turtlebot 的主机相连接,从而远程控制turtlebot并能够查看运行数据,调试等。
ifconfig
sudo apt-get install openssh-server
ssh username@<TURTLEBOTP_IP>
例: ssh [email protected]
建议:
ssh -X [email protected] 这里的-X 参数的含义是 开启X11转发功能,即能够显示在ssh控制界面能够显示图形化窗口,类似rviz和摄像头的窗口
远程登录之后就可以从工作站的shell 进入turtlebot 主机的shell 然后输入操作命令
turtlebot主机 ros 变量更改
echo export ROS_MASTER_URI=http://localhost:11311 >> ~/.bashrc
echo export ROS_HOSTNAME=IP_OF_TURTLEBOT >> ~/.bashrc
IP_OF_TURTLEBOT 是turtlebot主机的ip地址 例:
echo export ROS_MASTER_URI=http://localhost:11311 >> ~/.bashrc
echo export ROS_HOSTNAME=10.20.85.107 >> ~/.bashrc
工作站 ros变量更改
echo export ROS_MASTER_URI=http://IP_OF_TURTLEBOT:11311 >> ~/.bashrc
echo export ROS_HOSTNAME=IP_OF_PC >> ~/.bashrc
IP_OF_TURTLEBOT 与 ROS_HOSTNAME=IP_OF_PC 分别是turtlebot主机与工作站的ip地址,通过命令查看
(1)turtlebot 主机shell运行
roslaunch turtlebot_bringup minimal.launch
(2)工作站shell运行
roslaunch turtlebot_teleop keyboard_teleop.launch
在工作站的shell上可以控制turtlebot的移动
sudo apt-get install chrony
sudo ntpdate ntp.ubuntu.com
indigo:
sudo apt-get install ros-indigo-openni-* ros-indigo-openni2-* ros-indigo-freenect-*
rospack profile
Kinetic:
sudo apt-get install ros-kinetic-openni-* ros-kinetic-openni2-* ros-kinetic-freenect-*
rospack profile
echo "export TURTLEBOT_3D_SENSOR=kinect" >>~/.bashrc
source ~/.bashrc
Turtlebot 主机shell
roslaunch turtlebot_bringup minimal.launch
roslaunch freenect_launch freenect-registered-xyzrgb.launch
工作站shell
Indigo:
rosrun image_view image_view image:=/camera/rgb/image_color
Kinetic
rosrun rqt_image_view rqt_image_view image:=/camera/rgb/image_color
参考网址ROS wiki
参考网址创客制造