## page was renamed from diagnostics/Tutorials/Starting Robot Monitor #################################### ##FILL ME IN #################################### ## links to any required tutorials ## note.0= [[ROS/Tutorials| ROS tutorials]] ## descriptive title for the tutorial ## title = Using the Robot Monitor ## multi-line description to be displayed in search ## description = The Robot Monitor is used to view the aggregated diagnostics of a robot. It's useful to view diagnostics data to diagnose and debug hardware and driver problems. ## the next tutorial description ## next = ## links to next tutorial ## next.0.link= ## next.1.link= ## what level user is this tutorial for ## level= BeginnerCategory #################################### <> <> == Overview == The [[rqt_robot_monitor]] package ([[robot_monitor]] before `Groovy`) is designed to view robot diagnostics data. The `Robot Monitor` tool listens to the analyzed data from the [[diagnostic_aggregator]]. Using Robot Monitor, users can observe, analyze and report problems with hardware, devices or drivers. Robot Monitor is part of the [[pr2_dashboard]]. == Starting the Robot Monitor == === Build === [[ROS/Installation|Install ROS]] on your machine, if you haven't already, then: {{{ $ apt-get install ros-%YOUR_ROS_DISTRO%-rqt-robot-monitor }}} If you're on ROS that's earlier than `Groovy`: {{{ $ rosdep install robot_monitor $ rosmake robot_monitor }}} === Setup and Connection === ==== Setting ROS Master ==== First, make sure your ROS [[Master]] is pointed at the right place. {{{ $ echo $ROS_MASTER_URI }}} should print something like: {{{ http://localhost:11311/ }}} If "localhost" isn't the name of your robot, set your master. {{{ $ export ROS_MASTER_URI=http://COMPUTER_NAME:11311/ }}} ==== Checking Topics ==== You may need to make sure that your robot is properly configured for the Robot Monitor. If you're using a Willow Garage PR2, the robot will already be configured, and you can skip this step. If you're not sure about your robot, use the following procedure to check it. In order to use the Robot Monitor, the robot must have the `diagnostic_aggregator` running. If your robot is a Willow Garage PR2, it will have the aggregation tool running automatically. If you're not sure, check: {{{ $ rostopic list | grep diagnostics }}} If you see "/diagnostics_agg" in the output, the aggregator is running. If you do not see "/diagnostics_agg", you'll have to set up a `diagnostic_aggregator` on the robot. See the [[diagnostics/Tutorials/Configuring Diagnostic Aggregators|Configuring Diagnostic Aggregators]] tutorial for details. == Using the Robot Monitor == After you set your Master, type: {{{ $ rosrun rqt_robot_monitor rqt_robot_monitor $ rosrun robot_monitor robot_monitor ## Ealier than Groovy }}} in the same terminal. The Robot Monitor will start up and display the incoming data from the robot. {{attachment:robot_monitor.png}} In the bottom window, use the tree control to expand or collapse sub items in each category. === Status Viewers === To see an item in more detail, double click, and a viewer will pop up. Multiple views can be used for different items. {{attachment:robot_monitor_viewer.png}} For easy copy-and-pasting, take a "snapshot" of the item. A new window will pop up with the frozen state. When finished with the item, close the viewer. === Rewinding and Playback === Using the timeline at the bottom of the Robot Monitor panel, you can go back to a recent message to view intermittent errors. Simply drag the dial along the timeline. All status viewers will update with the timeline change. When you're using the timeline tool, the Robot Monitor will pause, and won't update. {{attachment:robot_monitor_rewind.png}} To resume "live" viewing, click the "Pause" button. === Detailed Rewinding === Using a Status Viewer, you can rewind and play back a single item at a time. Use the timeline tool in that status viewer to drag to a previous message. For easy copy-and-pasting, take a "snapshot". {{attachment:robot_monitor_viewer_rewind.png}} Press "Pause" to resume live viewing. The snapshot window will stay open until you close it. == Shortcuts == If this is a robot you'll be using often and you use bash, it might be nice to set an alias for that Master. Add the following line to your `~/.bashrc.ros` file: {{{ $ alias NAME='export ROS_MASTER_URI=http://COMPUTER_NAME:11311/' }}} Replace NAME and COMPUTER_NAME with appropriate nickname and computer name of your machines. Some users like to set an alias for the Robot Monitor, too. If you will be using this robot often, it may be nice to set an alias to make start up easier. If you already set up an alias for your computer, it may be nice to to do so for the robot monitor as well. {{{ $ alias viewer='rosrun rqt_robot_monitor rqt_robot_monitor' }}} Now typing: {{{ NAME viewer }}} Will open a Robot Monitor that subscribes to `/diagnostics_agg` from computer "COMPUTER_NAME". ## AUTOGENERATED DO NOT DELETE ## TutorialCategory ## DiagnosticsCategory ## RobotMonitorCategory