The code used in this tutorial is available!

Code can be found at industrial_training repository in doc folder. Use kinetic-devel branch.

Using rqt Tools for Analysis

In this exercise we will use rqt_console, rqt_graph and urdf_to_graphviz to understand behavior of the ROS system.

Motivation

When complicated multi-node ros systems are running it can be important to understand the interactions of nodes.

Information and Resources

Using a catkin workspace

Scan-N-Plan Application: Problem Statement

The Scan-N-Plan application is complete. We would like to further inspect the descartes path planner's relation in our ROS application, the path planner's logic and the resulting plan.

Scan-N-Plan Application: Guidance

rqt_graph: view node interaction

In complex applications, it may be helpful to get a visual representation of the ROS node interactions.

  1. Launch the Scan-N-Plan workcell:
roslaunch myworkcell_support setup.launch 
  1. In a 2nd terminal, launch the rqt_graph:
rqt_graph
  1. Here we can see the basic layout of our Scan-N-Plan application:
  2. In a 3rd terminal, launch the descartes path planner.:
rosrun myworkcell_core myworkcell_node
  1. You must update the graph while the node is running because the graph will not update automatically. After the update, we see our updated ROS network contains out myworkcell_node. Also, The myworkcell_node is publishing a new topic /move_group/goal which is subscribed by the move_group node.

rqt_console: view messages:

Now, we would like to see the output of the path planner. rqt_console is a great gui for viewing ROS topics.

  1. Kill the rqt_graph application in the 2nd terminal and run rqt_console:
rqt_console
  1. Run the path planner:
rosrun myworkcell_core myworkcell_node
  1. The rqt_console automatically updates, showing the logic behind the path planner:

rqt_plot: view data plots

rqt_plot is an easy way to plot ROS data in real time. In this example, we will plot robot joint velocities from our path plan.

  1. Kill the rqt_console application in the 2nd terminal and run rqt_plot:
rqt_plot
  1. In the Topic field add the following topics:
/joint_states/position[0]
/joint_states/position[1]
/joint_states/position[2]
/joint_states/position[3]
/joint_states/position[4]
/joint_states/position[5]
  1. Then run the path planner:
rosrun myworkcell_core myworkcell_node
  1. We can see the joint positions streaming in real-time:

Open Source Feedback

See something that needs improvement? Please open a pull request on this GitHub page