• 沒有找到結果。

人形機器人之頭部與雙眼視覺系統製作

N/A
N/A
Protected

Academic year: 2021

Share "人形機器人之頭部與雙眼視覺系統製作"

Copied!
8
0
0

加載中.... (立即查看全文)

全文

(1)

行政院國家科學委員會專題研究計畫 成果報告

人形機器人之頭部與雙眼視覺系統製作

計畫類別: 個別型計畫

計畫編號: NSC93-2212-E-011-020-

執行期間: 93 年 08 月 01 日至 94 年 07 月 31 日 執行單位: 國立臺灣科技大學電機工程系

計畫主持人: 許新添

報告類型: 精簡報告

處理方式: 本計畫可公開查詢

中 華 民 國 94 年 8 月 29 日

(2)

行政院國家科學委員會補助專題研究計畫

■ 成 果 報 告

□期中進度報告

人形機器人之頭部與雙眼視覺系統製作

計畫類別:

個別型計畫 □ 整合型計畫 計畫編號:NSC 93-2212-E-011-020

執行期間:

93 年 8 月 1 日至 94 年 7 月 31 日

計畫主持人:許新添教授

成果報告類型(依經費核定清單規定繳交):

精簡報告 □完整報告

本成果報告包括以下應繳交之附件:

□赴國外出差或研習心得報告一份

□赴大陸地區出差或研習心得報告一份

□出席國際學術會議心得報告及發表之論文各一份

□國際合作研究計畫國外研究報告書一份

處理方式:除產學合作研究計畫、提升產業技術及人才培育研究計 畫、列管計畫及下列情形者外,得立即公開查詢

□涉及專利或其他智慧財產權,□一年□二年後可公開查詢

執行單位:國立台灣科技大學 電機系

中 華 民 國 94 年 8 月 29 日

(3)

2

人形機器人之頭部與雙眼視覺系統製作

計畫編號:NSC93-2212-E-011-020 計畫主持人:許新添教授

執行機構:國立台灣科技大學 電機系

執行期間:93 年 8 月 1 日起至 94 年 7 月 31 日止

摘要

人形機器人的發展在世界各地正方興未 艾,目前主要的做法主要在於能使機器人作各種 動作如,上下樓梯、起身躍起或側身起立等偏向 穩定性控制的功能。為了使機器人能做更多擬人 的工作,增加視覺回授的功能應是非走不可的 路。本計劃的目的便在打造一部頭眼視覺機構,

進行取像、定位與追蹤等工作。

本計劃為分年執行的計畫,今年為第一年。

今年將設計與製作一部頭部可上下左右運動且 雙眼也分別具有上下左右運動功能的六軸機 構,並將就此六軸進行定位與運動控制。

除了運動控制外,本計劃亦對所擷取影像進 行檢查,以確保所取得影像品質良好可供後續校 正、轉注與會焦以及三維定位之用。

關鍵詞:人形機器人,視覺回授,頭眼視覺機構,

校正,轉注與會焦,三維定位。

Abstract

Keywords: humanoid robot, vision feedback, eye-head construct, calibration, 3D localization.

Research on humanoid robots has been wide spread all over the world. The state of the art of this research concentrate mostly on a variety of stability and motion control problems inherent in the behaviours such as walking up/down stairs, jump up from lie down situation, or stand up, … etc.. In order to elevate the functionality of humanoid robots, vision feedback and control is an unavoidable capability that must be embedded.

The purpose of this project is to construct an eye-head assembly to do image fetching, 3D localization and tracking.

The project will be run for three years and we are now in the first year. In this year, the main task is to design and construct a six degrees of freedom (DOF) eye-head assembly in which the head is allowed to pitch as well as yaw and the respective eyes are also capable of doing the same motions. In this project, we will test the reset and motion control functions of the assembly, followed by image acquisition to ensure the image quality calibration, “version and vergence” and 3D localization.

一、研究概述

本研究為連續三年的系列性計畫。在第一年 裡,我們的重點放在如何打造一部頭部可上下左 右運動且雙眼也分別具有上下左右運動功能的 六軸機構,並檢測其定位、運動控制與影像擷取 等各項功能以供後續發展之用。

