Skip to content

Commit

Permalink
Add a BUILD file for drake/examples/Pendulum. This is the first subst…
Browse files Browse the repository at this point in the history
…antive consumer of IPOPT in the Bazel build.
  • Loading branch information
david-german-tri committed Jan 25, 2017
1 parent be2a2fe commit 30366b3
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions drake/examples/Pendulum/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# -*- python -*-
# This file contains rules for Bazel; see drake/doc/bazel.rst.

load("//tools:cpplint.bzl", "cpplint")
load("//tools:drake.bzl", "cc_googletest")

cc_library(
name = "pendulum_state_vector",
srcs = ["gen/pendulum_state_vector.cc"],
hdrs = ["gen/pendulum_state_vector.h"],
linkstatic = 1,
deps = [
"//drake/systems/framework:vector",
],
)

cc_library(
name = "pendulum_plant",
srcs = ["pendulum_plant.cc"],
hdrs = ["pendulum_plant.h"],
deps = [
":pendulum_state_vector",
"//drake/systems/framework",
],
)

cc_library(
name = "pendulum_swing_up",
srcs = ["pendulum_swing_up.cc"],
hdrs = ["pendulum_swing_up.h"],
deps = [
":pendulum_plant",
"//drake/systems/trajectory_optimization:direct_collocation",
],
)

# === test/ ===

cc_googletest(
name = "pendulum_urdf_dynamics_test",
data = ["Pendulum.urdf"],
deps = [
":pendulum_plant",
"//drake/common:eigen_matrix_compare",
"//drake/multibody:rigid_body_tree",
"//drake/multibody/parsers",
"//drake/multibody/rigid_body_plant",
],
)

cc_googletest(
name = "pendulum_dynamic_constraint_test",
deps = [
":pendulum_plant",
"//drake/common:eigen_matrix_compare",
"//drake/systems/trajectory_optimization:direct_collocation",
],
)

cc_googletest(
name = "pendulum_trajectory_optimization_test",
deps = [
":pendulum_swing_up",
"//drake/common:eigen_matrix_compare",
],
)

cpplint()

0 comments on commit 30366b3

Please sign in to comment.