參考資料
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)
基本模型模擬了具有基本屬性(位置巴席、大小、顏色诅需、各種傳感器的可見性等)的對象 漾唉。基本模型還有一個由一系列線組成的主體堰塌。 基本模型(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 modelgui_outline <int>
如果為1,則在模型周圍繪制一個邊界框冯痢,指示其大小
if 1, draw a bounding box around the model, indicating its sizegui_move <int>
如果為1氮昧,則可以在GUI窗口中通過鼠標(biāo)移動模型
if 1, the model can be moved by the mouse in the GUI windowstack_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.