首先請您自行依據線標提示將小強接線鏈接好,完整結構以下兩圖所示:html
小強是屬於Turtlebot機器人。它由底盤、主機、Kinect相機(經過USB鏈接主機)組成,沒有顯示屏。若是要經過顯示器查看主機的Linux影像,則須要經過HDMI轉VGA線另外鏈接臺式電腦顯示器。node
本機ip地址:查詢本機ip地址。ubuntu
經過ssh遠程鏈接,其中xxx.xxx.xxx.xxx是小強的IP服務器
ssh xiaoqiang@xxx.xxx.xxx.xxx網絡
在小強機器人上按「ctrl+alt+t」調出命令窗口:dom
xiaoqiang@xiaoqiang-desktop:~$ ifconfig -a
eth12 Link encap:Ethernet HWaddr 00:e0:4c:68:01:87
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)ssh
eth13 Link encap:Ethernet HWaddr 00:e0:4c:68:01:88
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)oop
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:4379835 errors:0 dropped:0 overruns:0 frame:0
TX packets:4379835 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:154070895214 (154.0 GB) TX bytes:154070895214 (154.0 GB)spa
wlan7 Link encap:Ethernet HWaddr e8:fc:af:9e:05:ed
inet addr:172.29.78.130 Bcast:172.29.255.255 Mask:255.255.0.0
inet6 addr: fe80::eafc:afff:fe9e:5ed/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31230 errors:0 dropped:0 overruns:0 frame:110951
TX packets:27909 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10462279 (10.4 MB) TX bytes:5136459 (5.1 MB)
Interrupt:16 .net
遠程調用:
niu@niu-ThinkPad-T510:~$ ssh xiaoqiang@172.29.78.130
The authenticity of host '172.29.78.130 (172.29.78.130)' can't be established.
ECDSA key fingerprint is SHA256:1pDxKQ/7sw1WsI+KzJnn3OYQbyHMQAXTSNdC775jAgk.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '172.29.78.130' (ECDSA) to the list of known hosts.
xiaoqiang@172.29.78.130's password:
Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-45-generic x86_64)
* Documentation: https://help.ubuntu.com/
Your Hardware Enablement Stack (HWE) is supported until April 2019.
Last login: Sat Dec 10 11:48:47 2016 from ubuntu
查詢服務:
xiaoqiang@xiaoqiang-desktop:~$ rostopic list
/ORB_SLAM/Camera
/ORB_SLAM/Frame
/camera_node/camera_info
/camera_node/image_raw
/camera_node/image_raw/compressed
/camera_node/image_raw/compressed/parameter_descriptions
/camera_node/image_raw/compressed/parameter_updates
/camera_node/image_raw/compressedDepth
/camera_node/image_raw/compressedDepth/parameter_descriptions
/camera_node/image_raw/compressedDepth/parameter_updates
/camera_node/image_raw/theora
/camera_node/image_raw/theora/parameter_descriptions
/camera_node/image_raw/theora/parameter_updates
/cmd_vel
/globalMoveFlag
/imu_cal
/joint_states
/orb_scale/scaleStatus
/rosout
/rosout_agg
/system_monitor/report
/tf
/tf_static
/usb_cam/brightness
/xqserial_server/Odom
/xqserial_server/Pose2D
/xqserial_server/Power
/xqserial_server/StatusFlag
/xqserial_server/Twist
xiaoqiang@xiaoqiang-desktop:~$
查看系統狀態:
xiaoqiang@xiaoqiang-desktop:~$ rostopic echo /system_monitor/report
imageStatus: True
odomStatus: True
orbStartStatus: False
orbInitStatus: False
orbScaleStatus: False
brightness: 0
power: 11.4527730942
其中 imageStatus 表示攝像頭是否工做正常。odomStatus 表示底層驅動時候工做正常。Orb相關的三個變量是視覺導航相關的狀態,能夠不用管(若是對這方面感興趣能夠在論壇裏進
行交流)。brightness 是攝像頭的亮度,power 是當前電池的電壓值,若是沒法讀取則是 0.
遠程遙控:
經過 ssh 進行鏈接
ssh xiaoqiang@xxx.xxx.xxx.xxx
啓動遙控程序
rosrun nav_test control.py
如今就能夠經過方向鍵來控制小強的移動了。空格鍵是中止。Ctrl + C 退出程序。
視頻傳輸:
修改hosts文件:https://zhidao.baidu.com/question/201310150745872645.html http://os.51cto.com/art/200803/68170.htm
rosrun image_view image_view image:=/camera_node/image_raw_image_transport:=compressed
niu@niu-ThinkPad-T510:~$ export ROS_MASTER_URI=http://172.29.78.130:11311
niu@niu-ThinkPad-T510:~$ rosrun image_view image_view image:=/camera_node/image_raw image_transport:='compressed'
init done
[ INFO] [1482102718.080234054]: Using transport "raw"
幫助信息:http://blog.csdn.net/crazyquhezheng/article/details/50324583
1.配置小強網絡
http://community.bwbot.org/topic/61/%E5%B0%8F%E5%BC%BA%E7%9A%84%E8%BF%9C%E7%A8%8B%E5%8D%8F%E5%8A%A9%E5%8A%9F%E8%83%BD
爲何必定要是Linux呢,由於ROS只有Linux版,因此必須是Linux,並且Linux是開源的系統,免費並且開源,能夠改造,輕便,適合於工業製造,並且有不少的開源代碼,固然不少開源代碼是跨平臺的,經過CMake也能夠用於Windows、Mac、Android等。
爲何必定要將圖像傳輸到服務器端,在客戶端也能夠處理啊,的確是這樣,可是服務器端能夠操縱小車的行走,這個是在客戶端所不能完成的,因此這個控制是必須由服務器端完成的。