Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change robot model to iiwa7, fix cupboard input to zero, fix install error #35

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions examples/manipulation_station/joint_teleop.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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)
Expand Down
7 changes: 5 additions & 2 deletions examples/manipulation_station/station_simulation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,12 @@ StationSimulation<T>::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(),
Expand Down
2 changes: 1 addition & 1 deletion tools/workspace/models_robotlocomotion/package.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ filegroup(

install(
name = "install",
docs = ["LICENSE.TXT"],
# docs = ["LICENSE.TXT"],
targets = [":models"],
)