本研究運用 PC-base 的方法處理人形機器 人視覺系統。運動系統部分使用 ADLINK 的運 動控制卡負責伺服機構的運動控制,並以東方馬 達(Oriental Motors)的步進馬達及其驅動器,使 伺服機構驅動平順。

因 本研究 為人形 機器人 視覺 系統初 期研 究,且因國科會補助金額不足所需之半,因此先 以廉價之 CCD (charge-coupled device) 攝影機 為之,並在機構設計時,考慮機構各零件的可更 替性,如果 CCD 性能規格不符需求時,仍可立 即更替為較高規格 CCD。如此做另外還可獲得 若設計錯誤時可隨時更換的好處。例如,在目前 我們只能使用 NTSC 介面的 CCD 攝影機,其影 像處理時間最快為 30fps,加上其它控制時間,

系統整體處理時間將受極大的限制,所以本研究 目前無法做高速追蹤。為了將系統的處理能力提 高,本研究使用了可同時處理四 台 CCD 的 ADLINK 影像擷取卡,每台的處理速度雖仍為

(4)

2 2 2 2 2

1 1

( ) ( )

12 12

Jy= m B +C = ρABC B +C kg m

2 2 2 2 2

1 1

( ) ( )

12 12

Jx= m A +B = ρABC A +B kg m

30fps,但因可並行處理而得以將本研究處理 CCD 攝影機之能力推至極限。另外若需進行高 速追蹤時,可迅速的將 CCD 及影像擷取卡更換 為工業級者以提升其性能。

本研究之系統整體架構包括硬體機構、運動 控制模組以及影像擷取與處理單元等,見圖一所 示。在第一年裡,本研究主要在實現前兩者,分 別敘述如下。

Image acquisition Digital image

processing

Moving target prediction

Trajectory planning Servo mechanism

Input image

Motor driver

圖一系統整體架構

二、硬體機構

本研究硬體機構之實現包括:材質選用、機 構組合設計、轉動慣性問題的處理、軸承設計以 及馬達與旋轉體的固定等。

材質選用的重點為,使機構重量減輕及其強 度符合需求,所以大部分機構皆採取鋁合金(除 底座採用不銹鋼材質編號 SS-400 者外),以降低 轉動慣性,進而得以選用較低一級的馬達以節省 經費。

機構組合設計及其實體圖則見圖二所示。

(a)機構側視圖 (b)機構正視圖

(c)機構實體圖

圖二 人形機器人視覺系統機構圖 在轉動慣性方面,一般立方體旋轉的轉動慣 性大致上可分為:重心偏離軸心與重心位於軸心 等兩類,其轉動慣性的計算方式不同。本研究為 簡化計算,將所有旋轉機構設計成重心置中,所 以轉動慣性依重心置中的公式計算,即:

(1a) (1b)

圖三 重心在中心處的物體轉動慣性 其中:密度 鐵

ρ

=7.9×103

[

kg/m3

]

ρ

=2.8×103

[

kg/m3

]

(5)

4

Jx =x軸的轉動慣性

[

kgm2

]

Jy = y軸的轉動慣性

[

kgm2

]

m =

重量

[ ]

kg

ρ =

密度

[

kg/ m3

]

l

x

= x

軸與重心距離

l

y

= y

軸與重心距離

為了儘可能的減輕轉動負荷及摩擦,本研究 在各轉動部位皆以軸承做為中介,所牽涉的有:

眼球的垂直與水平轉動部份以及頭部的俯仰與 左右等轉動部份。

在眼球的垂直轉動部分,由於滾珠軸承摩擦 係數低,在驅動時較為平順,因此這部份採用滾 珠軸承及馬達直接驅動。至於水平轉動部分,則 考慮到機構的重量,因此將馬達置於物體上方驅 動以減少馬達負荷及摩擦係數,並利用圓錐軸承 將此重量吸收,如圖四所示。

(a) 單眼轉動機構

(b) 單眼水平轉動機構 圖四 眼球部份的實體圖

頭部部份,由於馬達必需置於下方,所以利 用止推軸承將機構重量吸收以減低步進馬達的 負荷,如圖五所示。

(a) 頭部水平轉動機構

