【ROS-Stage】Stage机器人仿真实验(二)

参考资料

ROS stage_ros 与world 模型的讲解
The Stage Robot Simulator
Modules

参考资料翻译

Stage提供了多种传感器和执行器模型,包括声纳和红外测距仪、激光测距仪、彩色团块跟踪、 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)是其他所有模型的基类。 可以使用基本模型来模拟环境对象。
(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> ]
    在其父坐标系中指定模型的姿势。

  • 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(默认为100)调用Model :: Update()(以毫秒为单位)。 控制模型数据刷新的频率。
    ( 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支持)绘制模型。 该文件被打开并解析为一组线。 这些线被缩放以适合由模型的当前大小定义的矩形。

  • ctrl <string>
    指定模型的控制器模块及其参数字符串。 例如,字符串“foo bar bash”将加载libfoo.so,它将使用整个字符串调用其[Init()](http://rtv.github.io/Stage/namespaceStg.html#a42592e46d158bb502087e84a6be606ec)函数 作为参数(包括库名)。 如果需要参数,控制器可以解析字符串。“

  • fiducial_return fiducial_id:<int>
    如果非零,则该模型由fiducialfinder传感器检测。 该值用作基准ID。(if non-zero, this model is detected by fiducialfinder sensors. The value is used as the fiducial ID.)

  • 如果模型和基准读取器的fiducial_key值匹配,则fiducial_key <int>模型仅由fiducialfinders检测。 这允许您在相同的环境中具有几种独立类型的基准点,每种类型仅出现在为其“调整”的基准点处理器中。(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>
    如果设置了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传感器利用该反射率值检测该模型。 如果是负的,该模型对于游侠传感器是不可见的,并且不会阻挡距离感应射线的传播。 它模拟了理想化的反射传感器,取代了不推荐使用的激光模型的正常/明亮反射率。 默认为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,该模型可以被夹持器抓住,并且可以通过与具有非零障碍物回复的任何物体的碰撞来推动。
    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,则在模型上绘制缩放网格
    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窗口中通过鼠标移动模型
    if 1, the model can be moved by the mouse in the GUI window

  • stack_children <int>
    如果非零(默认值),则子模型的坐标系在z中偏移,以使其原点位于此模型的top上,从而可以轻松地将模型堆叠在一起。 如果为零,则子坐标系在z中不会偏移,从而可以轻松地在单个局部坐标系中定义对象。
    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.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值