logo资料库

ROS下Stage仿真器以及TF详解PPT(含例程代码).pdf

第1页 / 共83页
第2页 / 共83页
第3页 / 共83页
第4页 / 共83页
第5页 / 共83页
第6页 / 共83页
第7页 / 共83页
第8页 / 共83页
资料共83页,剩余部分请下载后查看
ROS Stage and TF
Agenda • Stage: • Stage simulator • Reading laser sensor data • Writing a simple walker • TF: • ROS transformation system • Writing a tf broadcaster • Writing a tf listener 2
ROS Stage Simulator • http://wiki.ros.org/simulator_stage • A 2D simulator that provides a virtual world populated by mobile robots, along with various objects for the robots to sense and manipulate 3
Run Stage with an existing world file • Stage is already installed with ROS Indigo • Stage ships with some example world files, including one that puts an Erratic-like robot in a Willow Garage-like environment • To run it with an existing world file rosrun  stage_ros  stageros  `rospack  find  stage_ros`/world/willow-­‐erratic.world • Browsing the stage window should show up 2 little squares: a red square which is a red box and a blue square which is the erratic robot 4
Run Stage with an existing world file • Click on the stage window and press R to see the perspective view. 5
Stage World Files • The world file is a description of the world that Stage must simulate. • It describes robots, sensors, actuators, moveable and immovable objects.  • Sample world files can be found at the /world subdirectory in ros_stage package 6
World File Format • The basic syntactic features of the world file format: comments, entities and properties • The define statement can be used to define new types of entities. • define myrobot position (player() laser() ) • Entities have properties, indicated using name value pairs • myrobot (name "robot1" port 6665 pose [1 1 0]) • This entry creates a position device named "robot1" attached to port 6665, with initial position (1, 1) and orientation of 0 7
Stage World File Example define  block  model   (      size  [0.5  0.5  0.75]      gui_nose  0   )       define  topurg  ranger   (      sensor(          range_max  30.0          fov  270.25          samples  1081      )      #  generic  model  properties      color  "black"      size  [  0.05  0.05  0.1  ]   )       define  pr2  position   (      size  [0.65  0.65  0.25]          origin  [-­‐0.05  0  0  0]      gui_nose  1      drive  "omni"      topurg(pose  [  0.275  0.000  0  0.000  ])   )
分享到:
收藏