Drake Tutorial
  • Drake Tutorial
  • To get started
  • Introduction
    • Drake Concepts
    • Drake Multibody
    • Drake Simulation
    • Drake Notation
    • Bazel basics
  • Things to do in drake
    • Hello, Drake!
    • Create a URDF/SDF robot
    • Visualize data in LCM
    • Visualize trajectory
    • [WIP] Visualize data
    • [WIP] Control Real KUKA arm
  • Drake Controllers
    • PID control of double pendulum
    • LQR on Cart Pole
    • Inverse Dynamics Control on fully-actuated KUKA arm
    • [WIP] Control a underactuated robot using Inverse Dynamics Controller
  • Drake Optimization
    • [WIP] Trajectory Optimization 1 - Direct Transcription
    • [WIP] Trajectory Optimization 2 - Direct Collocation
    • [WIP] Trajectory Optimization 3 - Shooting method
    • [WIP] Optimal Control 1 - Quadratic Programming
    • [WIP] Optimal Control 2 - Sequential Quadratic Programming
  • Q & A
    • FAQ
    • Use Drake as part of your project
  • Deprecated
    • Create a simple system
Powered by GitBook
On this page
  • Open the visualizer
  • Open LCM data inspector
  • Execute the robot
  • Links

Was this helpful?

  1. Things to do in drake

Visualize data in LCM

PreviousCreate a URDF/SDF robotNextVisualize trajectory

Last updated 4 years ago

Was this helpful?

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

cd drake
bazel build //tools:drake_visualizer
bazel-bin/tools/drake_visualizer

Open LCM data inspector

In another terminal, we open the LCM data inspector by

cd drake
bazel-bin/lcmtypes/drake-lcm-spy

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:

bazel-bin/examples/kuka_iiwa_arm/kuka_simulation

Then in another terminal we open up a "planner and runner".

bazel-bin/examples/kuka_iiwa_arm/kuka_plan_runner

Finally we need to send command to the planner, it will run the KUKA arm.

bazel-bin/examples/kuka_iiwa_arm/move_iiwa_ee -x 0.8 -y 0.3 -z 0.25 -yaw 1.57

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.

Links

The KUKA Manipulation example is .

here
KUKA arm in Drake simulation
The data channels on the left show each joint's control command