【ROS-Stage】Stage機器人仿真實驗(二)

參考資料

ROS stage_ros 與world 模型的講解
The Stage Robot Simulator
Modules

參考資料翻譯

Stage提供了多種傳感器和執(zhí)行器模型枝秤,包括聲納和紅外測距儀、激光測距儀堪唐、彩色團塊跟蹤写隶、 fiducial tracking记劝、bumpers、抓手和帶有碼盤和GPS定位的移動機器人底座。
(Stage provides several sensor and actuator models, including sonar or infrared rangers, scanning laser rangefinder, color-blob tracking, fiducial tracking, bumpers, grippers and mobile robot bases with odometric or global localization.)

單獨使用robot的用法

USAGE: stage [options] <worldfile1> [worldfile2 ... ]

Available [options] are:

--clock : print simulation time peridically on standard output

-c : equivalent to --clock

--gui : run without a GUI

-g : equivalent to --gui

--help : print this message

--args "str" : define an argument string to be passed to all controllers

-a "str" : equivalent to --args "str"

-h : equivalent to --help"

-? : equivalent to --help

基本模型(model)

UML圖

基本模型模擬了具有基本屬性(位置巴席、大小、顏色诅需、各種傳感器的可見性等)的對象 漾唉。基本模型還有一個由一系列線組成的主體堰塌。 基本模型(model)是其他所有模型的基類赵刑。 可以使用基本模型來模擬環(huán)境對象。
(The basic model simulates an object with basic properties; position, size, color, visibility to various sensors, etc. The basic model also has a body made up of a list of lines. Internally, the basic model is used as the base class for all other model types. You can use the basic model to simulate environmental objects.)

API: Stg::Model

