load("//tools/lint:lint.bzl", "add_lint_tests")
load("//tools/skylark:drake_cc.bzl", "drake_cc_binary")
load("//tools/skylark:drake_py.bzl", "drake_py_unittest")
load("//tools/workspace/ros_xacro_internal:defs.bzl", "xacro_filegroup")

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

xacro_filegroup(
    name = "StrandbeestModels",
    srcs = [
        "model/StrandbeestBushings.urdf.xacro",
        "model/StrandbeestConstraints.urdf.xacro",
    ],
    data = [
        "model/LegAssembly.xacro",
        "model/LegPair.xacro",
        "model/Macros.xacro",
        "model/Strandbeest.xacro",
    ],
)

drake_cc_binary(
    name = "run_with_motor",
    srcs = ["run_with_motor.cc"],
    data = [":StrandbeestModels"],
    deps = [
        "//common:add_text_logging_gflags",
        "//multibody/inverse_kinematics",
        "//multibody/parsing",
        "//multibody/plant",
        "//multibody/tree",
        "//solvers",
        "//systems/analysis:simulator",
        "//systems/analysis:simulator_gflags",
        "//systems/analysis:simulator_print_stats",
        "//systems/framework:diagram",
        "//visualization:visualization_config_functions",
        "@fmt",
        "@gflags",
    ],
)

drake_py_unittest(
    name = "run_with_motor_test",
    args = select({
        "//tools/cc_toolchain:debug": ["TestEmpty"],
        "//conditions:default": ["TestRunWithMotor"],
    }),
    data = [
        ":run_with_motor",
    ],
)

add_lint_tests()
