【正文】
g application MJPG Streamer Version.: MJPGstreamer [1016]: MJPG Streamer Version.: i: Using V4L2 device.: /dev/video0 MJPGstreamer [1016]: Using V4L2 device.: /dev/video0 i: Desired Resolution: 640 x 480 MJPGstreamer [1016]: Desired Resolution: 640 x 480 i: Frames Per Second.: 5 MJPGstreamer [1016]: Frames Per Second.: 5 i: Format............: MJPEG MJPGstreamer [1016]: Format............: MJPEG o: folderpath...: // MJPGstreamer [1016]: folderpath...: // o: HTTP TCP port.....: 8080 MJPGstreamer [1016]: HTTP TCP port.....: 8080 在源碼目錄下有 ,這個(gè)腳本里有一些 mjpgstream 的使用方法及說(shuō)明 。 221 } + urbtransfer_flags = URB_NO_TRANSFER_DMA_MAP。 最后在瀏覽 器中輸入 ,表示 cgi 20 信息科 學(xué)與技術(shù)學(xué)院學(xué)士學(xué)位論文 測(cè)試通過(guò) 。 } */ /*if (passwdbuf == NULL) { DIE(getpwuid)。cgi 程序使網(wǎng)頁(yè)具有交互功能 。 在 中主要的操作函數(shù)是: 16 信息科 學(xué)與技術(shù)學(xué)院學(xué)士學(xué)位論文 int get_input(); //這個(gè)函數(shù)用來(lái)獲得 cgi 數(shù)據(jù)并解析后放到 nv 數(shù)組中 int cmd_init(mand *cmd); //將獲得的數(shù)據(jù)處理后填充 cmd 結(jié)構(gòu)體 int led_control(mand *cmd); //將 cmd 結(jié)構(gòu)體轉(zhuǎn)化為具體的控制動(dòng)作 int robot_control(mand *cmd); //根據(jù)獲取的信息來(lái)對(duì)機(jī)器人發(fā)送不同的命令 我們按照先獲取 cgi 數(shù)據(jù),然后填充 cmd 結(jié)構(gòu)體,然后調(diào)用 led_control 函數(shù)和 robot_control 函數(shù)這樣就可以實(shí)現(xiàn)對(duì) led 燈、機(jī)器人的控制了。 //傳送過(guò)來(lái)的數(shù)據(jù)指針主要是指網(wǎng)頁(yè)傳過(guò)來(lái)的數(shù)據(jù) int count。 14 信息科 學(xué)與技術(shù)學(xué)院學(xué)士學(xué)位論文 圖 32 硬件框架圖 DFPPRK 是基于 Android 開(kāi)源項(xiàng)目的全向移動(dòng)機(jī)器人平臺(tái),機(jī)器人平臺(tái)機(jī)身采用高檔拉絲氧化鋁材料制造,外觀美觀并且堅(jiān)固耐用。 上面介紹了一種基于 ARM9 嵌入式系統(tǒng)的 3G 智能機(jī)器人的基本組成模塊,軟件層次的設(shè)計(jì),這種方案較好的做到了在成本和性能上的妥善處理,改善了開(kāi)發(fā)研究過(guò)程 ,同時(shí)也為其他類(lèi)型的 3G 機(jī)器人的設(shè)計(jì)提供了一個(gè)參考,如擬人型機(jī)器人。 行為層:這一層是一些抽象類(lèi)行為的對(duì)象,這些對(duì)象通過(guò)協(xié)議對(duì)象的傳感器數(shù)據(jù)進(jìn)行局部的行為規(guī)劃,并操作協(xié)議對(duì)象向機(jī) 器人底層發(fā)送控制指令。每個(gè)系列除了具有 ARM 體系結(jié)構(gòu)的共同特點(diǎn)以外,都有各自的 特點(diǎn)和應(yīng)用領(lǐng)域 [1]。另外,本系統(tǒng)需要 MTD( MemoryTechnology Devices,內(nèi)存技術(shù)設(shè)備 ) 的支持。 YAFFS 采用一種多策略混合的垃圾回收算法,結(jié)合了貪心策略的高效性和隨機(jī)選擇的平均性,達(dá)到了兼顧損耗平均和系統(tǒng)開(kāi)銷(xiāo)的目的。目前 FLASH支持的文件系統(tǒng)技術(shù)主要有 JFFS2, YAFFS2, TrueFFS, FTL/ NTFL, RAMFS,CRAMFS 和 ROMFS 等 等。文件系統(tǒng)會(huì)在你的存儲(chǔ)器中劃分區(qū)域來(lái)保存文件數(shù)據(jù) ,所以一般采用 FLASH 作為存儲(chǔ)介質(zhì)。根目錄下面只需要修改 Makefile 文件,該 文件主要 任務(wù)是產(chǎn)生 vmLinux 文件和內(nèi)核模塊。 ○ 2 檢 測(cè)系統(tǒng)內(nèi)存映射。工作于這種模式下的 BootLoader 通常都會(huì)向它的終端用戶(hù)提供一個(gè)簡(jiǎn)單的命令行接口。有的 BootLoader 會(huì)先從串口或者網(wǎng)絡(luò)等其他途徑得到內(nèi)核的映像文件,然后把這些文件寫(xiě)入目標(biāo)系統(tǒng)的 FLASH 或者其它存儲(chǔ)介質(zhì),最后再把內(nèi)核載入 RAM 執(zhí)行,交出控制權(quán)。通過(guò)這段程序,可以初始化硬件設(shè)備、建立內(nèi)存空間的映射圖,從而將系統(tǒng)的軟硬件環(huán)境帶到一個(gè)合適的狀態(tài),以便為最終加載操作系統(tǒng)內(nèi)核準(zhǔn)備好正確的環(huán)境。這旱所說(shuō)的跨平臺(tái)編譯器和一般的編譯器功能類(lèi)似,都是把源代碼通過(guò)編譯器編譯成目標(biāo)文件,然后通過(guò)鏈接器、可重定位器程序和定位器把目標(biāo)文件重新定位成 可執(zhí)行文件。由于在目前的主流嵌入 式 ARM( Advanced RISC Machines) 中大多不具有 MMU( Memory Management Unit) ,因此只用 1M 左 右的內(nèi)核就能實(shí)現(xiàn)網(wǎng)絡(luò)功能和任務(wù)調(diào)度 Linux 系統(tǒng)就可以適用于從高端服務(wù)器到嵌入式應(yīng)用的各級(jí)平臺(tái) 。 第五章 總結(jié)與展望 本章總結(jié) 論文結(jié)果 、不足之處以及展望。嵌入式 Linux系統(tǒng)是開(kāi)源的操作系統(tǒng),自身帶有 TCP/ IP協(xié)議,具有強(qiáng)大的網(wǎng)絡(luò)功能,方便用戶(hù)進(jìn)行網(wǎng)絡(luò)編程。如何消除遠(yuǎn)程控制所帶來(lái)的動(dòng)作延遲影響控制精度問(wèn)題。 機(jī)器人問(wèn)世以來(lái) , 在救災(zāi) , 核武器水下探測(cè)等危險(xiǎn)領(lǐng)域機(jī)器人發(fā)揮著越來(lái)越重要的作用 。同時(shí)也能通過(guò) WEB 網(wǎng)頁(yè)控制家里安防設(shè)備和智能家電的工作 , 了解家里設(shè)備工作的情況。家用 3G 智能機(jī)器人項(xiàng)目正是在此背景下設(shè)立的。 關(guān)鍵詞 : 3G, 機(jī)器人,攝像頭, WiFi II 信息科學(xué)與技術(shù)學(xué)院學(xué)士學(xué)位論文 Abstract As things working technologies, 3 G technology, multimedia technology, mechanical and electrical control technology matures, based on the related technical products are also popular with the consumer. In this paper the current robotic technology and embedded technology integration development direction, puts forward a ARM9 and 3 G work based on the bination of intelligent robot. Household 3 G intelligent robot project is just in the context of the establishment. The project is based on ARM S3C2410, GPRS, WEB pages, WiFi, Android mobile robot, can realize realtime monitoring and control the abnormal situation home intelligent home appliance equipment work at home. The user can use android mobile phone or WEB pages by logging on to the Inter security robot server to control of the robot work, such as: robot operation direction, of the camera control, etc. At the same time also can through the WEB page control home security equipment and intelligent home appliance to work,Understand the home work equipment. Robot through the sensors to collect the data such as fire, through the infrared sensor probe whether someone into the scene, when home had abnormal situation robots will through the GPRS module sent text messages to users and alarm sound, at the same time, the robot will be automatic control camera photo evidence. The user can also according to the situation of remote take pictures at home, through the usb key or SD card to read out the photos, and other data. The system has a good realtime and humanputer interaction performance. Will robot control with everyday life technique, along with service robot to thousands of people in the future will be greatly change the pattern of life. Key words: 3G, Robot, Camera, WiFi III 信息科學(xué)與技術(shù)學(xué)院學(xué)士學(xué)位論文 目 錄 摘 要 ..................................................... I Abstract .................................................. II 1 緒論 3G 智能機(jī)器人發(fā)展 ................................... (1) 課題的現(xiàn)實(shí)意義 ...................................... (2) 研究?jī)?nèi)容 ............................................ (2) 論文結(jié)構(gòu) ............................................ (3) 2 嵌 入式 Linux系統(tǒng)結(jié)構(gòu)介紹 嵌入式 Linux 系統(tǒng)軟件平臺(tái) ............................ (4) 嵌入式 Linux 系統(tǒng)硬件結(jié)構(gòu) ........................... (10) 3 3G 智能機(jī)器人的總體設(shè)計(jì) 軟件開(kāi)發(fā)平臺(tái)設(shè)計(jì) ................................... (12) 機(jī)器人控制器硬件設(shè)計(jì) ............................... (13) 遠(yuǎn)程監(jiān)控客戶(hù)端的設(shè)計(jì) ............................... (14) 4 系統(tǒng)詳細(xì)設(shè)計(jì)與實(shí)現(xiàn) boa 服務(wù)器的搭建 ................................... (17) 基于 MJPEGstreamer 的視頻服務(wù)的移植 ................. (20) cgi 和 web 程序的設(shè)計(jì) ............................... (25) IV 信息科學(xué)與技術(shù)學(xué)院學(xué)士學(xué)位論文 機(jī)器人控制端設(shè)計(jì) ................................... (28) LCD 顯示設(shè)計(jì) ....................................... (29) WiFi 端的實(shí)現(xiàn)設(shè)計(jì) .................................. (31) 5 軟件的運(yùn)行測(cè)試 Web 端顯示測(cè)試效果 ................................. (39) LCD 顯示效果測(cè)試 ................................... (44) 手機(jī)端顯示效果測(cè)試 ................................. (44) 6 總結(jié)和展望 論文工作總結(jié) ...................................... (46) 未來(lái)工作展望 .......................................