Drake Tutorial
Search…
Visualize data in LCM
System blocks communicate with opening ports. Data flow from one port to another through LCM pipelines. We could visualize the data.
The order of executing the command matters in this example. Pay attention to following the order here.

Open the visualizer

Ensure that you have installed the drake visualizer with
1
cd drake
2
bazel build //tools:drake_visualizer
3
bazel-bin/tools/drake_visualizer
Copied!

Open LCM data inspector

In another terminal, we open the LCM data inspector by
1
cd drake
2
bazel-bin/lcmtypes/drake-lcm-spy
Copied!

Execute the robot

To visualize data, we need data. Controlling a robot to move is a good way to get data flowing. We start a KUKA arm simulation in another terminal:
1
bazel-bin/examples/kuka_iiwa_arm/kuka_simulation
Copied!
KUKA arm in Drake simulation
Then in another terminal we open up a "planner and runner".
1
bazel-bin/examples/kuka_iiwa_arm/kuka_plan_runner
Copied!
Finally we need to send command to the planner, it will run the KUKA arm.
1
bazel-bin/examples/kuka_iiwa_arm/move_iiwa_ee -x 0.8 -y 0.3 -z 0.25 -yaw 1.57
Copied!
You should see the robot arm moving with the commanding data in the LCM inspector change simultaneously. For more detailed data stream, you can double click on each LCM channel.
The data channels on the left show each joint's control command
The KUKA Manipulation example is here.