(b) 頭部轉動機構 圖五 頭部的實體圖

為了結合馬達與傳動物體,本研究在設計上 利 用 了 一 個 傳 定 結 合 鍵 CNS169 (DIN6885:

1968-08) 平鍵固定,利用螺絲將平鍵頂緊,使 二者緊密固定如圖六所示。

圖六 以傳定結合鍵固定馬達與被傳動物體

三、運動控制模組

運動控制模組包括:馬達與驅動器、運動控 制卡以及馬達加減速規劃等,分述於下。

本研究採用東方馬達五項步進馬達系列,減 速齒輪為 TH 系列,減速齒輪比為 1:20,一圈 步 進 數 為 10000 步 , 所 以 馬 達 解 析 度 為 0.036°/pulse,齒隙小於 0.25°。驅動器部分則有 交流及直流驅動器,前者採用交流五相步進馬達 供較大型馬達驅動頭部轉動之用,後者則用以轉 動眼球旋轉。另外,本系統設置了極限開關以防 止系統誤動作,但因此卻也限制了視野。由於本 系統的極限開關是後來追加,所以整體的控制範

(6)

圍略有差異,其範圍如下:

右眼上下控制範圍:29.772°/23.976°

左眼上下控制範圍:31.86°/25.524°

右眼左右控制範圍:28.044°/23.4°

左眼左右控制範圍:21.672°/31.86°

頭部上下控制範圍:15.696°/14.04°

頭部左右控制範圍:25.02°/31.392°

在運動控制卡的部份,本系統使用 ADLINK 的 PCI-8134 及 PCI-8132 等二種 PCI 運動控制卡,

分別控制眼球及頭部的運動。前者的規格如下:

控制軸數:四軸

最快脈波輸出頻率:2.4Mpps

上下計數範圍:-134,217,728 至 134,217,727 脈波頻率輸出範圍:0~2.4Mpps

外部輸入電源:+24V 及+5V

控制接頭:100-pin SCSI-type connector 極限開關訊號:±EL (End-limit signal) 組/軸 個別單軸控制

I/O 控制訊號端使用光學元件隔離雜訊 提供伺服馬達及步進馬達運動控制 提供線性、梯形及 S 曲線速度控制模式 其中,±EL 代表馬達前進及後退的極限信號。

PCI-8132 除了軸數為二軸外其餘與 PCI-8134 者 同。

整個運動控制的流程如圖七所示。

Initialization Target search and lock

Moving target prediction

Trajectory calculation Image processing

Finish?

no

End yes

圖七 運動控制流程

在系統開始運動之前,必須進行系統定位,

其程序首先將系統移動至最左邊及上方邊緣直 到碰到極限開關(Limit Switch)後,再移動至最右 邊及下方邊緣碰到極限開關後,再將系統定位至 於中心點。

馬達加減速規劃部分,則利用梯形速度法 則,推導出本研究所需的加減速規劃,其速度參 數如下:

總運動時間:

T

加減速度時間:

T

a

運動起始位置:

x

s 運動終點位置:

x

f 運動時最大速度:

v

max

機構可容許最大速度:

V

max

運動時最大加速度:

a

max

機構可容許最大速度:

A

max

其對應的梯形運動曲線,如圖八所示:

(a) 梯形曲線-位移曲線圖

(b) 梯形曲線-速度曲線圖

(c) 梯形曲線-加速度曲線圖 圖八 馬達加減速梯形曲線

(7)

6

max tal

a

v X

T T

= −

根據馬達加減速的梯形曲線可得總位移

2 max

max 2

