## If this Tutorial is part of a multi-step tutorial, link to the other steps
## What does this tutorial teach? What Stacks/Packages/PR2 functionality/etc... does it address? 
## If you're trying to teach them specific API calls, highlight what those are so they can focus on the important parts.
## If this tutorial builds upon code from a previous step, include a link to the necessary code
## Walk the user step-by-step through your tutorial. Include code snippets as appropriate to minimize the user's typing. 
## Make sure that the user can tell which step they are on in case they lose track by providing clear details as to what they should see.
## Make sure that at the end of the tutorial the user can tell that they are done. 
## Is there some command they can run that gives them specific output? 
## Is there a screenshot of what they should see on their screen? 


||<#CCE0FF> '''Note:''' The Test Status Viewer receives information from the Test Manager. See [[../Starting the Test Manager|Starting Test Manager]] for that tutorial. ||

== Starting the Test Viewer ==
'''Description:''' This tutorial shows a user how to start the test viewer, which graphically displays the status of running burn-in tests. The viewer displays output from the Test Manager program.

##BeginnerCategory
##IntermediateCategory
##AdvancedCategory
'''Tutorial Level:''' BEGINNER

== Install and Build ==

You must [[ROS/Installation|install ROS]] before using the status viewer. 

After installing ROS, build the viewer:
{{{
$ rosmake life_test
}}}

Periodically, you may have to update your ROS packages. After you update with svn, rebuild as shown above.

== Using the viewer ==

The viewer will only display data from the Test Manager. Make sure the Test Manager is started before running the viewer.

In order to use the viewer, you'll have to set your ROS master to point the computer that is running the Test Manager. For the Beta lab, it's "cmi". Open a terminal, and type:

{{{
$ export ROS_MASTER_URI=http://cmi:11311
}}}

Now, open the viewer. In the same terminal:
{{{
$ rosrun life_test test_viewer.py
}}}

{{attachment:test_viewer.png}}

The viewer will display the status of all tests that are running, along with their power state, bay, test machine and serial number. After a test is shut down, the viewer will show it as closed.

=== Advanced ===

If you think you'll be using the viewer often, you may want to set up a shortcut to open the viewer and set your ROS Master. 

{{{
$ gedit ~/.bashrc.ros # Open .bashrc.ros file
}}}

Add these lines to your .bashrc file
{{{
alias cmi='export ROS_MASTER_URI=http://cmi:11311'
alias viewer='rosrun life_test test_viewer.py'
}}}

Open a new terminal. When you type:

{{{
$ cmi
$ viewer
}}}
It will set your ROS master to cmi (the test machine), and the viewer will come up.

=== Troubleshooting ===

If you try to open the viewer and see:
{{{
Unable to register with master node [http://localhost:11311/]: master may not be running yet. Will keep trying.
}}}
you have not correctly set your ROS master, or the Test Manager isn't running. Press Ctrl-C, then close the window.

Check that your ROS master is set correctly:
{{{
$ echo $ROS_MASTER_URI
}}}
You should see:
{{{
http://cmi:11311
}}}

If it is set correctly, the Test Manager probably isn't running.



## AUTOGENERATED DO NOT DELETE 
## TutorialCategory
## FILL IN THE STACK TUTORIAL CATEGORY HERE