Drake
rigid_gripper.cc File Reference
#include <algorithm>
#include <memory>
#include <gflags/gflags.h>
#include "drake/common/find_resource.h"
#include "drake/lcm/drake_lcm.h"
#include "drake/lcmt_contact_results_for_viz.hpp"
#include "drake/multibody/parsers/urdf_parser.h"
#include "drake/multibody/rigid_body_frame.h"
#include "drake/multibody/rigid_body_plant/compliant_contact_model.h"
#include "drake/multibody/rigid_body_plant/contact_results_to_lcm.h"
#include "drake/multibody/rigid_body_plant/drake_visualizer.h"
#include "drake/multibody/rigid_body_plant/rigid_body_plant.h"
#include "drake/multibody/rigid_body_tree.h"
#include "drake/multibody/rigid_body_tree_construction.h"
#include "drake/systems/analysis/runge_kutta3_integrator.h"
#include "drake/systems/analysis/simulator.h"
#include "drake/systems/framework/diagram_builder.h"
#include "drake/systems/lcm/lcm_publisher_system.h"
Include dependency graph for rigid_gripper.cc:

Namespaces

 drake
 
 drake::examples
 

Functions

 DEFINE_double (accuracy, 5e-5,"Sets the simulation accuracy")
 
 DEFINE_double (us, 0.9,"The coefficient of static friction")
 
 DEFINE_double (ud, 0.5,"The coefficient of dynamic friction")
 
 DEFINE_double (youngs_modulus, 1e8,"The contact material Young's modulus (Pa)")
 
 DEFINE_double (dissipation, 2.0,"The contact material dissipation (s/m)")
 
 DEFINE_double (v_stiction_tolerance, 0.01,"The maximum slipping speed allowed during stiction (m/s)")
 
 DEFINE_double (contact_radius, 1e-4,"The characteristic scale of radius (m) of the contact area")
 
 DEFINE_double (sim_duration, 5,"Amount of time to simulate (s)")
 
 DEFINE_bool (playback, true,"If true, simulation begins looping playback when complete")
 
 DEFINE_string (simulation_type,"compliant","The type of simulation to use: ""'compliant' or 'timestepping'")
 
 DEFINE_double (dt, 1e-3,"The step size to use for ""'simulation_type=timestepping' (ignored for ""'simulation_type=compliant'")
 
std::unique_ptr< RigidBodyTreedBuildTestTree ()
 
int main ()
 
int main (int argc, char *argv[])
 

Detailed Description

A simple example of a rigid gripper attempting to hold a block. The gripper has rigid geometry: two fingers at a fixed distance from each other. They are positioned in a configuration slightly narrower than the box placed between them.

This is a test to evaluate/debug the contact model. This configuration simplifies the test by defining a known penetration and eliminating all controller-dependent variation.

This is an even simpler example of what is shown in schung_wsg_lift_test. This eliminates the PID controller and ground contact. At the end of the simulation, the box should have slipped an amount less than the duration length times v_stiction_tolerance (i.e., the highest allowable slip speed during stiction).

Function Documentation

DEFINE_bool ( playback  ,
true  ,
"If  true,
simulation begins looping playback when complete"   
)
DEFINE_double ( accuracy  ,
5e-  5,
"Sets the simulation accuracy"   
)
DEFINE_double ( us  ,
0.  9,
"The coefficient of static friction"   
)
DEFINE_double ( ud  ,
0.  5,
"The coefficient of dynamic friction"   
)
DEFINE_double ( youngs_modulus  ,
1e8  ,
"The contact material Young's modulus (Pa)"   
)
DEFINE_double ( dissipation  ,
2.  0,
"The contact material dissipation (s/m)"   
)
DEFINE_double ( v_stiction_tolerance  ,
0.  01,
"The maximum slipping speed allowed during stiction (m/s)"   
)
DEFINE_double ( contact_radius  ,
1e-  4,
"The characteristic scale of radius (m) of the contact area"   
)
DEFINE_double ( sim_duration  ,
,
"Amount of time to simulate (s)"   
)
DEFINE_double ( dt  ,
1e-  3 
)
DEFINE_string ( simulation_type  ,
"compliant"  ,
"The type of simulation to use: ""'compliant' or 'timestepping'"   
)
int main ( int  argc,
char *  argv[] 
)

Here is the call graph for this function: