# -*- python -*-

load(
    "//tools:drake.bzl",
    "drake_cc_binary",
    "drake_cc_googletest",
    "drake_cc_library",
)
load("//tools/install:install_data.bzl", "install_data")
load("//tools/lint:lint.bzl", "add_lint_tests")
load(
    "@drake//tools/vector_gen:vector_gen.bzl",
    "drake_cc_vector_gen_library",
)

package(default_visibility = ["//visibility:public"])

drake_cc_vector_gen_library(
    name = "rimless_wheel_vector_types",
    srcs = [
        "rimless_wheel_continuous_state.named_vector",
        "rimless_wheel_params.named_vector",
    ],
    visibility = ["//visibility:public"],
)

drake_cc_library(
    name = "rimless_wheel",
    srcs = ["rimless_wheel.cc"],
    hdrs = [
        "rimless_wheel.h",
    ],
    visibility = ["//visibility:public"],
    deps = [
        ":rimless_wheel_vector_types",
        "//common:default_scalars",
        "//common:essential",
        "//systems/framework:leaf_system",
    ],
)

drake_cc_binary(
    name = "simulate",
    srcs = ["simulate.cc"],
    add_test_rule = 1,
    data = ["RimlessWheel.urdf"],
    test_rule_args = ["--target_realtime_rate=0.0"],
    deps = [
        ":rimless_wheel",
        "//attic/multibody/parsers",
        "//attic/multibody/rigid_body_plant:drake_visualizer",
        "//common:find_resource",
        "//lcm",
        "//math:geometric_transform",
        "//multibody:rigid_body_tree",
        "//systems/analysis:simulator",
        "@gflags",
    ],
)

drake_cc_googletest(
    name = "rimless_wheel_test",
    deps = [
        ":rimless_wheel",
        "//systems/analysis:simulator",
        "//systems/framework/test_utilities:scalar_conversion",
    ],
)

install_data()

add_lint_tests()
