Difference between revisions of "Rviz"

From sdk-wiki
Jump to: navigation, search
(Robot Visualization)
Line 62: Line 62:
 
* Find the ‘Topic’ field under your new Range display, and use the ‘...’ button to open a new window with available Range topics currently being published.
 
* Find the ‘Topic’ field under your new Range display, and use the ‘...’ button to open a new window with available Range topics currently being published.
 
* Select the topic for the left IR sensor, which is under <code>/robot/range/left_hand_range</code>, and hit ‘OK’.
 
* Select the topic for the left IR sensor, which is under <code>/robot/range/left_hand_range</code>, and hit ‘OK’.
 +
 +
=== Baxter Sensors for Visualization ===
 +
 +
==== Cameras ====
 +
* Topic Name: <code>/cameras/${side}_hand_camera/image</code>
 +
* Left Hand: <code>/cameras/left_hand_camera/image</code>
 +
* Right Hand: <code>/cameras/right_hand_camera/image</code>
 +
* Display Type: Image
 +
 +
==== Joint States ====
 +
''via Robot Model'' 
 +
* Topic Name:  <code>/robot/joint_states</code>
 +
* Display Type: Robot Model
 +
* Recommended Options:
 +
* Robot Description: <code>robot_description</code>
 +
 +
''via TF'' 
 +
* Topic Name:  <code>/tf</code>
 +
* Display Type:  TF
 +
* Recommended Options:
 +
* Disable all links starting with prefix /reference/`
 +
 +
==== Sonar (Head) ====
 +
* Topic Name:  <code>/robot/head/sonar/sonar/state</code>
 +
* Display Type: PointCloud
 +
* Recommended Options:
 +
* Color Transformer:  Intensity
 +
* Channel Name:  Distance
 +
 +
==== IR Range Sensors (Hands) ====
 +
* Topic Name:  <code>/robot/range/${side}_hand_range</code>
 +
* Display Type:  Range
 +
  
 
== Troubleshooting ==
 
== Troubleshooting ==
Line 67: Line 100:
  
 
For more information about rviz, see the original documentation for the tool at the [http://ros.org/wiki/rviz ROS wiki]:
 
For more information about rviz, see the original documentation for the tool at the [http://ros.org/wiki/rviz ROS wiki]:
 +
 +
rviz uses Display Types to visualize different types of ROS messages.  This list shows available ROS topics and corresponding Display Types for sensors on Baxter.
 +
 +
For information on viewing these in rviz, see the guide on [[rviz - Basic Use Case#adding-displays|Adding a Sensor Display]].

Revision as of 21:50, 18 May 2014

Rviz 2014.png

Overview


rviz (ROS visualization) is a 3D visualizer for displaying sensor data and state information from ROS. Using rviz, you can visualize Baxter's current configuration on a virtual model of the robot. You can also display live representations of sensor values coming over ROS Topics including camera data, infrared distance measurements, sonar data, and more.

Installation

    $ sudo apt-get update
    $ sudo apt-get install ros-groovy-visualization
    $ sudo apt-get update
    $ sudo apt-get install ros-hydro-visualization


    Usage

    Start rviz from a properly initialized environment using:

    $ rosrun rviz rviz





    Use a 'Fixed Frame' of /world.

    Info: The ‘Fixed Frame’ provides a static, base reference for your visualization. Any sensor data that comes in to rviz will be transformed into that reference frame so it can be properly displayed in the virtual world.

    Robot Visualization

    Add a Robot Model Display

    Select the ‘Add’ button under the Displays sidebar. In the Dialog that pops up, scroll to ‘Robot Model’ (under the ‘Builtin’ category), and then hit ‘OK’ to add a visual representation of the robot’s current pose.

    Note: By default, all the parameters should be set correctly but just in case check the following:

    • Robot Description: robot_description. robot_description is the name of the ros parameter where the URDF is stored on parameter server. (this stores the description of what links and joints are on the robot, and where they connect)</div>
    • TF Prefix: (blank). Change this if you have a tf tree under a different namespace. For example, if you are publishing the robot’s intended pose under the ‘/reference/____’ prefix; or if you have multiple robots, each with their own trees: ‘/baxter1/___’ , ‘/baxter2/___’.
    • Links: The links show the current transform of the robot’s links (i.e. where each link is actually positioned right now). (Optional) Test movement to see the virtual Baxter update

    Adding a Simple Sensor

    Add a Range Display for an IR sensor

    • Add a new ‘Range’ display type, by clicking the ‘Add’ button and finding it under the ‘Builtin’ types.
    • Find the ‘Topic’ field under your new Range display, and use the ‘...’ button to open a new window with available Range topics currently being published.
    • Select the topic for the left IR sensor, which is under /robot/range/left_hand_range, and hit ‘OK’.

    Baxter Sensors for Visualization

    Cameras

    • Topic Name: /cameras/${side}_hand_camera/image
    • Left Hand: /cameras/left_hand_camera/image
    • Right Hand: /cameras/right_hand_camera/image
    • Display Type: Image

    Joint States

    via Robot Model

    • Topic Name: /robot/joint_states
    • Display Type: Robot Model
    • Recommended Options:
    • Robot Description: robot_description

    via TF

    • Topic Name: /tf
    • Display Type: TF
    • Recommended Options:
    • Disable all links starting with prefix /reference/`

    Sonar (Head)

    • Topic Name: /robot/head/sonar/sonar/state
    • Display Type: PointCloud
    • Recommended Options:
    • Color Transformer: Intensity
    • Channel Name: Distance

    IR Range Sensors (Hands)

    • Topic Name: /robot/range/${side}_hand_range
    • Display Type: Range


    Troubleshooting

    For common issues specific to using rviz with Baxter, check out the Troubleshooting page.

    For more information about rviz, see the original documentation for the tool at the ROS wiki:

    rviz uses Display Types to visualize different types of ROS messages. This list shows available ROS topics and corresponding Display Types for sensors on Baxter.

    For information on viewing these in rviz, see the guide on Adding a Sensor Display.