diff --git a/examples/manipulation_station/joint_teleop.py b/examples/manipulation_station/joint_teleop.py index a72425afc018..173abb6b291f 100644 --- a/examples/manipulation_station/joint_teleop.py +++ b/examples/manipulation_station/joint_teleop.py @@ -15,6 +15,16 @@ from pydrake.util.eigen_geometry import Isometry3 +def RenderSystemWithGraphviz(system, output_file="system_view.gz"): + ''' Renders the Drake system (presumably a diagram, + otherwise this graph will be fairly trivial) using + graphviz to a specified file. ''' + from graphviz import Source + string = system.GetGraphvizString() + src = Source(string) + src.render(output_file, view=False) + + builder = DiagramBuilder() station = builder.AddSystem(StationSimulation()) @@ -40,10 +50,16 @@ station.GetOutputPort("pose_bundle")) diagram = builder.Build() +RenderSystemWithGraphviz(diagram) simulator = Simulator(diagram) context = diagram.GetMutableSubsystemContext(station, simulator.get_mutable_context()) +plant = station.get_mutable_multibody_plant() +context_plant = station.GetMutableSubsystemContext(plant, context) +context_plant.FixInputPort( + plant.GetInputPort("cupboard_actuation").get_index(), + np.zeros(2)) q0 = [0, 0.6, 0, -1.75, 0, 1.0, 0] station.SetIiwaPosition(q0, context) diff --git a/examples/manipulation_station/station_simulation.cc b/examples/manipulation_station/station_simulation.cc index 00633c0978bc..a946f30af8e7 100644 --- a/examples/manipulation_station/station_simulation.cc +++ b/examples/manipulation_station/station_simulation.cc @@ -123,9 +123,12 @@ StationSimulation::StationSimulation(double time_step) .GetAsIsometry3()); // Add the Kuka IIWA. +// const std::string iiwa_sdf_path = FindResourceOrThrow( +// "drake/manipulation/models/iiwa_description/" +// "sdf/iiwa14_no_collision.sdf"); + const std::string iiwa_sdf_path = FindResourceOrThrow( - "drake/manipulation/models/iiwa_description/" - "sdf/iiwa14_no_collision.sdf"); + "drake/external/models_robotlocomotion/iiwa7/iiwa7_no_collision.sdf"); iiwa_model_ = AddModelFromSdfFile(iiwa_sdf_path, "iiwa", plant_, scene_graph_); plant_->WeldFrames(plant_->world_frame(), diff --git a/tools/workspace/models_robotlocomotion/package.BUILD.bazel b/tools/workspace/models_robotlocomotion/package.BUILD.bazel index e1eb7551911b..0e1991471f1f 100644 --- a/tools/workspace/models_robotlocomotion/package.BUILD.bazel +++ b/tools/workspace/models_robotlocomotion/package.BUILD.bazel @@ -18,6 +18,6 @@ filegroup( install( name = "install", - docs = ["LICENSE.TXT"], + # docs = ["LICENSE.TXT"], targets = [":models"], )