ROS进阶学习手记 2 -- RViz工具的学习1

ROS进阶学习手记 2 – RViz工具的学习1

ROS中提供了很多强大的功能,我们学习完前面的基本知识之后要继续进行深入。除了RviZ,还有一种叫 Stage simulator 也能模拟机器人motion

1、认识rviz

  rviz是ROS中一款强大的3D可视化工具,这个玩意在后面可是要频繁用到的,是必须要弄明白的,详细的教程可以参考wiki:http://wiki.ros.org/rviz/UserGuide

    我们可以在里面创建自己的机器人,并且让机器人动起来。还可以创建地图,显示3D点云等等,总之,想在ROS中显示的东东都可以在这里显示出来。当然这些显示都是通过消息的订阅来完成的,机器人通过ROS发布数据,rviz订阅消息接收数据,然后显示,这些数据也是有一定的数据格式的,可以参考下面的链接:

  http://wiki.ros.org/rviz/DisplayTypes
      

  看到上面的机器人了吧,是不是很酷,在rviz中,这样的机器人模型是通过urdf文件描述的,具体urdf文件怎么写,参考wiki:

  http://wiki.ros.org/urdf

================================

2. 开始RViz的学习

       我是从这里开始:http://wiki.ros.org/rviz
           在它之下,先玩这一部分:http://wiki.ros.org/rviz/UserGuide 

   3. RViz的安装和运行
      
  

目录

  1. Troubleshooting
  2. Install or build rviz
    1. Install from debian repository
    2. Build from source
  3. Startup
  4. Displays
    1. Adding a new display
    2. Display Properties
    3. Display Status
    4. Moving Displays
    5. Built-in Display Types
  5. Configurations
    1. 0.4 and above
    2. 0.3 and below
  6. Views Panel
    1. The different camera types
      1. Orbital Camera (default)
      2. FPS (first-person) Camera
      3. Top-down Orthographic
    2. Views
  7. Coordinate Frames
    1. The Fixed Frame
    2. The Target Frame
  8. Tools
    1. Move Camera (Keyboard shortcut: m)
    2. Select (Keyboard shortcut: s)
    3. 2D Nav Goal (Keyboard shortcut: g)
    4. 2D Pose Estimate (Keyboard shortcut: p)
  9. Time
  10. Stereo
  11. Plugins

Troubleshooting

If you’re running into problems and have not seen theanswer below, try theTroubleshooting Page

Install or build rviz

Obviously you don’t need both and should prefer theinstall:

Install from debian repository

Until fuerte:

sudo apt-get installros-fuerte-visualization

From groovy on:

sudo apt-get install ros-groovy-rviz

or

sudo apt-get install ros-hydro-rviz

or

sudo apt-get install ros-indigo-rviz

Build from source

Download the rviz sources into your ros_workspace oryour overlay (help for fuerte,help for groovy).

First satisfy any system dependencies.

rosdep install rviz

Now build the visualizer:

rosmake rviz

Startup

You might have to run a line such as

source /opt/ros/indigo/setup.bash

roscore &

Then start the visualizer:

rosrun rviz rviz

When rviz starts for the first time, you will see anempty window:

The big black thing is the 3D view (empty becausethere is nothing to see). On the left is the Displays list, which will show anydisplays you have loaded. Right now it just contains the global options and thetime view, which I’ll get to later. On the right are some of the other panels,described below.

Displays

A display is something that draws something in the 3Dworld, and likely has some options available in the displays list. An exampleis a point cloud, the robot state, etc.

Adding a new display

To add a display, click the Add button at the bottom:

This will pop up the new display dialog:

更多请看百度文库:http://wenku.baidu.com/view/c4d2d96b9b89680203d825d2

这次主要用UserGuide这个资料介绍了Rviz这个simulator的UI界面分布,包括Display, View, Tool, Time,还有中间最大区域的3D显示引擎。

Published At
comments powered by Disqus