World文件的屬性

    model
    (
    pose [ 0.0 0.0 0.0 0.0 ]
    size [ 0.1 0.1 0.1 ]
    origin [ 0.0 0.0 0.0 0.0 ]

    update_interval 100

    color "red"
    color_rgba [ 0.0 0.0 0.0 1.0 ]
    bitmap ""
    ctrl ""

    # determine how the model appears in various sensors
    fiducial_return 0
    fiducial_key 0
    obstacle_return 1
    ranger_return 1.0
    blob_return 1
    ranger_return 1.0
    gripper_return 0

    # GUI properties
    gui_nose 0
    gui_grid 0
    gui_outline 1
    gui_move 0 (1 if the model has no parents);

    boundary 0
    mass 10.0
    map_resolution 0.1
    say ""
    alwayson 0

    stack_children 1
    )
  • pose [ x:<float> y:<float> z:<float> heading:<float> ]
    在其父坐標(biāo)系中指定模型的姿勢场刑。

  • size [ x:<float> y:<float> z:<float> ]
    指定每個維度中模型的大小般此。

  • origin [ x:<float> y:<float> z:<float> heading:<float> ]
    指定物品中心相對于其姿勢的位置(specify the position of the object's center, relative to its pose)

  • update_interval int(默認(rèn)為100)調(diào)用Model :: Update()(以毫秒為單位)。 控制模型數(shù)據(jù)刷新的頻率。
    ( update_interval int (defaults to 100) The amount of simulated time in milliseconds between calls to Model::Update(). Controls the frequency with which this model's data is generated.)

  • color <string>
    指定物品的顏色(using a color name from the X11 database (rgb.txt))

  • bitmap filename:<string>
    通過解釋位圖中的線條(bmp铐懊,jpeg屎勘,gif,png支持)繪制模型居扒。 該文件被打開并解析為一組線概漱。 這些線被縮放以適合由模型的當(dāng)前大小定義的矩形。

  • ctrl <string>
    指定模型的控制器模塊及其參數(shù)字符串喜喂。 例如瓤摧,字符串“foo bar bash”將加載libfoo.so,它將使用整個字符串調(diào)用其[Init()](http://rtv.github.io/Stage/namespaceStg.html#a42592e46d158bb502087e84a6be606ec)函數(shù) 作為參數(shù)(包括庫名)玉吁。 如果需要參數(shù)照弥,控制器可以解析字符串〗保“

  • fiducial_return fiducial_id:<int>
    如果非零这揣,則該模型由fiducialfinder傳感器檢測。 該值用作基準(zhǔn)ID影斑。(if non-zero, this model is detected by fiducialfinder sensors. The value is used as the fiducial ID.)

  • 如果模型和基準(zhǔn)讀取器的fiducial_key值匹配给赞,則fiducial_key <int>模型僅由fiducialfinders檢測。 這允許您在相同的環(huán)境中具有幾種獨立類型的基準(zhǔn)點矫户,每種類型僅出現(xiàn)在為其“調(diào)整”的基準(zhǔn)點處理器中片迅。(fiducial_key <int> models are only detected by fiducialfinders if the fiducial_key values of model and fiducialfinder match. This allows you to have several independent types of fiducial in the same environment, each type only showing up in fiducialfinders that are "tuned" for it.)

  • obstacle_return <int>
    如果設(shè)置了1,此模型會和其他模型相撞皆辽。(if 1, this model can collide with other models that have this property set)

  • blob_return <int>
    如果為1柑蛇,則可以在blob_finder中檢測此模型(取決于其顏色)(if 1, this model can be detected in the blob_finder (depending on its color))

  • ranger_return <float>
    通過ranger_model傳感器利用該反射率值檢測該模型。 如果是負(fù)的驱闷,該模型對于游俠傳感器是不可見的耻台,并且不會阻擋距離感應(yīng)射線的傳播。 它模擬了理想化的反射傳感器空另,取代了不推薦使用的激光模型的正常/明亮反射率盆耽。 默認(rèn)為1.0。
    (This model is detected with this reflectance value by ranger_model sensors. If negative, this model is invisible to ranger sensors, and does not block propogation of range-sensing rays. This models an idealized reflectance sensor, and replaces the normal/bright reflectance of deprecated laser model. Defaults to 1.0.)

  • gripper_return <int>
    如果為1痹换,該模型可以被夾持器抓住征字,并且可以通過與具有非零障礙物回復(fù)的任何物體的碰撞來推動。
    if 1, this model can be gripped by a gripper and can be pushed around by collisions with anything that has a non-zero obstacle_return.

  • gui_nose <int>
    如果為1娇豫,在顯示其航向的模型上畫一個鼻子(正X軸)
    if 1, draw a nose on the model showing its heading (positive X axis)

  • gui_grid <int>
    如果為1匙姜,則在模型上繪制縮放網(wǎng)格
    if 1, draw a scaling grid over the model

  • gui_outline <int>
    如果為1,則在模型周圍繪制一個邊界框冯痢,指示其大小
    if 1, draw a bounding box around the model, indicating its size

  • gui_move <int>
    如果為1氮昧,則可以在GUI窗口中通過鼠標(biāo)移動模型
    if 1, the model can be moved by the mouse in the GUI window

  • stack_children <int>
    如果非零(默認(rèn)值)框杜,則子模型的坐標(biāo)系在z中偏移,以使其原點位于此模型的top上,從而可以輕松地將模型堆疊在一起。 如果為零骆撇,則子坐標(biāo)系在z中不會偏移培愁,從而可以輕松地在單個局部坐標(biāo)系中定義對象叶圃。
    If non-zero (the default), the coordinate system of child models is offset in z so that its origin is on top of this model, making it easy to stack models together. If zero, the child coordinate system is not offset in z, making it easy to define objects in a single local coordinate system.


最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌专筷,老刑警劉巖,帶你破解...
    沈念sama閱讀 219,539評論 6 508
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件蒸苇,死亡現(xiàn)場離奇詭異磷蛹,居然都是意外死亡,警方通過查閱死者的電腦和手機溪烤,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,594評論 3 396
  • 文/潘曉璐 我一進店門味咳,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人檬嘀,你說我怎么就攤上這事槽驶。” “怎么了枪眉?”我有些...
    開封第一講書人閱讀 165,871評論 0 356
  • 文/不壞的土叔 我叫張陵捺檬,是天一觀的道長。 經(jīng)常有香客問我贸铜,道長,這世上最難降的妖魔是什么聂受? 我笑而不...
    開封第一講書人閱讀 58,963評論 1 295
  • 正文 為了忘掉前任蒿秦,我火速辦了婚禮,結(jié)果婚禮上蛋济,老公的妹妹穿的比我還像新娘棍鳖。我一直安慰自己,他們只是感情好碗旅,可當(dāng)我...
    茶點故事閱讀 67,984評論 6 393
  • 文/花漫 我一把揭開白布渡处。 她就那樣靜靜地躺著,像睡著了一般祟辟。 火紅的嫁衣襯著肌膚如雪医瘫。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,763評論 1 307
  • 那天旧困,我揣著相機與錄音醇份,去河邊找鬼稼锅。 笑死,一個胖子當(dāng)著我的面吹牛僚纷,可吹牛的內(nèi)容都是我干的矩距。 我是一名探鬼主播,決...
    沈念sama閱讀 40,468評論 3 420
  • 文/蒼蘭香墨 我猛地睜開眼怖竭,長吁一口氣:“原來是場噩夢啊……” “哼锥债!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起痊臭,我...
    開封第一講書人閱讀 39,357評論 0 276
  • 序言:老撾萬榮一對情侶失蹤赞弥,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后趣兄,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體绽左,經(jīng)...
    沈念sama閱讀 45,850評論 1 317
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 38,002評論 3 338
  • 正文 我和宋清朗相戀三年艇潭,在試婚紗的時候發(fā)現(xiàn)自己被綠了拼窥。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 40,144評論 1 351
  • 序言:一個原本活蹦亂跳的男人離奇死亡蹋凝,死狀恐怖鲁纠,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情鳍寂,我是刑警寧澤改含,帶...
    沈念sama閱讀 35,823評論 5 346
  • 正文 年R本政府宣布,位于F島的核電站迄汛,受9級特大地震影響捍壤,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜鞍爱,卻給世界環(huán)境...
    茶點故事閱讀 41,483評論 3 331
  • 文/蒙蒙 一鹃觉、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧睹逃,春花似錦盗扇、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,026評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至翼闹,卻和暖如春斑鼻,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背橄碾。 一陣腳步聲響...
    開封第一講書人閱讀 33,150評論 1 272
  • 我被黑心中介騙來泰國打工卵沉, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留颠锉,地道東北人。 一個月前我還...
    沈念sama閱讀 48,415評論 3 373
  • 正文 我出身青樓史汗,卻偏偏與公主長得像琼掠,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子停撞,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 45,092評論 2 355

推薦閱讀更多精彩內(nèi)容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi閱讀 7,336評論 0 10
  • 麗瑗老師周五晚上布置了作業(yè)瓷蛙,周六周日修動中禪,沒有寫作任務(wù)戈毒。竊喜艰猬!就像每天被老師布置作業(yè)的孩子,有一天老師忘了布置...
    豆_59c6閱讀 475評論 0 0
  • 2015年的最后一天食听,照例寫一篇年終總結(jié)。 下筆之前污茵,先看了看去年的年終總結(jié)樱报,有點慚愧,去年沒做完的事情泞当,很多在今...
    蔫小壞閱讀 417評論 0 0
  • 也許在某一個時間迹蛤,某一個地方,心情異常的煩躁襟士,就像這個天氣一樣的沉悶盗飒,看不慣的一切,甚至有一種想要發(fā)火的沖動敌蜂,思緒...
    釉質(zhì)的小朋友閱讀 173評論 0 0
  • 酷飛他爸閱讀 94評論 0 0