Skip to content

Commit

Permalink
automotive: Remove car_sim_lcm (RobotLocomotion#9474)
Browse files Browse the repository at this point in the history
This demo uses RigidBodyPlant, which is heading for deprecation.  We can
resurrect this demo using MultibodyPlant in the future, if we wish.  The
current code isn't very useful either as a standalone example, or a
reference for doing the Multibody porting, so it's not worth moving into
the attic, either.
  • Loading branch information
jwnimmer-tri authored Sep 20, 2018
1 parent 56049d6 commit e46cda3
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 588 deletions.
24 changes: 0 additions & 24 deletions automotive/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -530,30 +530,6 @@ drake_cc_binary(
],
)

drake_cc_binary(
name = "car_sim_lcm",
srcs = [
"car_sim_lcm.cc",
"car_sim_lcm_common.cc",
"car_sim_lcm_common.h",
],
add_test_rule = 1,
data = [
"//automotive/models:prod_models",
],
test_rule_args = ["--simulation_sec=0.01"],
# Flaky because LCM self-test can fail (PR #7311)
test_rule_flaky = 1,
deps = [
":automotive_simulator",
"//attic/multibody/rigid_body_plant",
"//common:find_resource",
"//common:text_logging_gflags",
"//multibody:rigid_body_tree_construction",
"//systems/controllers:pid_controlled_system",
],
)

drake_py_binary(
name = "steering_command_driver",
srcs = ["steering_command_driver.py"],
Expand Down
38 changes: 0 additions & 38 deletions automotive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,44 +56,6 @@ $ cd drake
$ bazel-bin/automotive/steering_command_driver --mode=one-time --throttle=1.0 --steering-angle=0.4
```

Running the dynamics
--------------------

The following instructions describe how to run `car_sim_lcm` — a
dynamics-based simulation of a sedan that approximates a Toyota Prius. The model
is simplistic; it does not model engine, transmission, or suspension
dynamics, but it is still useful in terms of illustrating Drake's dynamics-based
simulation capability. The model consists of four wheels where the front wheels
are steered using
[Ackermann steering](https://en.wikipedia.org/wiki/Ackermann_steering_geometry)
and the rear wheels are fixed to an axle that spans the width of the
vehicle (they rotate passively). In addition to being steerable, the front
wheels also have velocity-controlled actuators that enable the vehicle to move
forward and backward. PID controllers are used to control both the steering
angle and front wheel rotational velocities. A simple sliding friction model is
used for the contacts between the wheels and the ground. The input reference
values for the PID controllers are settable via LCM using
`lcmt_driving_command_t` messages published on channel "DRIVING_COMMAND". The
current state of the simulation can be visualized in Drake Visualizer.

To run `car_sim_lcm`, open a new terminal and execute the following commands:

```
$ cd drake
$ bazel build automotive:demo automotive:car_sim_lcm
$ bazel-bin/tools/drake_visualizer &
$ bazel-bin/automotive/steering_command_driver &
$ bazel run automotive:car_sim_lcm
```

Then drive the car using the `pygame` window per "Driving the Prius" above.

You can also add a speed bump with a command-line switch:

```
$ bazel run automotive:car_sim_lcm -- --with_speed_bump
```

Enable Chase Cam Mode in the Drake Visualizer
---------------------------------------------

Expand Down
134 changes: 0 additions & 134 deletions automotive/car_sim_lcm.cc

This file was deleted.

Loading

0 comments on commit e46cda3

Please sign in to comment.