max )( )

) ( (

2 ] 1 ) [(

) 2( 1

a a

a a a

a

tal T T T

T T T v v T T T T T

X v

+

+

=

(3) (2)

因此Xtal =(TTa)vmax

由於運動時只有運動距離已知,所以還須進 ㄧ步推導出最高速度及加速度,使機構不會因速 度或加速度過快而造成失速,因此

最高速度值:

(3a)

(4)

最高加速度值:

(3b)

(5) 梯形速度曲線的各項參數方程式如下:

位置項:

2 max

1 2

) 1

(t a t

f = 0

t < T

a (6a)

) ( )

( max

2 t v t Ta

f = −

a

a

t T T

T ≤ < −

(6b)

2 max

3 ( )

2 ) 1

(t a t T

f =

TT

a

t < T

(6c)

速度項:

1 max

f (t)& =a t

T

a

t <

0 (7a)

2(t) vmax .

f =

T

a

t < TT

a (7b)

) max(

3(t) a T t

.

f =

TT

a

t < T

(7c)

加速度項:

1(t) amax ..

f = 0

t < T

a (8a)

2 0 f (t)=

&&

a

a

t T T

T ≤ < −

(8b)

3(t) amax ..

f =

TT

a

t < T

(8c)

由於本研究利用軌跡預測方法以預測動態 目標的移動位置及移動時間,也就是假設下一個 位 置 及 時 間 已 知 。 因 此 可 利 用 (3) 式 , 使 得

max

max

V

v <

以及amax <Amax,並求出T a 值,

因此

) (X Vmax T

Ta = − tal × (9a)

max max

A

Ta =V (9b)

選(9a)及(9b)中的最大者即可使運動軌跡合 乎加減速的需求。本系統因牽涉影像擷取效果,

所以在本研究中將運動軌跡初速及終點速度假 設為零,以防止影像擷取時抖動。

四、結論與未來研究

本系統在機構方面需較高精密度,所以製作 及設計費時甚多,並且於測試時為符合需求曾進 行數次修改,並反覆的進行測試,目前已完成機 構的設計、組裝與測試。

本計劃所研製的六軸人形機器人伺服機構 及其控制系統除資料處理量多外,尚需三個不同 系統的控制卡(RTV-24 影像擷取卡、PCI-8132 運 動控制卡、PCI-8134 運動控制卡)的互相配合且 須即時控制(real time control),因此程式的撰寫 有相當程度的複雜性。本研究在執行中是以執行 緒(thread)撰寫,經過不斷的測試與偵錯後,目 前伺服機構控制已完全符合本研究所設定的需 求。

人形機器人的研究到目前為止,伺服機構及 其控制系統已經完成,後續數年將陸續處理移動 目標搜尋、3D 定位、移動目標預測、運動中伺 服機構與影像擷取之影響等研究。

參考文獻

[1] B. Tondu and S.A. Bazaz, “The three-cubic method: An optimal online robot joint trajectory generator under velocity, acceleration, and wandering constraints”, The International Journal of Robotics Research, vol. 18, pp.

893-901, 4 Sep. 1999。

[2] J. Batista, P. Peixoto and H. Araujo,“Real-time vergence and binocular gaze control”, Intelligent Robots and Systems, 1997. IROS '97. , Proceedings of the 1997 IEEE/RSJ International Conference on, vol. 3, pp. 1348-1354, 7-11 Sep.

1997。

[3] W. Yuan, J.L. Semmlow and P. Munoz,

“Dynamics of the disparity vergence step response: a model-based analysis”, Biomedical Engineering, IEEE Transactions on, vol. 46, pp.

1191-1198, Oct 1999 。

[4] A. Bernardino and J. Santos-Victor,“Vergence control for robotic heads using log-polar images”, Intelligent Robots and Systems '96,

max

max ( )

tal

a a a

v X

a = T = T T T

(8)

IROS 96, Proceedings of the 1996 IEEE/RSJ International Conference on, vol. 3, pp.

1264-1271,4-8 Nov. 1996。

[5] C. Capurro, F. Panerai and G. Sandini,

“Dynamic vergence”, Intelligent Robots and Systems '96, IROS 96, Proceedings of the 1996 IEEE/RSJ International Conference on, vol. 3, pp. 1241-1248, 4-8 Nov. 1996。

[6] C. Capurro, F. Panerai and G.

Sandini,“Vergence and tracking fusing log-polar images”, Pattern Recognition, 1996., Proceedings of the 13th International Conference on, vol. 4, pp. 740-744, 25-29 Aug.

1996。

[7] W.-S. Ching, P.-S. Toh, K.-L. Chan and M.-H.

Er, “Robust vergence with concurrent detection of occlusion and specular highlights”, Computer Vision, 1993. Proceedings., Fourth International Conference on, pp. 384-394, 11-14 May 1993。

[8] A. Francisco, “Relative depth from vergence micromovements”, Computer Vision, 1993.

Proceedings, Fourth International Conference on, pp. 481-486, 11-14 May 1993。

[9] H.-J. Kim , M.-H. Yoo and S.-W. Lee, “A control model for vergence movement on a stereo robotic head using disparity flux”, Pattern Recognition, 2000. Proceedings. 15th International Conference on, vol. 4, pp. 491-494, Sep. 2000。

[10] H. Moravec and A. Elfes, “High resolution maps from wide angle sonar”, Robotics and Automation. Proceedings. 1985 IEEE International Conference on, pp. 116-121, Mar 1985。

[11] K. Pahlavan, T. Uhlin and J.-O. Eklundh,

“Dynamic fixation [active vision]”, Computer Vision, 1993. Proceedings., Fourth International Conference on , pp. 412-419, 11-14 May 1993。

[12] J. Taylor, T. Olson and W.N. Martin,

“Accurate vergence control in complex scenes” , Computer Vision and Pattern Recognition, 1994.

Proceedings CVPR '94., 1994 IEEE Computer Society Conference on, pp. 540-545, 21-23 Jun 1994 。

[13] C. Thorpe, L. Matthies and H. Moravec,

“Experiments and thoughts on visual navigation”, Robotics and Automation.

Proceedings. 1985 IEEE International Conference on, pp. 830- 835, Mar 1985。

[14] Y. Weihong, J.L. Semmlow, T.L. Alvarez and P. Munoz, “A minimal model to simulate dynamics of initial vergence component”, Bioengineering Conference, 1997., Proceedings of the IEEE 1997 23rd Northeast, pp. 52 -53, 21-22 May 1997。

[15] W. Yuan, J.L. Semmlow and P. Munoz, “The influence of prediction on vergence eye movements”, Bioengineering Conference, 1998.

Proceedings of the IEEE 24th Annual Northeast , pp. 56 -57, 9-10 April 1998。

[16] 東方馬達,綜合目錄,目錄 C,2004/2005。

[17] ADLINK, RTV Seriers User’s Manual, ADLINK CO., Taipei, 2004。

[18] ADLINK, PCI-8134 User’s Guide, ADLINK CO., Taipei, 2004。

[19] ADLINK, PCI-8132 User’s Guide, ADLINK CO., Taipei, 2000。

計畫成果自評

本計劃成功的研製了一部人形機器人的伺服機 構及其控制系統,其功能已將所用硬體的性能推 到極限並在同時避免了影像擷取的抖動,甚具學 術與應用的價值,目前正積極整理資料準備開展 下一階段的移動目標搜尋、3D 定位、移動目標 預測等。

參考文獻

相關文件

[16] Goto, M., Muraoka, Y., “A real-time beat tracking system for audio signals,” In Proceedings of the International Computer Music Conference, Computer Music.. and Muraoka, Y.,

Godsill, “Detection of abrupt spectral changes using support vector machines: an application to audio signal segmentation,” Proceedings of the IEEE International Conference

Shih and W.-C.Wang “A 3D Model Retrieval Approach based on The Principal Plane Descriptor” , Proceedings of The 10 Second International Conference on Innovative

D.Wilcox, “A hidden Markov model framework for video segmentation using audio and image features,” in Proceedings of the 1998 IEEE Internation Conference on Acoustics, Speech,

[16] Goto, M., “A Robust Predominant-F0 Estimation Method for Real-time Detection of Melody and Bass Lines in CD Recordings,” Proceedings of the 2000 IEEE International Conference

Harma, “Automatic identification of bird species based on sinusoidal modeling of syllables,” in Proceedings of IEEE International Conference on Acoustics, Speech,

Kalker, “Speed-Change Resistant Audio Fingerprinting Using Auto-Correlation,” in IEEE International Conference on Acoustics, Speech, and Signal Processing, vol. Kalker,

Chen, “Adjustable gamma correction circuit for TFT LCD,” IEEE International Symposium on Circuits and Systems, vol. Kan, “Implementation of the Gamma (γ) Line System Similar