repo_id
stringclasses
205 values
file_path
stringlengths
33
141
content
stringlengths
1
307k
__index_level_0__
int64
0
0
/home/johnshepherd/drake/examples/hydroelastic
/home/johnshepherd/drake/examples/hydroelastic/python_ball_paddle/contact_sim_demo.py
""" This is an example for using hydroelastic contact model through pydrake. It reads two simple SDFormat files of a compliant hydroelastic ball and a compliant hydroelastic paddle. The ball is dropped on an edge of the paddle and bounces off. """ import argparse import numpy as np from pydrake.math import RigidTransf...
0
/home/johnshepherd/drake/examples/hydroelastic
/home/johnshepherd/drake/examples/hydroelastic/ball_plate/make_ball_plate_plant.cc
#include "drake/examples/hydroelastic/ball_plate/make_ball_plate_plant.h" #include <string> #include <utility> #include "drake/geometry/proximity_properties.h" #include "drake/multibody/parsing/parser.h" #include "drake/multibody/tree/multibody_tree_indexes.h" #include "drake/multibody/tree/uniform_gravity_field_elem...
0
/home/johnshepherd/drake/examples/hydroelastic
/home/johnshepherd/drake/examples/hydroelastic/ball_plate/ball_plate_run_dynamics.cc
#include <memory> #include <gflags/gflags.h> #include "drake/common/drake_assert.h" #include "drake/examples/hydroelastic/ball_plate/make_ball_plate_plant.h" #include "drake/geometry/scene_graph.h" #include "drake/multibody/plant/multibody_plant_config.h" #include "drake/multibody/plant/multibody_plant_config_functio...
0
/home/johnshepherd/drake/examples/hydroelastic
/home/johnshepherd/drake/examples/hydroelastic/ball_plate/make_ball_plate_plant.h
#pragma once #include <memory> #include "drake/geometry/scene_graph.h" #include "drake/multibody/plant/multibody_plant.h" namespace drake { namespace examples { namespace ball_plate { /** This function modifies a MultibodyPlant by adding a ball falling on a dinner plate. The plate and floor are read from sdf files...
0
/home/johnshepherd/drake/examples/hydroelastic
/home/johnshepherd/drake/examples/hydroelastic/ball_plate/BUILD.bazel
load("//tools/lint:lint.bzl", "add_lint_tests") load( "//tools/skylark:drake_cc.bzl", "drake_cc_binary", "drake_cc_library", ) package(default_visibility = ["//visibility:private"]) filegroup( name = "models", srcs = [ "floor.sdf", ], visibility = ["//:__pkg__"], ) drake_cc_librar...
0
/home/johnshepherd/drake/examples/hydroelastic
/home/johnshepherd/drake/examples/hydroelastic/ball_plate/floor.sdf
<?xml version="1.0"?> <sdf version="1.7"> <model name="Floor"> <!-- We use a 30x30x5-cm rectangular block to represent the compliant floor on which the dinner plate is placed. We set the hydroelastic modulus of the floor to be rather small to showcase the contact surface from the substantial penet...
0
/home/johnshepherd/drake/examples/hydroelastic
/home/johnshepherd/drake/examples/hydroelastic/ball_plate/README.md
<h1>Rolling ball on a dinner plate on a floor</h1> This is an example for using hydroelastic contact model with a non-convex geometry loaded from an SDFormat file of a dinner plate. The ball, the plate, and the floor are compliant, rigid, and compliant hydroelastic. The plate-ball, ball-floor, and plate-floor contacts...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/allegro_hand/allegro_lcm.h
#pragma once /// @file /// This file contains classes dealing with sending/receiving LCM messages /// related to the allegro hand. #include <memory> #include <utility> #include <vector> #include "drake/common/drake_copyable.h" #include "drake/common/eigen_types.h" #include "drake/examples/allegro_hand/allegro_common...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/allegro_hand/BUILD.bazel
load("//tools/lint:lint.bzl", "add_lint_tests") load( "//tools/skylark:drake_cc.bzl", "drake_cc_binary", "drake_cc_googletest", "drake_cc_library", ) package(default_visibility = ["//visibility:private"]) drake_cc_library( name = "allegro_common", srcs = ["allegro_common.cc"], hdrs = ["all...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/allegro_hand/allegro_common.cc
#include "drake/examples/allegro_hand/allegro_common.h" #include <iostream> namespace drake { namespace examples { namespace allegro_hand { const double AllegroHandMotionState::velocity_thresh_ = 0.07; using drake::multibody::JointIndex; using drake::multibody::MultibodyPlant; void SetPositionControlledGains(doubl...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/allegro_hand/run_allegro_constant_load_demo.cc
/// @file /// /// This demo sets up a simple dynamic simulation for the Allegro hand using /// the multi-body library. A single, constant torque is applied to all joints /// and defined by a command-line parameter. This demo also allows to specify /// whether the right or left hand is simulated. #include <gflags/gflag...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/allegro_hand/allegro_common.h
#pragma once #include <map> #include <string> #include <vector> #include "drake/common/drake_copyable.h" #include "drake/common/eigen_types.h" #include "drake/lcmt_allegro_status.hpp" #include "drake/multibody/plant/multibody_plant.h" namespace drake { namespace examples { namespace allegro_hand { constexpr int kAl...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/allegro_hand/allegro_lcm.cc
#include "drake/examples/allegro_hand/allegro_lcm.h" #include <utility> #include <vector> #include "drake/common/drake_assert.h" namespace drake { namespace examples { namespace allegro_hand { using systems::BasicVector; using systems::Context; using systems::DiscreteValues; using systems::DiscreteUpdateEvent; All...
0
/home/johnshepherd/drake/examples/allegro_hand
/home/johnshepherd/drake/examples/allegro_hand/joint_control/run_twisting_mug.cc
/// @file /// /// This file set up an example about control the allegro hand based on /// position. In the program, the hand firstly grasps on a mug, and then twsits /// it repeatedly. The program presently only runs on simulation, with the file /// allegro_single_object_simulation.cc which creates the simulation envir...
0
/home/johnshepherd/drake/examples/allegro_hand
/home/johnshepherd/drake/examples/allegro_hand/joint_control/BUILD.bazel
load("//tools/lint:lint.bzl", "add_lint_tests") load( "//tools/skylark:drake_cc.bzl", "drake_cc_binary", "drake_cc_googletest", "drake_cc_library", ) load( "//tools/skylark:drake_py.bzl", "drake_py_unittest", ) package(default_visibility = ["//visibility:private"]) drake_cc_binary( name = ...
0
/home/johnshepherd/drake/examples/allegro_hand
/home/johnshepherd/drake/examples/allegro_hand/joint_control/README.md
# Allegro Hand - Joint Control Example The following shows a simple multiprocess setup where a simulation is run in one process, and a simple open-loop finger-gaiting controller is run in another process. No time synchronization is performed between the controller and the simulator, so real-time rates may affect the r...
0
/home/johnshepherd/drake/examples/allegro_hand
/home/johnshepherd/drake/examples/allegro_hand/joint_control/simple_mug.sdf
<?xml version="1.0"?> <sdf version="1.7"> <model name="simple_mug"> <link name="simple_mug"> <inertial> <pose>0.01 0 0.05 0 0 0</pose> <mass>0.094</mass> <inertia> <ixx>0.000156</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>0.000156</iyy> <iyz...
0
/home/johnshepherd/drake/examples/allegro_hand
/home/johnshepherd/drake/examples/allegro_hand/joint_control/allegro_single_object_simulation.cc
/// @file /// /// This file set up a simulation environment of an allegro hand and an object. /// The system is designed for position control of the hand, with a PID /// controller to control the output torque. The system communicate with the /// external program through LCM system, with a publisher to publish the /// ...
0
/home/johnshepherd/drake/examples/allegro_hand/joint_control
/home/johnshepherd/drake/examples/allegro_hand/joint_control/test/run_twisting_mug_test.py
"""Simple regression test that the twisting_mug demo can perform at least one twist. """ import hashlib import os import subprocess import sys import time import unittest from python.runfiles import Create as CreateRunfiles def _unique_lcm_url(path): """Returns a unique LCM url given a path.""" rand = [int(...
0
/home/johnshepherd/drake/examples/allegro_hand
/home/johnshepherd/drake/examples/allegro_hand/test/allegro_lcm_test.cc
#include "drake/examples/allegro_hand/allegro_lcm.h" #include <Eigen/Dense> #include <gtest/gtest.h> #include "drake/common/test_utilities/eigen_matrix_compare.h" #include "drake/examples/allegro_hand/allegro_common.h" #include "drake/lcmt_allegro_command.hpp" #include "drake/lcmt_allegro_status.hpp" #include "drake/...
0
/home/johnshepherd/drake/examples/allegro_hand
/home/johnshepherd/drake/examples/allegro_hand/test/parse_test.cc
#include <string> #include <fmt/format.h> #include <gtest/gtest.h> #include "drake/common/find_resource.h" #include "drake/multibody/parsing/parser.h" #include "drake/multibody/plant/multibody_plant.h" namespace drake { namespace manipulation { namespace { using multibody::ModelInstanceIndex; using multibody::Multi...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/planar_gripper/planar_gripper.sdf
<?xml version="1.0"?> <!-- =================================================================================== --> <!-- | This document was autogenerated by xacro from planar_gripper.xacro | --> <!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | --> <!-- ==============...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/planar_gripper/planar_brick.sdf
<?xml version="1.0"?> <sdf version="1.7"> <model name="brick"> <link name="brick_base"/> <link name="brick_dummy_link1"> <inertial> <mass>1e-10</mass> <inertia> <ixx>1e-10</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>1e-10</iyy> <iyz>0</iyz> ...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/planar_gripper/planar_gripper.xacro
<?xml version="1.0"?> <sdf xmlns:xacro="http://www.ros.org/wiki/xacro" version="1.7"> <model name="planar_gripper"> <!-- Link mass and inertia values are guesses (currently), calculated using a uniform rod model, rotating about its center of mass. --> <xacro:property name="base_dim" value=".08"/> ...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/planar_gripper/brick_static_equilibrium_constraint.h
#pragma once #include <utility> #include <vector> #include "drake/examples/planar_gripper/gripper_brick.h" #include "drake/multibody/plant/multibody_plant.h" #include "drake/solvers/constraint.h" #include "drake/solvers/mathematical_program.h" namespace drake { namespace examples { namespace planar_gripper { /** Giv...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/planar_gripper/run_planar_gripper_trajectory_publisher.cc
/// @file /// /// Implements a trajectory publisher for the planar gripper simulation by /// interpolating a sequence of joint poses (keyframes) for the fingers, where /// each keyframe represents a static-equilibrium condition for the brick (i.e., /// the net wrench on the brick is zero). This publisher communicates w...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/planar_gripper/planar_gripper_common.h
#pragma once #include <map> #include <string> #include <utility> #include "drake/multibody/plant/multibody_plant.h" namespace drake { namespace examples { namespace planar_gripper { using drake::multibody::MultibodyPlant; using Eigen::Vector3d; constexpr int kNumFingers = 3; constexpr int kNumJoints = kNumFingers ...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/planar_gripper/BUILD.bazel
load("//tools/install:install.bzl", "install") load("//tools/install:install_data.bzl", "install_data") load("//tools/lint:lint.bzl", "add_lint_tests") load( "//tools/skylark:drake_cc.bzl", "drake_cc_binary", "drake_cc_googletest", "drake_cc_library", ) load("//tools/skylark:drake_data.bzl", "models_fil...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/planar_gripper/brick_static_equilibrium_constraint.cc
#include "drake/examples/planar_gripper/brick_static_equilibrium_constraint.h" #include <memory> #include "drake/examples/planar_gripper/gripper_brick_planning_constraint_helper.h" #include "drake/math/autodiff.h" #include "drake/math/autodiff_gradient.h" #include "drake/multibody/inverse_kinematics/kinematic_evaluat...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/planar_gripper/planar_gripper_simulation.cc
/// @file /// /// This demo simulates a planar-gripper (three two-degree-of-freedom fingers /// moving in a plane) which reorients a brick through contact-interactions. /// /// This simulation can be configured to run in one of two control modes: /// position control or torque control. In position control mode, desired...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/planar_gripper/planar_manipuland_lcm.h
#pragma once /// @file /// This file contains classes dealing with sending/receiving /// LCM messages related to the planar manipuland. #include "drake/common/drake_copyable.h" #include "drake/common/eigen_types.h" #include "drake/lcmt_planar_manipuland_status.hpp" #include "drake/systems/framework/event_status.h" #i...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/planar_gripper/README.md
# Planar Gripper Example This directory contains an example for simulating a planar-gripper (three two-degree-of-freedom fingers moving in a plane) which reorients a brick through contact interactions. ## Prerequisites All instructions assume that you are launching from the `drake` workspace directory. ``` cd drake ...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/planar_gripper/planar_gripper_lcm.cc
#include "drake/examples/planar_gripper/planar_gripper_lcm.h" #include <vector> #include "drake/common/drake_assert.h" #include "drake/lcmt_planar_gripper_command.hpp" #include "drake/lcmt_planar_gripper_status.hpp" namespace drake { namespace examples { namespace planar_gripper { using systems::BasicVector; using ...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/planar_gripper/gripper_brick.cc
#include "drake/examples/planar_gripper/gripper_brick.h" #include "drake/examples/planar_gripper/planar_gripper_common.h" #include "drake/geometry/drake_visualizer.h" #include "drake/multibody/parsing/parser.h" #include "drake/systems/analysis/simulator.h" #include "drake/systems/framework/diagram_builder.h" namespac...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/planar_gripper/gripper_brick.h
#pragma once #include <array> #include <memory> #include <string> #include "drake/geometry/scene_graph.h" #include "drake/multibody/plant/multibody_plant.h" #include "drake/systems/framework/diagram.h" namespace drake { namespace examples { namespace planar_gripper { enum class Finger { kFinger1, kFinger2, kF...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/planar_gripper/planar_gripper_common.cc
#include "drake/examples/planar_gripper/planar_gripper_common.h" #include <fstream> #include <map> #include <string> #include <utility> #include <vector> #include "drake/common/drake_assert.h" #include "drake/common/find_resource.h" #include "drake/multibody/plant/multibody_plant.h" namespace drake { namespace examp...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/planar_gripper/gripper_brick_planning_constraint_helper.h
#pragma once #include "drake/examples/planar_gripper/gripper_brick.h" #include "drake/solvers/mathematical_program.h" /// @file /// This file contains the utility function to add constraint in gripper/brick /// motion planning. namespace drake { namespace examples { namespace planar_gripper { /** * Adds the frictio...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/planar_gripper/gripper_brick_planning_constraint_helper.cc
#include "drake/examples/planar_gripper/gripper_brick_planning_constraint_helper.h" #include <limits> #include <memory> #include "drake/math/autodiff_gradient.h" #include "drake/multibody/inverse_kinematics/kinematic_evaluator_utilities.h" #include "drake/multibody/inverse_kinematics/position_constraint.h" namespace...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/planar_gripper/planar_gripper_lcm.h
#pragma once /// @file /// This file contains classes dealing with sending/receiving /// LCM messages related to the planar gripper. /// TODO(rcory) Create doxygen system diagrams for the classes below. /// /// All (q, v) state vectors in this file are of the format /// (joint_positions, joint_velocities). #include <...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/planar_gripper/postures.txt
finger1_BaseJoint finger3_BaseJoint finger2_BaseJoint brick_translate_y_joint finger1_MidJoint finger3_MidJoint finger2_MidJoint brick_translate_z_joint brick_revolute_x_joint -0.277611 0.947974 0.281503 0.00731802 -0.0613293 -1.21373 0.201025 -0.0197339 -0.454859 -0.269673 0.910182 0.405141 0.0309428 -0...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/planar_gripper/planar_manipuland_lcm.cc
#include "drake/examples/planar_gripper/planar_manipuland_lcm.h" namespace drake { namespace examples { namespace planar_gripper { PlanarManipulandStatusDecoder::PlanarManipulandStatusDecoder() { this->DeclareVectorOutputPort(systems::kUseDefaultName, 6, &PlanarManipulandStatusDecoder...
0
/home/johnshepherd/drake/examples/planar_gripper
/home/johnshepherd/drake/examples/planar_gripper/test/gripper_brick_test.cc
#include "drake/examples/planar_gripper/gripper_brick.h" #include <gtest/gtest.h> #include "drake/common/test_utilities/eigen_matrix_compare.h" namespace drake { namespace examples { namespace planar_gripper { GTEST_TEST(GripperBrickHelperTest, Test) { GripperBrickHelper<double> dut; EXPECT_TRUE(CompareMatrices(...
0
/home/johnshepherd/drake/examples/planar_gripper
/home/johnshepherd/drake/examples/planar_gripper/test/gripper_brick_planning_constraint_helper_test.cc
#include "drake/examples/planar_gripper/gripper_brick_planning_constraint_helper.h" #include <gtest/gtest.h> #include "drake/solvers/solve.h" namespace drake { namespace examples { namespace planar_gripper { GTEST_TEST(AddFrictionConeConstraintTest, Test) { GripperBrickHelper<double> gripper_brick; solvers::Math...
0
/home/johnshepherd/drake/examples/planar_gripper
/home/johnshepherd/drake/examples/planar_gripper/test/planar_manipuland_lcm_test.cc
#include "drake/examples/planar_gripper/planar_manipuland_lcm.h" #include <gtest/gtest.h> #include "drake/systems/framework/diagram.h" #include "drake/systems/framework/diagram_builder.h" namespace drake { namespace examples { namespace planar_gripper { GTEST_TEST(PlanarManipulandLcmTest, PlanarManipulandStatusPasst...
0
/home/johnshepherd/drake/examples/planar_gripper
/home/johnshepherd/drake/examples/planar_gripper/test/planar_gripper_common_test.cc
#include "drake/examples/planar_gripper/planar_gripper_common.h" #include <gtest/gtest.h> #include "drake/common/find_resource.h" #include "drake/common/test_utilities/eigen_matrix_compare.h" #include "drake/multibody/parsing/parser.h" #include "drake/multibody/plant/multibody_plant.h" namespace drake { namespace ex...
0
/home/johnshepherd/drake/examples/planar_gripper
/home/johnshepherd/drake/examples/planar_gripper/test/planar_gripper_lcm_test.cc
#include "drake/examples/planar_gripper/planar_gripper_lcm.h" #include <gtest/gtest.h> #include "drake/lcmt_planar_gripper_command.hpp" #include "drake/lcmt_planar_gripper_status.hpp" #include "drake/systems/framework/context.h" #include "drake/systems/framework/diagram.h" #include "drake/systems/framework/diagram_bu...
0
/home/johnshepherd/drake/examples/planar_gripper
/home/johnshepherd/drake/examples/planar_gripper/test/brick_static_equilibrium_constraint_test.cc
#include "drake/examples/planar_gripper/brick_static_equilibrium_constraint.h" #include "drake/common/test_utilities/eigen_matrix_compare.h" #include "drake/math/autodiff_gradient.h" #include "drake/math/compute_numerical_gradient.h" namespace drake { namespace examples { namespace planar_gripper { GTEST_TEST(BrickSt...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/mass_spring_cloth/BUILD.bazel
load("//tools/lint:lint.bzl", "add_lint_tests") load( "//tools/skylark:drake_cc.bzl", "drake_cc_binary", "drake_cc_googletest", "drake_cc_library", ) package(default_visibility = ["//visibility:private"]) drake_cc_library( name = "cloth_spring_model", srcs = [ "cloth_spring_model.cc", ...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/mass_spring_cloth/cloth_spring_model.cc
#include "drake/examples/mass_spring_cloth/cloth_spring_model.h" #include "drake/common/eigen_types.h" namespace drake { namespace examples { namespace mass_spring_cloth { template <typename T> ClothSpringModel<T>::ClothSpringModel(int nx, int ny, T h, double dt) : nx_(nx), ny_(ny), num_particles_(nx...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/mass_spring_cloth/README.md
Mass Spring Cloth Example ================================================================================ This example demonstrates the dynamics of a cloth modeled as a collection of particles connected by springs. The cloth, fixed at two corners and initially horizontal, drapes down and swings under gravity. The pur...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/mass_spring_cloth/cloth_spring_model_params.cc
#include "drake/examples/mass_spring_cloth/cloth_spring_model_params.h" namespace drake { namespace examples { namespace mass_spring_cloth { const int ClothSpringModelParamsIndices::kNumCoordinates; const int ClothSpringModelParamsIndices::kMass; const int ClothSpringModelParamsIndices::kK; const int ClothSpringModel...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/mass_spring_cloth/cloth_spring_model_params.h
#pragma once // This file was previously auto-generated, but now is just a normal source // file in git. However, it still retains some historical oddities from its // heritage. In general, we do recommend against subclassing BasicVector in // new code. #include <cmath> #include <limits> #include <stdexcept> #include...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/mass_spring_cloth/cloth_spring_model.h
#pragma once #include <limits> #include <vector> #include "drake/common/drake_copyable.h" #include "drake/common/eigen_types.h" #include "drake/examples/mass_spring_cloth/cloth_spring_model_params.h" #include "drake/systems/framework/leaf_system.h" namespace drake { namespace examples { namespace mass_spring_cloth {...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/mass_spring_cloth/run_cloth_spring_model.cc
/* @brief A discrete mass-spring system example. */ #include <cstdlib> #include <limits> #include <memory> #include <gflags/gflags.h> #include "drake/examples/mass_spring_cloth/cloth_spring_model.h" #include "drake/examples/mass_spring_cloth/cloth_spring_model_geometry.h" #include "drake/geometry/meshcat_visualize...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/mass_spring_cloth/cloth_spring_model_geometry.h
#pragma once #include <vector> #include "drake/examples/mass_spring_cloth/cloth_spring_model.h" #include "drake/geometry/scene_graph.h" #include "drake/systems/framework/diagram_builder.h" #include "drake/systems/framework/leaf_system.h" namespace drake { namespace examples { namespace mass_spring_cloth { /** Expres...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/mass_spring_cloth/cloth_spring_model_geometry.cc
#include "drake/examples/mass_spring_cloth/cloth_spring_model_geometry.h" #include <memory> #include <utility> #include "drake/geometry/geometry_frame.h" #include "drake/geometry/geometry_ids.h" #include "drake/geometry/geometry_instance.h" #include "drake/geometry/geometry_roles.h" #include "drake/math/rigid_transfo...
0
/home/johnshepherd/drake/examples/mass_spring_cloth
/home/johnshepherd/drake/examples/mass_spring_cloth/test/cloth_spring_model_test.cc
#include "drake/examples/mass_spring_cloth/cloth_spring_model.h" #include <gtest/gtest.h> #include "drake/systems/analysis/simulator.h" namespace drake { namespace examples { namespace mass_spring_cloth { namespace { class ContinuousClothSpringModelTest : public ::testing::Test { protected: void SetUp() override...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/manipulation_station/end_effector_teleop_dualshock4.py
""" Runs manipulation_station example with Sony DualShock4 Controller for teleoperating the end effector. """ import argparse from enum import Enum import os import pprint import sys from textwrap import dedent import webbrowser import numpy as np from pydrake.common.value import Value from pydrake.examples import (...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/manipulation_station/BUILD.bazel
load("//tools/lint:lint.bzl", "add_lint_tests") load( "//tools/skylark:drake_cc.bzl", "drake_cc_binary", "drake_cc_googletest", "drake_cc_library", ) load( "//tools/skylark:drake_py.bzl", "drake_py_binary", "drake_py_library", ) load("//tools/skylark:test_tags.bzl", "vtk_test_tags") package...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/manipulation_station/manipulation_station.h
#pragma once #include <list> #include <map> #include <memory> #include <optional> #include <string> #include <vector> #include "drake/common/eigen_types.h" #include "drake/geometry/render/render_engine.h" #include "drake/geometry/scene_graph.h" #include "drake/math/rigid_transform.h" #include "drake/multibody/plant/m...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/manipulation_station/joint_teleop.py
""" Runs the manipulation_station example with a meshcat joint slider ui for directly tele-operating the joints. To have the meshcat server automatically open in your browser, supply the --open-window flag; the joint sliders will be accessible by clicking on "Open Controls" in the top right corner. """ import argpars...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/manipulation_station/manipulation_station.cc
#include "drake/examples/manipulation_station/manipulation_station.h" #include <list> #include <memory> #include <string> #include <utility> #include "drake/common/eigen_types.h" #include "drake/common/find_resource.h" #include "drake/geometry/render_vtk/factory.h" #include "drake/manipulation/schunk_wsg/schunk_wsg_c...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/manipulation_station/end_effector_teleop_mouse.py
import argparse import os import sys import webbrowser import numpy as np from pydrake.common.value import Value from pydrake.examples import ( ManipulationStation, ManipulationStationHardwareInterface, CreateClutterClearingYcbObjectList, SchunkCollisionModel) from pydrake.geometry import DrakeVisualizer, Mes...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/manipulation_station/schunk_wsg_buttons.py
from pydrake.systems.framework import LeafSystem class SchunkWsgButtons(LeafSystem): """ Adds buttons to open/close the Schunk WSG gripper. .. pydrake_system:: name: SchunkWsgButtons output_ports: - position - max_force """ _BUTTON_NAME = "Open/Close Gripper" ...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/manipulation_station/README.md
Robotic Manipulation ==================== This directory contains a C++ implementation of the ManipulationStation Diagram originally designed to support the Robotic Manipulation class at MIT. Course website: https://manipulation.csail.mit.edu The course no longer uses this C++ version; we now set up the Manipulation...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/manipulation_station/proof_of_life.cc
#include <gflags/gflags.h> #include "drake/common/eigen_types.h" #include "drake/common/find_resource.h" #include "drake/common/fmt_eigen.h" #include "drake/common/is_approx_equal_abstol.h" #include "drake/examples/manipulation_station/manipulation_station.h" #include "drake/geometry/drake_visualizer.h" #include "drak...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/manipulation_station/end_effector_teleop_sliders.py
import argparse from dataclasses import dataclass import sys import webbrowser import numpy as np from pydrake.common.value import Value from pydrake.examples import ( ManipulationStation, ManipulationStationHardwareInterface, CreateClutterClearingYcbObjectList, SchunkCollisionModel) from pydrake.geometry imp...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/manipulation_station/manipulation_station_hardware_interface.h
#pragma once #include <memory> #include <string> #include <vector> #include "drake/lcm/drake_lcm.h" #include "drake/lcm/drake_lcm_interface.h" #include "drake/multibody/plant/multibody_plant.h" #include "drake/systems/framework/diagram.h" #include "drake/systems/lcm/lcm_subscriber_system.h" namespace drake { namespa...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/manipulation_station/mock_station_simulation.cc
#include <limits> #include <gflags/gflags.h> #include "drake/common/eigen_types.h" #include "drake/common/find_resource.h" #include "drake/common/is_approx_equal_abstol.h" #include "drake/examples/manipulation_station/manipulation_station.h" #include "drake/geometry/drake_visualizer.h" #include "drake/lcmt_iiwa_comma...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/manipulation_station/manipulation_station_hardware_interface.cc
#include "drake/examples/manipulation_station/manipulation_station_hardware_interface.h" #include <iostream> #include <utility> #include "drake/lcm/drake_lcm.h" #include "drake/lcmt_iiwa_command.hpp" #include "drake/lcmt_iiwa_status.hpp" #include "drake/lcmt_image_array.hpp" #include "drake/lcmt_schunk_wsg_command.hp...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/manipulation_station/print_station_context.py
""" Provides some insight into the ManipulationStation model by printing out the contents of its (default) Context. """ from pydrake.examples import ManipulationStation def main(): station = ManipulationStation() station.SetupManipulationClassStation() station.Finalize() context = station.CreateDefa...
0
/home/johnshepherd/drake/examples/manipulation_station
/home/johnshepherd/drake/examples/manipulation_station/test/manipulation_station_test.cc
#include "drake/examples/manipulation_station/manipulation_station.h" #include <map> #include <gtest/gtest.h> #include "drake/common/test_utilities/eigen_matrix_compare.h" #include "drake/common/test_utilities/expect_no_throw.h" #include "drake/geometry/test_utilities/dummy_render_engine.h" #include "drake/multibody...
0
/home/johnshepherd/drake/examples/manipulation_station
/home/johnshepherd/drake/examples/manipulation_station/test/manipulation_station_hardware_interface_test.cc
#include "drake/examples/manipulation_station/manipulation_station_hardware_interface.h" // noqa #include <gtest/gtest.h> #include "drake/systems/sensors/image.h" namespace drake { namespace examples { namespace manipulation_station { namespace { using Eigen::VectorXd; using systems::BasicVector; GTEST_TEST(Manip...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/fibonacci/BUILD.bazel
load("//tools/lint:lint.bzl", "add_lint_tests") load( "//tools/skylark:drake_cc.bzl", "drake_cc_binary", "drake_cc_googletest", "drake_cc_library", ) package(default_visibility = ["//visibility:private"]) drake_cc_library( name = "fibonacci_difference_equation", hdrs = [ "fibonacci_dif...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/fibonacci/run_fibonacci.cc
#include <iostream> #include <gflags/gflags.h> #include "drake/examples/fibonacci/fibonacci_difference_equation.h" #include "drake/systems/analysis/simulator.h" #include "drake/systems/framework/diagram_builder.h" #include "drake/systems/primitives/vector_log_sink.h" DEFINE_int32(steps, 10, "Length of Fibonacci sequ...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/fibonacci/fibonacci_difference_equation.h
#pragma once #include <cmath> #include "drake/systems/framework/event.h" #include "drake/systems/framework/leaf_system.h" namespace drake { namespace examples { namespace fibonacci { /** A pure discrete system that generates the Fibonacci sequence F_n using a difference equation. @system name: FibonacciDifferenceE...
0
/home/johnshepherd/drake/examples/fibonacci
/home/johnshepherd/drake/examples/fibonacci/test/fibonacci_difference_equation_test.cc
#include "drake/examples/fibonacci/fibonacci_difference_equation.h" #include <gtest/gtest.h> #include "drake/systems/analysis/simulator.h" #include "drake/systems/framework/diagram_builder.h" #include "drake/systems/primitives/vector_log_sink.h" namespace drake { namespace examples { namespace fibonacci { namespace ...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/pendulum/Pendulum.urdf
<?xml version="1.0"?> <robot name="Pendulum"> <material name="green"> <color rgba=".3 .6 .4 1"/> </material> <material name="red"> <color rgba=".9 .1 0 1"/> </material> <material name="blue"> <color rgba="0 0 1 1"/> </material> <link drake_ignore="true" name="world"> <inertial> <!-- ...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/pendulum/print_symbolic_dynamics.cc
#include <iostream> #include "drake/common/symbolic/expression.h" #include "drake/examples/pendulum/pendulum_plant.h" #include "drake/multibody/parsing/parser.h" #include "drake/multibody/plant/multibody_plant.h" // A simple example of extracting the symbolic dynamics of the pendulum system, // and printing them to s...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/pendulum/pendulum_input.cc
#include "drake/examples/pendulum/pendulum_input.h" namespace drake { namespace examples { namespace pendulum { const int PendulumInputIndices::kNumCoordinates; const int PendulumInputIndices::kTau; const std::vector<std::string>& PendulumInputIndices::GetCoordinateNames() { static const drake::never_destroyed<std...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/pendulum/trajectory_optimization_simulation.cc
#include <iostream> #include <memory> #include <gflags/gflags.h> #include "drake/common/is_approx_equal_abstol.h" #include "drake/examples/pendulum/pendulum_geometry.h" #include "drake/examples/pendulum/pendulum_plant.h" #include "drake/geometry/drake_visualizer.h" #include "drake/planning/trajectory_optimization/dir...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/pendulum/passive_simulation.cc
#include <gflags/gflags.h> #include "drake/examples/pendulum/pendulum_geometry.h" #include "drake/examples/pendulum/pendulum_plant.h" #include "drake/geometry/drake_visualizer.h" #include "drake/systems/analysis/simulator.h" #include "drake/systems/framework/diagram.h" #include "drake/systems/framework/diagram_builder...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/pendulum/BUILD.bazel
load("//tools/install:install_data.bzl", "install_data") load("//tools/lint:lint.bzl", "add_lint_tests") load( "//tools/skylark:drake_cc.bzl", "drake_cc_binary", "drake_cc_googletest", "drake_cc_library", ) load("//tools/skylark:drake_data.bzl", "models_filegroup") package(default_visibility = ["//visi...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/pendulum/pendulum_plant.h
#pragma once #include "drake/examples/pendulum/pendulum_input.h" #include "drake/examples/pendulum/pendulum_params.h" #include "drake/examples/pendulum/pendulum_state.h" #include "drake/systems/framework/leaf_system.h" namespace drake { namespace examples { namespace pendulum { /// A model of a simple pendulum /// @...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/pendulum/pendulum_params.cc
#include "drake/examples/pendulum/pendulum_params.h" namespace drake { namespace examples { namespace pendulum { const int PendulumParamsIndices::kNumCoordinates; const int PendulumParamsIndices::kMass; const int PendulumParamsIndices::kLength; const int PendulumParamsIndices::kDamping; const int PendulumParamsIndice...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/pendulum/pendulum_geometry.h
#pragma once #include "drake/geometry/scene_graph.h" #include "drake/systems/framework/diagram_builder.h" #include "drake/systems/framework/leaf_system.h" namespace drake { namespace examples { namespace pendulum { /// Expresses a PendulumPlants's geometry to a SceneGraph. /// /// @system /// name: PendulumGeometry ...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/pendulum/pendulum_geometry.cc
#include "drake/examples/pendulum/pendulum_geometry.h" #include <memory> #include <utility> #include "drake/examples/pendulum/pendulum_params.h" #include "drake/examples/pendulum/pendulum_state.h" #include "drake/geometry/geometry_frame.h" #include "drake/geometry/geometry_ids.h" #include "drake/geometry/geometry_ins...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/pendulum/pendulum_plant.cc
#include "drake/examples/pendulum/pendulum_plant.h" #include <cmath> #include "drake/common/default_scalars.h" namespace drake { namespace examples { namespace pendulum { template <typename T> PendulumPlant<T>::PendulumPlant() : systems::LeafSystem<T>(systems::SystemTypeTag<PendulumPlant>{}) { this->DeclareNu...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/pendulum/pendulum_state.cc
#include "drake/examples/pendulum/pendulum_state.h" namespace drake { namespace examples { namespace pendulum { const int PendulumStateIndices::kNumCoordinates; const int PendulumStateIndices::kTheta; const int PendulumStateIndices::kThetadot; const std::vector<std::string>& PendulumStateIndices::GetCoordinateNames(...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/pendulum/lqr_simulation.cc
#include <gflags/gflags.h> #include "drake/common/drake_assert.h" #include "drake/common/is_approx_equal_abstol.h" #include "drake/examples/pendulum/pendulum_geometry.h" #include "drake/examples/pendulum/pendulum_plant.h" #include "drake/geometry/drake_visualizer.h" #include "drake/systems/analysis/simulator.h" #inclu...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/pendulum/pendulum_state.h
#pragma once // This file was previously auto-generated, but now is just a normal source // file in git. However, it still retains some historical oddities from its // heritage. In general, we do recommend against subclassing BasicVector in // new code. #include <cmath> #include <limits> #include <stdexcept> #include...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/pendulum/energy_shaping_simulation.cc
#include <cmath> #include <gflags/gflags.h> #include "drake/common/drake_assert.h" #include "drake/examples/pendulum/pendulum_geometry.h" #include "drake/examples/pendulum/pendulum_plant.h" #include "drake/geometry/drake_visualizer.h" #include "drake/systems/analysis/simulator.h" #include "drake/systems/framework/dia...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/pendulum/pendulum_params.h
#pragma once // This file was previously auto-generated, but now is just a normal source // file in git. However, it still retains some historical oddities from its // heritage. In general, we do recommend against subclassing BasicVector in // new code. #include <cmath> #include <limits> #include <stdexcept> #include...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/pendulum/pendulum_parameters_derivatives.cc
#include <fmt/format.h> #include "drake/common/eigen_types.h" #include "drake/examples/pendulum/pendulum_input.h" #include "drake/examples/pendulum/pendulum_params.h" #include "drake/examples/pendulum/pendulum_plant.h" #include "drake/examples/pendulum/pendulum_state.h" // A simple example on how to take derivatives ...
0
/home/johnshepherd/drake/examples
/home/johnshepherd/drake/examples/pendulum/pendulum_input.h
#pragma once // This file was previously auto-generated, but now is just a normal source // file in git. However, it still retains some historical oddities from its // heritage. In general, we do recommend against subclassing BasicVector in // new code. #include <cmath> #include <limits> #include <stdexcept> #include...
0
/home/johnshepherd/drake/examples/pendulum
/home/johnshepherd/drake/examples/pendulum/gen/pendulum_state.h
#pragma once #include "drake/examples/pendulum/pendulum_state.h" // clang-format off // NOLINTNEXTLINE #warning "DRAKE_DEPRECATED: This include path is deprecated and will be removed on or after 2024-09-01. Remove the /gen/ part of your code's include statement." // clang-format on
0
/home/johnshepherd/drake/examples/pendulum
/home/johnshepherd/drake/examples/pendulum/gen/pendulum_params.h
#pragma once #include "drake/examples/pendulum/pendulum_params.h" // clang-format off // NOLINTNEXTLINE #warning "DRAKE_DEPRECATED: This include path is deprecated and will be removed on or after 2024-09-01. Remove the /gen/ part of your code's include statement." // clang-format on
0
/home/johnshepherd/drake/examples/pendulum
/home/johnshepherd/drake/examples/pendulum/gen/pendulum_input.h
#pragma once #include "drake/examples/pendulum/pendulum_input.h" // clang-format off // NOLINTNEXTLINE #warning "DRAKE_DEPRECATED: This include path is deprecated and will be removed on or after 2024-09-01. Remove the /gen/ part of your code's include statement." // clang-format on
0
/home/johnshepherd/drake/examples/pendulum
/home/johnshepherd/drake/examples/pendulum/test/pendulum_plant_test.cc
#include "drake/examples/pendulum/pendulum_plant.h" #include <gtest/gtest.h> #include "drake/common/autodiff.h" #include "drake/common/test_utilities/expect_no_throw.h" namespace drake { namespace examples { namespace pendulum { namespace { GTEST_TEST(PendulumPlantTest, ToAutoDiff) { // Construct the plant. Pen...
0
/home/johnshepherd/drake/examples/pendulum
/home/johnshepherd/drake/examples/pendulum/test/urdf_dynamics_test.cc
#include <memory> #include <gtest/gtest.h> #include "drake/common/test_utilities/eigen_matrix_compare.h" #include "drake/examples/pendulum/pendulum_plant.h" #include "drake/multibody/parsing/parser.h" #include "drake/multibody/plant/multibody_plant.h" namespace drake { namespace examples { namespace pendulum { names...
0