Skip to content

carcamdou/cr_grasper

Repository files navigation

README: Robot Graspit! Project

Carlyn Dougherty (ccd2134@columbia.edu)

FOUNDATION:

Main Idea: Replace Graspit! with a similar simulator using Pybullet (https://pybullet.org/wordpress/).

Graspit! Overview:

  • Tool for grasping research: simulator that can accommodate arbitrary hand and robot designs.
  • Uses ROS/Gazebo
  • Loads objects/obstacles of arbitrary geometry
  • Collision detection/contact
  • Grasp quality metrics, both numeric/visual
  • Key Use: development tool - execute and test various robot control algorithms in simulation for grasp-grasp-dependent needs
  • Key Use: computational platform: in addition to real-world action, adds in ability to plan grasps as needed

Why switch to PyBullet:

  • Python lends itself toward quick development
  • Not reliant on ROS/Gazebo or any particular OS
  • Easier use of arbitrary URDF/SDF/etc + better solution for arbitrary robotic hands (still w/config, streamlined)
  • Bullet dynamics/kinematics/collisions allows for some better opportunities for simulations
  • Make as adaptable as possible for ability to adapt later
  • Time speedups possible if needed (C++, no GUI, etc)

Key Features:

Grasp Planning:

List Planner:

The hand circles the object and makes grasps at regular intervals on the sphere around the object. The number of intervals around a sphere and also the number of attempts made for each circumnavigation are user specified.

Hand distance is chosen by moving the fingers splayed until the hand/palm hits the target. This allows for the closest grasp.

Currently, the whole hand is rotated around the wrist axis for each grasp a user specified number of times.

Grasp Evaluation Metrics:

Gravity:

Using the Pybullet dynamics, a force in the downward direction is applied to the object. This simulates the influence of gravity and gives one metric for the success of a grasp - the binary evaluation of remaining in the gripper or not.

Distance Moved:

While this is just a rough estimation (further work could be done here) the distance that an object moves from it's original pose (position, orientation) might indicate the replicability of the grasp and therefore give some understanding of how easily it will translate from simulation to the real world.

Contact Point Evaluations:

Grasp Wrench Space:

For each of the contact points between the object and the robotic hand, force and torque are calculated in 3 dimensions. The combination of these two create a 6 dimensional vector used to create some numerical metric for grasps. To extend the amount of usable vectors, each contact point uses an n-sided pyramid to create n different Force/Torque vectors for each contact point. The dimensions of this pyramid can be adjusted by the user. If there are sufficent contact points between the hand and the object, then no pyramid need be used.

This is based on Graspit! techniques and more details on that can be found here. The friction cones made from each contact point are shown in the image below (also from graspit!).

Volume:

From the force/torque vectors calculated for each grasp, create a 6 dimensional convex hull. Then take the volume of that convex hull.

Epsilon:

Distance from the centroid of the 6 dimensional hull to the closest vector

Usage:

The goal here is to get the most simple form of a grasp planner working first, then move on to more sophisticated methods

To Use:

  • Edit + run write_config.py

    • file_paths
      • robot_path - relative path from grasper.py to robot hand URDF file
      • object_path - path to object URDF file
      • object_scale - scale of object in URDF file (to adjust to size of hand, should default to 1)
    • grasp_settings
      • init_grasp_distance - how far from the origin should the hand be at the start (just needs to be beyond the length of the object) to attempt to find closest point
      • speed_find_distance - speed the object moves toward the hand to find ideal grasp distance
      • grasp_distance_margin - how far from touching do you want the palm to be when attempting grips
      • max_grasp_force - max force allowed
      • target_grasp_velocity - target velocity for joints when grasping
      • grasp_time_limit - how long given to find a grasp
      • active_grasp_joints - which joints in the hand to use - specified given joint number from Pybullet getJointInfo
      • num_grasps_per_cycle - number of grasps attempted in each rotation around object (evenly spaced attempts)
      • num_cycles_to_grasp - number of rotations (with angles spread between pi/2 and 0 - ie euler theta)
      • use_wrist_rotations - binary. allows for rotations around the wrist at each grasp attempt
      • num_wrist_rotations - number of rotations around the wrist axis for each grasp location
    • eval_settings
      • force_pyramid_sides - for grasp wrench space: how many sides does the pyramid approximating the friction cone have
      • force_pyramid_radius - for grasp wrench space: what is the radius of the friction cone approximated by the pyramid
    • gui_settings
      • use_gui - not functioning yet. should allow the whole system to work without visualizations to allow for speedups/parallelization
      • debug_lines - shows axis lines for the hand
      • debug_text - shows text on screen to update the user
  • Run grasper.py

    • Should return a list of good grasps specified by a (Position, Orientation, Joint Angle) Tuple. Also returned is the final pose of the object and the grasp quality metrics (volume and epsilson). At the moment, only grasps that pass the gravity check threshold are returned.
    • From this point the grasps can be recreated using the Object/Hand positions and orientations

Future Work:

More advanced choices for grasps. Replacing the Eigengrasp Planner which relies on hand posture space dimensionality reduction and the Database Planner family, which relies on a huge database of pre-computed grasps to plan grasps for novel objects. These two can be found in Graspit!

NOTES:

On Object files:

All the files in the ObjectURDFs folder are from the PyBullet examples folder. This can be found here on GitHub.

On URDFs: (based on needs for barrett hand)

If you have a depreciated .xacro: update/clean up using this script in all folders with .xacro files (dependancies and all) - specifically the robots + urdf files for barrett_hand

$ find . -iname "*.xacro" | xargs sed -i 's#<\([/]\?\)\(if\|unless\|include\|arg\|property\|macro\|insert_block\)#<\1xacro:\2#g'

In the robots folder (all the files in the urdf folder depend on this one): convert the urdf.xacro to urdf

$ source ~/catkin_ws/devel/setup.bash
$ rosrun xacro xacro --inorder name.urdf.xacro > name.urdf

About

columbia robotics grasping simulator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published