These are the notes of the code walkthrough given by Justin, Neil, and James from Energid. If we have any specific questions we should direct them to Justin or Neil (preferably through Energid's Basecamp setup).

General notes

Need to move everything so there are no spaces and then set the environment variable to point to the toolkit

  • or, just move toolkits\data to C:\, then set environment variable EC_TOOLKITS to C:\toolkits

Structure of files/code we have from Energid:

  • All executables and dll's built in the \bin directory (includes dll's for 3rd party libs)
  • \lib has all sorts of libraries including grasping library ecGrasping.lib, simulation library ecSimulation.lib, manipulator libraries, geometry libraries.
  • \include has all our headers; each library has its own directory in \include
  • \external\bundles include libs from 3rd parties (like rendering libraries used for actin viewer rendering, some QT libraries as well)

model formats - (.xml .ecx) both xml files (.ecz xml.gz) both gzipped xml files; usually saved in the data directory

Grasp sequence is their most general grasp implementation

  • Lets you specify individual frames consisting of position and/or force targets, which are then executed in sequence.

grasp plugin - pose the robot then add that frame, then another, then another, etc

Notes on code in GraspTutorial2

ecGraspingTraining.cpp is main

  • calls robot factory to create the robot/environment
  • then calls object factory to create the graspable objects
grasping module factory builds a grasping decision tree
  • Branch nodes and grasp implementation nodes
    • Branch/decision nodes lead to the grasp for the right object (or other qualities/criteria)
    • leaf nodes are grasp implementations

GraspingTraining: line 263 is where you create the robot/environment/object

line 287 start the actual grasp

  • grasp descriptor passed to decision tree on initialization
    • descriptor includes at least a string which we can use to specify things like power vs. pinch grasp, etc. This can then be used in the decision tree to find the appropriate grasp implementation

-s for shape (capsule, sphere(default), others?) when running built code from commandline

performGrasp runs simulation until the grasp succeeds or fail (performGrasp is a functor object created on line 293)

  • it's overloaded!
  • give it the grasp decision tree and the grasp descriptor
  • grasp successful/failed based on pretty much anything you want, including not being able to find a leaf node

GraspingModuleFactory.cpp

  • line 154 createGraspingModule is the entry

PerformGraspFunctor

  • line 131 is called to really do the grasp
  • first stated system has to do with the object
  • second stated system is for the robot
  • object index input tells which object you're grasping from the object's stated system
  • manip index input tells which manipulator you're using on the robot

  • Calculate grasp figures out which leaf node to use (tree is no longer needed) or FAIL
  • line 169 starts the grasp simulation
    • update parameters includes the position control system for both object and robot (in the example uses the same, but don't have to)
  • line 182 updates status to PROGRESS, KEY_PROGRESS, SUCCESS, FAIL
    • key progress just indicates that some sort of key event has occurred
  • lines 201-212 handle force control (if used); force control can be a type of frame in the grasp sequence

-- BarrettHeyneman - 15 Jul 2009

 
This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback