GithubHelp home page GithubHelp logo

jenniferbuehler / graspit-pkgs Goto Github PK

View Code? Open in Web Editor NEW
50.0 50.0 25.0 2.01 MB

Collection of packages related to GraspIt!

License: BSD 3-Clause "New" or "Revised" License

CMake 7.19% C++ 92.46% Dockerfile 0.34%

graspit-pkgs's People

Contributors

jenniferbuehler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

graspit-pkgs's Issues

graspit-simulator problem

When following your wiki to build the 'graspit-pkgs' package,
Where can I find my graspit-simulator or how can set the $GRASPIT environment variable ?

Changing annealing parameters

Looking through the source from the graspit_simulator github I found that the grasp planning proceeds as follows (I could be wrong): The abstract planning classes call upon SimAnnPlanner which then loops using simAnn. Within simAnn lies setParameters which uses a switch to set the annealing parameters.

void SimAnn::setParameters(AnnealingType type)
{
    switch (type) {
        case ANNEAL_DEFAULT:
            //these are the default parameters that experimentation shows work best over 8 dimensions
            //identical schedule for error and neighbors
            //error is supposed to be distance between fingers and object, so raw order of 1-100 mm
            YC = 7.0;
            HC = 7.0;
            YDIMS = 8;
            HDIMS = 8;
            NBR_ADJ = 1.0;
            ERR_ADJ = 1.0e-6;
            DEF_T0 = 1.0e6;
            DEF_K0 = 30000;
            break;
        case ANNEAL_LOOP:
            //for looping we use a slightly shorter interval
            YC = 7.0;
            HC = 7.0;
            YDIMS = 8;
            HDIMS = 8;
            NBR_ADJ = 1.0;
            ERR_ADJ = 1.0e-6;
            DEF_T0 = 1.0e6;
            DEF_K0 = 35000;
            break;
        case ANNEAL_MODIFIED:
            //different version which doesn't really work better than default
            YC = 2.38;
            YDIMS = 8;
            HC = 2.38;
            HDIMS = 8;
            NBR_ADJ = 1.0e-3;
            ERR_ADJ = 1.0e-1;
            DEF_T0 = 1.0e3;
            DEF_K0 = 0;
            break;
        case ANNEAL_STRICT:
            DBGP("Strict Sim Ann parameters!");
            //this are for searches that ONLY look at grasp quality measure
            YC = 0.72; 
            HC = 0.22;
            YDIMS = 2;
            HDIMS = 2;
            NBR_ADJ = 1.0;
            ERR_ADJ = 1.0; //meant to work with ENERGY_STRICT_AUTOGRASP which multiplies eps. gq by 1.0e2
            DEF_T0 = 10.0;
            DEF_K0 = 0; 
            break;
        case ANNEAL_ONLINE:
            //parameters for on-line search. Supposed to work really fast and in fewer dimensions
            //YC = 0.54;
            YC = 0.24;
            HC = 0.54;
            //YDIMS = 3;
            YDIMS = 2;
            HDIMS = 3;
            NBR_ADJ = 1.0;
            ERR_ADJ = 1.0e-2;
            DEF_T0 = 1.0e1;
            DEF_K0 = 100;
            break;
        default:
            fprintf(stderr,"Unknown Annealing params requested, using default!\n");
            setParameters(ANNEAL_DEFAULT);
            break;
    }
}

I was thinking that creating a modified version of simAnnPlanner that calls on a different simAnn can enable a way to iterate through different parameters. I noticed that your version of EigenGraspPlanner.cpp, you include the helper files for both of the previously mentioned sources. In order to use the modified version of simAnnPlanner and simAnn would I have to compile it through graspit first and then compile a modified EigenGraspPlanner.cpp in grasp_planning_graspit?

manipulation Grasp Results are not correct

Hey Jennifer
We are using Graspit.Services to integrate our Custom Robot hand with UR5 Robot.So we are using graspit for Grasp execution and evaluation.
We successfully made graspit files for our Robot hand and able to spawn in graspit simulator.
So now we are using ROS to integrate with our Robot for that we are using Graspit ROS Services from your wiki.I made a simple client in ROS to communicate with the ROS Service grasp_planning_service.cpp node.
Everything is working OK except that when i am trying to get the pose and orientation of Robot hand i am not getting the correct values but at the same time when i check the output world file it shows the correct value.
My frame id is "1".
I am able to load and add the object and robot to the database model.
Do i am missing anything?

Null pointer Issue

I faced the following Error in Ubuntu 18.04 and ROS melodic

^~~~~~~
/usr/include/urdf_model/model.h:92:8: note: no known conversion for argument 2 from ‘urdf_traverser::LinkPtr {aka boost::shared_ptrurdf::Link}’ to ‘urdf::LinkSharedPtr& {aka std::shared_ptrurdf::Link&}’
/home/usman/Desktop/MSCS/jenifer/graspit_ws/src/urdf-tools-pkgs/urdf_traverser/src/UrdfTraverser.cpp: In member function ‘urdf_traverser::LinkConstPtr urdf_traverser::UrdfTraverser::readChildLink(const JointConstPtr&) const’:
/home/usman/Desktop/MSCS/jenifer/graspit_ws/src/urdf-tools-pkgs/urdf_traverser/src/UrdfTraverser.cpp:144:53: error: no matching function for call to ‘urdf::Model::getLink(const string&, urdf_traverser::LinkPtr&)’
model->getLink(joint->child_link_name, childLink);
^
In file included from /opt/ros/melodic/include/urdf/model.h:42:0,
from /home/usman/Desktop/MSCS/jenifer/graspit_ws/src/urdf-tools-pkgs/urdf_traverser/include/urdf_traverser/Helpers.h:47,
from /home/usman/Desktop/MSCS/jenifer/graspit_ws/src/urdf-tools-pkgs/urdf_traverser/src/UrdfTraverser.cpp:31:
/usr/include/urdf_model/model.h:52:22: note: candidate: urdf::LinkConstSharedPtr urdf::ModelInterface::getLink(const string&) const
LinkConstSharedPtr getLink(const std::string& name) const
^~~~~~~
/usr/include/urdf_model/model.h:52:22: note: candidate expects 1 argument, 2 provided
/usr/include/urdf_model/model.h:92:8: note: candidate: void urdf::ModelInterface::getLink(const string&, urdf::LinkSharedPtr&) const
void getLink(const std::string& name, LinkSharedPtr &link) const
^~~~~~~
/usr/include/urdf_model/model.h:92:8: note: no known conversion for argument 2 from ‘urdf_traverser::LinkPtr {aka boost::shared_ptrurdf::Link}’ to ‘urdf::LinkSharedPtr& {aka std::shared_ptrurdf::Link&}’
/home/usman/Desktop/MSCS/jenifer/graspit_ws/src/urdf-tools-pkgs/urdf_traverser/src/UrdfTraverser.cpp: In member function ‘urdf_traverser::JointPtr urdf_traverser::UrdfTraverser::getParentJoint(const JointConstPtr&)’:
/home/usman/Desktop/MSCS/jenifer/graspit_ws/src/urdf-tools-pkgs/urdf_traverser/src/UrdfTraverser.cpp:150:45: error: conversion from ‘urdf::LinkConstSharedPtr {aka std::shared_ptr}’ to non-scalar type ‘urdf_traverser::LinkConstPtr {aka boost::shared_ptr}’ requested
LinkConstPtr parentLink = model->getLink(joint->parent_link_name);
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/home/usman/Desktop/MSCS/jenifer/graspit_ws/src/urdf-tools-pkgs/urdf_traverser/src/UrdfTraverser.cpp:152:24: error: could not convert ‘parentLink.boost::shared_ptr::operator->()->urdf::Link::parent_joint’ from ‘const JointSharedPtr {aka const std::shared_ptrurdf::Joint}’ to ‘urdf_traverser::JointPtr {aka boost::shared_ptrurdf::Joint}’
return parentLink->parent_joint;
~~~~~~~~~~~~^~~~~~~~~~~~
/home/usman/Desktop/MSCS/jenifer/graspit_ws/src/urdf-tools-pkgs/urdf_traverser/src/UrdfTraverser.cpp: In member function ‘urdf_traverser::JointConstPtr urdf_traverser::UrdfTraverser::readParentJoint(const JointConstPtr&) const’:
/home/usman/Desktop/MSCS/jenifer/graspit_ws/src/urdf-tools-pkgs/urdf_traverser/src/UrdfTraverser.cpp:157:45: error: conversion from ‘urdf::LinkConstSharedPtr {aka std::shared_ptr}’ to non-scalar type ‘urdf_traverser::LinkConstPtr {aka boost::shared_ptr}’ requested
LinkConstPtr parentLink = model->getLink(joint->parent_link_name);
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/home/usman/Desktop/MSCS/jenifer/graspit_ws/src/urdf-tools-pkgs/urdf_traverser/src/UrdfTraverser.cpp:159:24: error: could not convert ‘parentLink.boost::shared_ptr::operator->()->urdf::Link::parent_joint’ from ‘const JointSharedPtr {aka const std::shared_ptrurdf::Joint}’ to ‘urdf_traverser::JointConstPtr {aka boost::shared_ptr}’
return parentLink->parent_joint;
~~~~~~~~~~~~^~~~~~~~~~~~
/home/usman/Desktop/MSCS/jenifer/graspit_ws/src/urdf-tools-pkgs/urdf_traverser/src/UrdfTraverser.cpp: In member function ‘bool urdf_traverser::UrdfTraverser::hasChildLink(const LinkConstPtr&, const string&) const’:
/home/usman/Desktop/MSCS/jenifer/graspit_ws/src/urdf-tools-pkgs/urdf_traverser/src/UrdfTraverser.cpp:168:48: error: conversion from ‘const value_type {aka const std::shared_ptrurdf::Link}’ to non-scalar type ‘urdf_traverser::LinkPtr {aka boost::shared_ptrurdf::Link}’ requested
LinkPtr childLink = link->child_links[i];
^
/home/usman/Desktop/MSCS/jenifer/graspit_ws/src/urdf-tools-pkgs/urdf_traverser/src/UrdfTraverser.cpp: In member function ‘int urdf_traverser::UrdfTraverser::traverseTreeTopDown(const LinkPtr&, boost::function<int(std::shared_ptr<urdf_traverser::RecursionParams>&)>, urdf_traverser::RecursionParamsPtr&, bool, unsigned int)’:
/home/usman/Desktop/MSCS/jenifer/graspit_ws/src/urdf-tools-pkgs/urdf_traverser/src/UrdfTraverser.cpp:202:78: error: conversion from ‘std::vector<std::shared_ptrurdf::Link >::iterator {aka __gnu_cxx::__normal_iterator<std::shared_ptrurdf::Link, std::vector<std::shared_ptrurdf::Link > >}’ to non-scalar type ‘std::vector<boost::shared_ptrurdf::Link >::const_iterator {aka __gnu_cxx::__normal_iterator<const boost::shared_ptrurdf::Link, std::vector<boost::shared_ptrurdf::Link > >}’ requested
for (std::vector::const_iterator child = link->child_links.begin();
~~~~~~~~~~~~~~~~~~~~~~~^~
/home/usman/Desktop/MSCS/jenifer/graspit_ws/src/urdf-tools-pkgs/urdf_traverser/src/UrdfTraverser.cpp:203:19: error: no match for ‘operator!=’ (operand types are ‘std::vector<boost::shared_ptrurdf::Link >::const_iterator {aka __gnu_cxx::__normal_iterator<const boost::shared_ptrurdf::Link, std::vector<boost::shared_ptrurdf::Link > >}’ and ‘std::vector<std::shared_ptrurdf::Link >::iterator {aka __gnu_cxx::__normal_iterator<std::shared_ptrurdf::Link, std::vector<std::shared_ptrurdf::Link > >}’)
child != link->child_links.end(); child++)
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/c++allocator.h:33:0,

Question with not using inverse matrix to caculate the axis in world frame.

Hallo Jennifer, firstly thank you for providing this great package :D
Recently i am reading your code and have a question about not using inverse matrix to caculate the axis back in world frame. The code is in file 'urdf2graspit.cpp' beginning from line 180:

`void Urdf2GraspIt::getGlobalCoordinates(const JointConstPtr& joint,
const EigenTransform& parentWorldTransform,
Eigen::Vector3d& rotationAxis,
Eigen::Vector3d& position) const
{
Eigen::Vector3d rotAxis = urdf_traverser::getRotationAxis(joint);
// ROS_INFO_STREAM("Orig rotation axis of joint "<name<<": "<<rotAxis);
EigenTransform jointTransform = urdf_traverser::getTransform(joint);
EigenTransform jointWorldTransform = parentWorldTransform * jointTransform;
// ROS_INFO_STREAM("Joint transform: "<<jointTransform);
// ROS_INFO_STREAM("Joint world transform: "<<jointWorldTransform);

#if 0
// OLD code which was actually wrong (I think?)
EigenTransform wtInv = jointWorldTransform.inverse();
// ROS_INFO_STREAM("Inverse joint world transform: "<<wtInv);
// ROS_INFO_STREAM("Rot axis: "<<rotAxis);
rotationAxis = wtInv.rotation() * rotAxis;

#else
// transform the rotation axis in world coordinate frame
rotationAxis = jointWorldTransform.rotation() * rotAxis;
#endif`

I can see you used to use the inverse but actually modified that. I am confusing about that right now. In my mind the transform acquired from a joint represents the transform from parent frame to this frame, as well the parentWorldTransform. If it's true, than i think here the inverse matrix of jointWorldTransform should be used in order to caculate back.
If you can explain me this question? Thanks :)

Remove "hack" introduced with migration to moveit_msgs

When migrating to moveit_msgs (instead of now deprecated household_objects_database_msgs and manipulation_msgs) a temproary "hack" was introduced: The pose of the object to be grasped is simply passed in the first pose of the primitives of CollisionObject.msg (all other primitives, meshes, etc are left empty).
This should in future be handled via /tf instead: the frame of the CollisionObject has the pose.
A thorough cleanup is required before completing #32.

This relates to issue #32 .

How to view .iv results for grasp_planning.cpp ?

I was using the grasp_planning_graspit package to automate grasps. The xml world files opened in Graspit perfectly. However, I could not view the iv versions with ivviewer. I'm assuming its because the iv file is not a single mesh. I was wondering what would be an appropriate way to parse the files? Could one separate the objects and then rerender them with their relative positions? My ultimate goal is to convert these files (or the xml version, which ever is more reliable) to a more popular mesh variant (like waveform) while keeping the hand and the graspable object as distinct from each other.

urdf2graspit for my own hand

Hi, Jenny.
Bother you again.
I use your urdf2graspit to convert my own hand( Made by our lab)--named eagle_shoal.
I used other software to generate the eagle_shoal.urdf. And there are no problem when I use

1: check my urdf

roslaunch urdf_tutorial display.launch model:=<my-eagle_shoal.urdf-path>.All the DOF is OK.

2: generate the graspit file

roslaunch urdf2graspit example_urdf2graspit_eagleshoal.launch.
the example_urdf2graspit_eagleshoal.launch :

<launch>
    <arg name="urdf_file" default="$(find eagle_shoal)/urdf/eagle_shoal.urdf"/>
    <arg name="output_directory" default="$(find eagle_shoal)/urdf2graspit/"/>
    <arg name="hand_root_link" default="p_b"/>
    <arg name="finger_joint_names" default="f_3_0_j f_3_1_j f_2_0_m_j"/>
    <arg name="scale_factor" default="1000"/>
    <arg name="output_material" default="plastic"/>
    <include file="$(find urdf2graspit)/launch/urdf2graspit.launch">
        <arg name="urdf_file" value="$(arg urdf_file)"/>
        <arg name="output_directory" value="$(arg output_directory)"/>
        <arg name="hand_root_link" value="$(arg hand_root_link)"/>
        <arg name="finger_joint_names" value="$(arg finger_joint_names)"/>
        <arg name="scale_factor" value="$(arg scale_factor)"/>
        <arg name="output_material" value="$(arg output_material)"/>
        <arg name="negate_joint_movement" value="false"/>
    </include>
</launch>

It work well too . And the output info in the terminal is:
`

roslaunch urdf2graspit example_urdf2graspit_eagleshoal.launch
[ INFO] [1497340512.333904413]: URDF file: /home/dex_hand/catkin_ws/src/eagle_shoal/urdf/eagle_shoal.urdf
[ INFO] [1497340512.333968639]: Output dir: /home/dex_hand/catkin_ws/src/eagle_shoal/urdf2graspit/
[ INFO] [1497340512.333983845]: Hand root: p_b
[ INFO] [1497340512.334009260]: Joint: f_3_0_j
[ INFO] [1497340512.334024797]: Joint: f_3_1_j
[ INFO] [1497340512.334036268]: Joint: f_2_0_m_j
[ INFO] [1497340512.335545647]: output_material:
[ INFO] [1497340512.336926511]: scale_factor: <1000.000000>
[ INFO] [1497340512.338362626]: negate_joint_movement: <0>
[ INFO] [1497340512.344182770]: Starting model conversion...
[ INFO] [1497340512.344287567]: ### Loading from URDF file /home/dex_hand/catkin_ws/src/eagle_shoal/urdf/eagle_shoal.urdf...
[ INFO] [1497340512.344772620]: Setting base model directory to /home/dex_hand/catkin_ws/src/eagle_shoal/urdf
[ INFO] [1497340512.346564948]: ### Converting files starting from link p_b
[ INFO] [1497340512.346593622]: ### Preparing for DH conversion...
[ INFO] [1497340512.346607012]: ### Joining fixed links..
[ INFO] [1497340512.346629277]: ############### Joining fixed links
[ INFO] [1497340512.346648887]: Start from root link: p_b
[ INFO] [1497340512.346842479]: Joining fixed joint (f_0_0_b_j) between f_0_0_m and f_0_0_b
[ INFO] [1497340512.347805164]: Joining fixed joint (f_0_0_f_j) between f_0_0_m and f_0_0_f
[ INFO] [1497340512.348078035]: Joining fixed joint (f_0_1_f_j) between f_0_1_b and f_0_1_f
[ INFO] [1497340512.348323037]: Joining fixed joint (f_b_0_j) between f_3_0 and f_b_0
[ INFO] [1497340512.348742767]: Joining fixed joint (f_1_0_b_j) between f_1_0_m and f_1_0_b
[ INFO] [1497340512.348983842]: Joining fixed joint (f_1_0_f_j) between f_1_0_m and f_1_0_f
[ INFO] [1497340512.349227939]: Joining fixed joint (f_1_1_f_j) between f_1_1_b and f_1_1_f
[ INFO] [1497340512.349464231]: Joining fixed joint (f_b_1_j) between f_3_1 and f_b_1
[ INFO] [1497340512.349805628]: Joining fixed joint (f_2_0_b_j) between f_2_0_m and f_2_0_b
[ INFO] [1497340512.350045724]: Joining fixed joint (f_2_0_f_j) between f_2_0_m and f_2_0_f
[ INFO] [1497340512.350290110]: Joining fixed joint (f_2_1_f_j) between f_2_1_b and f_2_1_f
[ INFO] [1497340512.350526686]: Joining fixed joint (f_b_2_j) between f_3_2 and f_b_2
[ INFO] [1497340512.350857867]: Joining fixed joint (f_3_2_j) between p_b and f_3_2
[ INFO] [1497340512.351379913]: ### Transforming rotation axes to z...
[ INFO] [1497340512.351422572]: ############### Aligning rotation axis to [0, 0, 1]
[ INFO] [1497340512.351568438]: ### Converting files...
[ INFO] [1497340512.351617982]: ### Urdf2GraspIt::pretConvert for robot eagle_shoal
[ INFO] [1497340512.351689125]: ##### Computing DH parameters out of model
[ INFO] [1497340512.351706596]: ############### Getting DH params
[ INFO] [1497340512.351756756]: ### Starting DH conversion from link p_b
[ INFO] [1497340512.351782302]: ======== Transforming joint f_3_0_j to DH parameters.
[ INFO] [1497340512.351817594]: ======== Transforming joint f_0_0_m_j to DH parameters.
[ INFO] [1497340512.352224200]: ======== Transforming joint f_0_1_b_j to DH parameters.
[ INFO] [1497340512.352426168]: DEBUG-INFO DHParam: Parallel case for getCommonNormal
[ INFO] [1497340512.352453907]: DEBUG-INFO DHParam: Parallel case for getAlpha
[ INFO] [1497340512.352565090]: ======== Transforming joint f_3_1_j to DH parameters.
[ INFO] [1497340512.352604487]: ======== Transforming joint f_1_0_m_j to DH parameters.
[ INFO] [1497340512.352792246]: DEBUG-INFO DHParams: Correcting alpha (is 1.5708): [0, 1, -3.55271e-15], [0, -1, -3.49148e-15]
[ INFO] [1497340512.352829618]: DEBUG-INFO: Translation along z parallel to z, but not equal, so d is negative
[ INFO] [1497340512.352922502]: ======== Transforming joint f_1_1_b_j to DH parameters.
[ INFO] [1497340512.353095625]: DEBUG-INFO DHParam: Parallel case for getCommonNormal
[ INFO] [1497340512.353121561]: DEBUG-INFO DHParam: Parallel case for getAlpha
[ INFO] [1497340512.353229833]: ======== Transforming joint f_2_0_m_j to DH parameters.
[ INFO] [1497340512.353268261]: ======== Transforming joint f_2_1_b_j to DH parameters.
[ INFO] [1497340512.353425184]: DEBUG-INFO DHParam: Parallel case for getCommonNormal
[ INFO] [1497340512.353450086]: DEBUG-INFO DHParam: Parallel case for getAlpha
[ INFO] [1497340512.353561152]: ############### Transform links to DH reference frames
[ INFO] [1497340512.357831351]: --- DH Parameters: ---
[ INFO] [1497340512.357863410]: f_3_0_j: d=0.02985, r=0.049, theta=0, alpha=1.5708, dof_idx=0
[ INFO] [1497340512.357879095]: f_0_0_m_j: d=0, r=0.0570041, theta=1.5708, alpha=0, dof_idx=1
[ INFO] [1497340512.357893010]: f_0_1_b_j: d=0, r=0, theta=0, alpha=0, dof_idx=2
[ INFO] [1497340512.357908934]: f_3_1_j: d=-0.02985, r=0.049, theta=0, alpha=-1.5708, dof_idx=3
[ INFO] [1497340512.357924369]: f_1_0_m_j: d=0, r=0.0570041, theta=1.5708, alpha=0, dof_idx=4
[ INFO] [1497340512.357939607]: f_1_1_b_j: d=0, r=0, theta=0, alpha=0, dof_idx=5
[ INFO] [1497340512.357973652]: f_2_0_m_j: d=0, r=0.0570041, theta=1.5708, alpha=0, dof_idx=6
[ INFO] [1497340512.357988412]: f_2_1_b_j: d=0, r=0, theta=0, alpha=0, dof_idx=7
[ INFO] [1497340512.358001468]: ##### Scaling DH parameters
[ INFO] [1497340512.358030202]: ############### Scaling model
[ INFO] [1497340512.363748709]: ############### Converting meshes
[ INFO] [1497340512.363819653]: Convert mesh for link 'p_b'
[ INFO] [1497340512.422547776]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/p_b.stl with factor 1000
[ INFO] [1497340512.424849174]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/p_b.stl with factor 1000
[ INFO] [1497340512.426860987]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_3_2.stl with factor 1000
[ INFO] [1497340512.427210720]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_3_2.stl with factor 1000
[ INFO] [1497340512.427522288]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_b_2.stl with factor 1000
[ INFO] [1497340512.427976723]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_b_2.stl with factor 1000
[ INFO] [1497340512.579489333]: Convert mesh for link 'f_3_0'
[ INFO] [1497340512.579696412]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_3_0.stl with factor 1000
[ INFO] [1497340512.580286934]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_3_0.stl with factor 1000
[ INFO] [1497340512.580915802]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_b_0.stl with factor 1000
[ INFO] [1497340512.581412490]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_b_0.stl with factor 1000
[ INFO] [1497340512.653214075]: Convert mesh for link 'f_0_0_m'
[ INFO] [1497340512.653375112]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_0_0_m.stl with factor 1000
[ INFO] [1497340512.654031127]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_0_0_m.stl with factor 1000
[ INFO] [1497340512.654714492]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_0_0_b.stl with factor 1000
[ INFO] [1497340512.654911829]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_0_0_b.stl with factor 1000
[ INFO] [1497340512.655184432]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_0_0_f.stl with factor 1000
[ INFO] [1497340512.655455718]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_0_0_f.stl with factor 1000
[ INFO] [1497340512.734435922]: Convert mesh for link 'f_0_1_b'
[ INFO] [1497340512.734607132]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_0_1_b.stl with factor 1000
[ INFO] [1497340512.735466058]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_0_1_b.stl with factor 1000
[ INFO] [1497340512.736327401]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_0_1_f.stl with factor 1000
[ INFO] [1497340512.736609961]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_0_1_f.stl with factor 1000
[ INFO] [1497340512.828802225]: Convert mesh for link 'f_3_1'
[ INFO] [1497340512.829014922]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_3_1.stl with factor 1000
[ INFO] [1497340512.829592966]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_3_1.stl with factor 1000
[ INFO] [1497340512.830171831]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_b_1.stl with factor 1000
[ INFO] [1497340512.830657284]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_b_1.stl with factor 1000
[ INFO] [1497340512.903366484]: Convert mesh for link 'f_1_0_m'
[ INFO] [1497340512.903522302]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_1_0_m.stl with factor 1000
[ INFO] [1497340512.904186382]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_1_0_m.stl with factor 1000
[ INFO] [1497340512.904861970]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_1_0_b.stl with factor 1000
[ INFO] [1497340512.905067369]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_1_0_b.stl with factor 1000
[ INFO] [1497340512.905342371]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_1_0_f.stl with factor 1000
[ INFO] [1497340512.905612384]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_1_0_f.stl with factor 1000
[ INFO] [1497340512.982826482]: Convert mesh for link 'f_1_1_b'
[ INFO] [1497340512.983001200]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_1_1_b.stl with factor 1000
[ INFO] [1497340512.983873353]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_1_1_b.stl with factor 1000
[ INFO] [1497340512.984744323]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_1_1_f.stl with factor 1000
[ INFO] [1497340512.985027506]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_1_1_f.stl with factor 1000
[ INFO] [1497340513.074468761]: Convert mesh for link 'f_2_0_m'
[ INFO] [1497340513.074650907]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_2_0_m.stl with factor 1000
[ INFO] [1497340513.075332634]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_2_0_m.stl with factor 1000
[ INFO] [1497340513.075985096]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_2_0_b.stl with factor 1000
[ INFO] [1497340513.076172020]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_2_0_b.stl with factor 1000
[ INFO] [1497340513.076428883]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_2_0_f.stl with factor 1000
[ INFO] [1497340513.076685156]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_2_0_f.stl with factor 1000
[ INFO] [1497340513.149028906]: Convert mesh for link 'f_2_1_b'
[ INFO] [1497340513.149168207]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_2_1_b.stl with factor 1000
[ INFO] [1497340513.149981570]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_2_1_b.stl with factor 1000
[ INFO] [1497340513.150777306]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_2_1_f.stl with factor 1000
[ INFO] [1497340513.151040903]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_2_1_f.stl with factor 1000
[ INFO] [1497340513.236713815]: ### Urdf2GraspIt::postConvert for robot eagle_shoal
[ INFO] [1497340513.236875004]: ############### Getting XML
[ INFO] [1497340513.237560075]: Conversion done.
[ INFO] [1497340513.237735750]: urdf2inventor::FileIO::writeMeshFiles into /home/dex_hand/catkin_ws/src/eagle_shoal/urdf2graspit/
[ INFO] [1497340513.252261488]: Cleaning up...
[ INFO] [1497340513.252291655]: Done.
[urdf2graspit_node-1] process has finished cleanly
log file: /home/dex_hand/.ros/log/93297868-4fe3-11e7-8673-38d5472591a7/urdf2graspit_node-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done
`

But When I input the world/robot file, There are nothing at all.
Can you help me?

use the urdf2graspit package, always error to generate contact points.

[ INFO] [1504927114.111518864]: Clicked link jaco_6_hand_limb, point,-0.102241,0.00252118,-0.0020643 contacts_generator_node: /usr/include/eigen3/Eigen/src/Core/DenseCoeffsBase.h:337: Eigen::DenseCoeffsBase<Derived, 1>::Scalar& Eigen::DenseCoeffsBase<Derived, 1>::operator()(Eigen::DenseCoeffsBase<Derived, 1>::Index, Eigen::DenseCoeffsBase<Derived, 1>::Index) [with Derived = Eigen::Matrix<double, 3, 3>; Eigen::DenseCoeffsBase<Derived, 1>::Scalar = double; Eigen::DenseCoeffsBase<Derived, 1>::Index = long int]: Assertion row >= 0 && row < rows() && col >= 0 && col < cols()' failed.
`

how to obtain a urdf file?

now i just have 3d mesh file in SolidWorks, i want to obtain iv and xml file in graspit. so will I experience these conversion 3d mesh->urdf->graspit? thank you!

Opening world loads the gripper unsuccessfully

After launching the urdf with the urdf_viewer package (and applying the mesh_rotation) every link is in the correct spot.
But after using urdf2graspit the gripper looks like "unassembled", is it possible that the error is related to the dofValues parameter? I have tried using almost every joints combinations

grippergood
gripperoff

Error while loading world .xml file into the graspit_simulator

I run graspit_simulator, add my world file and gui crashes with:

Creating base...

Setting up 6 degrees of freedom...
Creating 2 kinematic chains (fingers)...
Chain 0:   Creating joints
   Joint 0
   Joint 1
  Creating links
   Link 0
   Link 1
  Creating dynamic joints
Chain 1:   Creating joints
   Joint 0
   Joint 1
  Creating links
   Link 0
   Link 1
  Creating dynamic joints
Segmentation fault (core dumped)

I am having a UR5e and Robotiq Gripper, mounted on the table.
Gripper RobotIQ85-2F mesh is the one from Stanley Innovation Robotiq 85 Visual Models, all the urdf2graspit preparations from graspit-pkgs are ok.

Unable to use my urdf with graspit

Hello Jennifer,

I am trying to integrate our gripper (Schunk PG70) with graspit using your graspit-pkgs. I am using the urdf_viewer to view my .urdf, and when I am happy with how it looks, I convert it to .xml using your urdf2graspit_node. Everything seems fine as I am able to import my robot in the graspit_interface. When I import an object and then try to plan some grasps though, the interface does nothing for a bit, as if it's planning, which is normal, and then the gripper turns and the fingers get stuck in the main body. At that point I get the LCP could not be solved. message. You can see the problem in the screenshots below.

Before:

graspit_interface_before

After:

graspit_interface_after
You can view my files here:
https://github.com/Roboskel-Manipulation/manos_graspit_config/tree/master/schunk_pg70

Thanks in advance for any kind of help.

George

Improvement: Use other quality evaluation in EigenGraspResult

So far, the energy of the simulated annealing search is passed on as grasp quality value. It is worth investigating if it's possible to compute other quality values.

This issue may be related to issue 1: Problems were encountered with using quality evaluation during the search. Both issues may be resolved in the same process.

It seems that during the search, this may be a bit of work with the original graspit code. See also this page in the GraspIt! manual.
However it could be possible to re-evaluate the results after planning, maybe after applying an AutoGrasp. The results could then be sorted according to the new quality measure. Repeated application of the planning algorithm could help to get more different results (due to the randomized search process).

Testing urdf2graspit on other arms

The current implementation was tested on the Jaco arm only.

For the Jaco arm, during conversion from urdf to graspit, the joint limits and velocities/efforts had to be negated, otherwise they would move in the wrong direction. I tried converting the model such that all joints rotate around -z axis, but this caused other issues with the rotations of the fingers (only in graspit, not if transforming the whole model and saving the new URDF...).

This issue should probably be further investigated. Not sure if it affects the result of urdf2graspit in other hands.

For now, a parameter has been added to Urdf2GraspIt which switches this negation on or off.

How to save a screenshot together with iv and xml files

Hi! I've managed to run
roslaunch grasp_planning_graspit_ros graspit_planner_jaco_example.launch
results_output_directory:=

and save the inventor and world files. However, I would also like to also save a "screenshot" of the scene - similar to Save Image when running graspit_interface. I've tried adding a function to GraspitSceneManager that does something like:
core->getIVmgr()->saveImage(filename.c_str());
The code can compile but it breaks when I try to execute it. Do you have any idea how to do this? Thanks a lot!

Extend options support of EigenGraspPlanner

Existing restrictions which may be eliminated:

  1. At this stage, only the "Simulated Annealing" planning type is supported. "Loop" and "Multi-Threaded" can probably be integrated fairly easily. So far, no support for the "On-line" type has been considered.
  2. Only the state description type STATE_AXIS_ANGLE (GraspIt datatype StateType) has been tested.
  3. Only the search energy type ENERGY_CONTACT (GraspIt datatype SearchEnergyType) has been tested.
    • Note: Problems were encountered with ENERGY_CONTACT_QUALITY (also with the original GraspIt simulator) when testing with the Jaco hand (see comment in private field EigenGraspPlanner::graspitSearchEnergyType).

Because of the restrictions 2) and 3), at the moment there is no public method in EigenGraspPlanner to change the state or energy type. By default, STATE_AXIS_ANGLE and ENERGY_CONTACT are used.

This may be a bit of a challenge with the existing graspit source. STATE_AXIS_ANGLE and ENERGY_CONTACT are the main types used in the existing Eigengrasp planner. Also, it seems that only simulated annealing has really been tested.
See also this page in the GraspIt! manual

Difference from original planGrasp

In graspit_commander, there is a function of planGrasps. What is the difference between this one and your implementation plan?

I read from your documentation that the resulting manipulation_msgs::Grasp messages return the grasp pose relative to the object. Is that not the case with the original planGrasps of graspit_commander?

Thank you so much!

Contact points revision

The generation of contact points needs a review. I have been wanting to do this for a while now, but haven't had the time yet.

The contact patch generation is adopted from some older version of the graspit code (I'm not sure any more if it was even used there when I found it). I'm unsure if that's still up-to-date, it would have to be checked. Also, since as described in this issue the contacts can now also be generated with the original graspit simulator, it would make sense to re-use this code.

graspit! I can not see the screen.

default

I have run the 'graspit_simulator'

but UI is blank.

QPixmap::fromMimeSource: Cannot find pixmap "filenew.xpm" in the mime source factory
QPixmap::fromMimeSource: Cannot find pixmap "fileopen.xpm" in the mime source factory
QPixmap::fromMimeSource: Cannot find pixmap "filesave.xpm" in the mime source factory
QPixmap::fromMimeSource: Cannot find pixmap "play.xpm" in the mime source factory
QPixmap::fromMimeSource: Cannot find pixmap "prevMark.xpm" in the mime source factory
QPixmap::fromMimeSource: Cannot find pixmap "mark.xpm" in the mime source factory
QPixmap::fromMimeSource: Cannot find pixmap "collide.xpm" in the mime source factory
QPixmap::fromMimeSource: Cannot find pixmap "translateTool.xpm" in the mime source factory
QPixmap::fromMimeSource: Cannot find pixmap "rotateTool.xpm" in the mime source factory
QPixmap::fromMimeSource: Cannot find pixmap "selectTool.xpm" in the mime source factory

and i failed to open world.xml

GraspitSceneManagerHeadless requiring x server

Hi Jenny,

Posting this more as notification for a quick work around trying to run grasp_planning via ssh. I don;'t have the error saved but it was something along the lines of Graspit: cannot establish connection to x server 0. Because I was runnning it via ssh, I could not user the normal fixes involving xhost. Instead, using a virtual x server. via xvfb-run did the trick.

From a rough trace, it seems that the problem actually originates within the graspit library rather than graspit-pkgs. I have a feeling it may be a simple check to see if any x server is reachable, throwing that error if its not. Might be a simple fix, but since the work around is also very easy, might not be worth the time. (I'd be happy to post a full trace/ error message if you'd like)

-Mario

urdf2graspit Segmentation fault

Hi there!

I was trying to convert my Allegro Hand to graspit but i can''t seem to succeed. I'm on ubuntu 14.04 and ros indigo. My command was:
rosrun urdf2graspit urdf2graspit_node ~/catkin_ws/src/allegro-hand-ros/allegro_hand_description/allegro_hand_description_right.urdf ~/catkin_ws/src/allegro-grasp hand_root joint_0.0 joint_12.0 joint_4.0 joint_8.0
And the output I got is:
semih@semih-ABRA-A5-V5-2:~/catkin_ws$ rosrun urdf2graspit urdf2graspit_node ~/catkin_ws/src/allegro-hand-ros/allegro_hand_description/allegro_hand_description_right.urdf ~/catkin_ws/src/allegro-grasp hand_root joint_0.0 joint_12.0 joint_4.0 joint_8.0
[ INFO] [1487865360.317826574]: URDF file: /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/allegro_hand_description_right.urdf
[ INFO] [1487865360.317880353]: Output dir: /home/semih/catkin_ws/src/allegro-grasp
[ INFO] [1487865360.317902483]: Hand root: hand_root
[ INFO] [1487865360.317920406]: Joint: joint_0.0
[ INFO] [1487865360.317932440]: Joint: joint_12.0
[ INFO] [1487865360.317944300]: Joint: joint_4.0
[ INFO] [1487865360.317955251]: Joint: joint_8.0
[ INFO] [1487865360.318326704]: output_material:
[ INFO] [1487865360.318723775]: scale_factor: <1000.000000>
[ INFO] [1487865360.319104789]: negate_joint_movement: <0>
[ INFO] [1487865360.320463164]: Starting model conversion...
[ INFO] [1487865360.320518059]: ### Loading from URDF file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/allegro_hand_description_right.urdf...
[ INFO] [1487865360.320827677]: Setting base model directory to /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description
[ INFO] [1487865360.322679489]: ### Converting files starting from link hand_root
[ INFO] [1487865360.322702876]: ### Preparing for DH conversion...
[ INFO] [1487865360.322715922]: ### Joining fixed links..
[ INFO] [1487865360.322734181]: ############### Joining fixed links
[ INFO] [1487865360.322750204]: Start from root link: hand_root
[ INFO] [1487865360.322819400]: ### Transforming rotation axes to z...
[ INFO] [1487865360.322842287]: ############### Aligning rotation axis to [0, 0, 1]
[ INFO] [1487865360.322886480]: ### Converting files...
[ INFO] [1487865360.322903203]: ### Urdf2GraspIt::pretConvert for robot allegro_hand_right
[ INFO] [1487865360.322927195]: ##### Computing DH parameters out of model
[ INFO] [1487865360.322940396]: ############### Getting DH params
[ INFO] [1487865360.322953043]: ### Starting DH conversion from link hand_root
[ INFO] [1487865360.322966944]: ======== Transforming joint joint_0.0 to DH parameters
[ INFO] [1487865360.322980593]: ======== Transforming joint joint_1.0 to DH parameters
[ INFO] [1487865360.323011264]: z-axises intersect! [0, 0, 1] at [0, 0, 0], [0, -1, 2.22045e-16] at [0, 0, 0.0164]
[ INFO] [1487865360.323042400]: ======== Transforming joint joint_2.0 to DH parameters
[ INFO] [1487865360.323059025]: ======== Transforming joint joint_3.0 to DH parameters
[ INFO] [1487865360.323074338]: ======== Transforming joint joint_12.0 to DH parameters
[ INFO] [1487865360.323087350]: ======== Transforming joint joint_13.0 to DH parameters
[ INFO] [1487865360.323107295]: DEBUG-INFO DHParams: Correcting alpha: [-1, 0, 2.22045e-16], [1, 0, 2.83277e-16]
[ INFO] [1487865360.323123062]: ======== Transforming joint joint_14.0 to DH parameters
[ INFO] [1487865360.323145960]: z-axises intersect! [-1, 0, 2.22045e-16] at [-0.0399, 0.005, -0.027], [-2.22045e-16, -1, 4.93038e-32] at [-0.0576, 0.005, -0.027]
[ INFO] [1487865360.323166839]: DEBUG-INFO DHParams: Correcting theta: [2.22045e-16, 0, 1], [-2.22045e-16, 6.12323e-17, -1]
[ INFO] [1487865360.323181009]: ======== Transforming joint joint_15.0 to DH parameters
[ INFO] [1487865360.323196267]: ======== Transforming joint joint_4.0 to DH parameters
[ INFO] [1487865360.323209432]: ======== Transforming joint joint_5.0 to DH parameters
[ INFO] [1487865360.323228914]: z-axises intersect! [0, 0, 1] at [0, 0, 0], [0, -1, 2.22045e-16] at [0, 0, 0.0164]
[ INFO] [1487865360.323277083]: ======== Transforming joint joint_6.0 to DH parameters
[ INFO] [1487865360.323293661]: ======== Transforming joint joint_7.0 to DH parameters
[ INFO] [1487865360.323308853]: ======== Transforming joint joint_8.0 to DH parameters
[ INFO] [1487865360.323322586]: ======== Transforming joint joint_9.0 to DH parameters
[ INFO] [1487865360.323342593]: z-axises intersect! [0, 0, 1] at [0, 0, 0], [0, -1, 2.22045e-16] at [0, 0, 0.0164]
[ INFO] [1487865360.323357189]: ======== Transforming joint joint_10.0 to DH parameters
[ INFO] [1487865360.323372278]: ======== Transforming joint joint_11.0 to DH parameters
[ INFO] [1487865360.323389641]: ############### Transform links to DH reference frames
[ INFO] [1487865360.323444612]: --- DH Parameters: ---
[ INFO] [1487865360.323463702]: joint_0.0: d=0.0164, r=0, theta=0, alpha=1.5708, dof_idx=0
[ INFO] [1487865360.323479294]: joint_1.0: d=0, r=0.054, theta=1.5708, alpha=0, dof_idx=1
[ INFO] [1487865360.323493983]: joint_2.0: d=0, r=0.0384, theta=0, alpha=0, dof_idx=2
[ INFO] [1487865360.323508520]: joint_3.0: d=0, r=0, theta=0, alpha=0, dof_idx=3
[ INFO] [1487865360.323523287]: joint_12.0: d=0.027, r=0.005, theta=1.5708, alpha=-1.5708, dof_idx=4
[ INFO] [1487865360.323537945]: joint_13.0: d=0.0177, r=0, theta=-1.5708, alpha=1.5708, dof_idx=5
[ INFO] [1487865360.323552432]: joint_14.0: d=0, r=0.0514, theta=1.5708, alpha=0, dof_idx=6
[ INFO] [1487865360.323566973]: joint_15.0: d=0, r=0, theta=0, alpha=0, dof_idx=7
[ INFO] [1487865360.323581288]: joint_4.0: d=0.0164, r=0, theta=0, alpha=1.5708, dof_idx=8
[ INFO] [1487865360.323595918]: joint_5.0: d=0, r=0.054, theta=1.5708, alpha=0, dof_idx=9
[ INFO] [1487865360.323610363]: joint_6.0: d=0, r=0.0384, theta=0, alpha=0, dof_idx=10
[ INFO] [1487865360.323624418]: joint_7.0: d=0, r=0, theta=0, alpha=0, dof_idx=11
[ INFO] [1487865360.323638713]: joint_8.0: d=0.0164, r=0, theta=0, alpha=1.5708, dof_idx=12
[ INFO] [1487865360.323653109]: joint_9.0: d=0, r=0.054, theta=1.5708, alpha=0, dof_idx=13
[ INFO] [1487865360.323667680]: joint_10.0: d=0, r=0.0384, theta=0, alpha=0, dof_idx=14
[ INFO] [1487865360.323681879]: joint_11.0: d=0, r=0, theta=0, alpha=0, dof_idx=15
[ INFO] [1487865360.323693893]: ##### Scaling DH parameters
[ INFO] [1487865360.323707552]: ############### Scaling model
[ INFO] [1487865360.323765971]: ############### Converting meshes
[ INFO] [1487865360.323788126]: Convert mesh for link 'hand_root'
[ INFO] [1487865360.352503118]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/base_link.STL with factor 1000
[ INFO] [1487865360.353169826]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/base_link.STL with factor 1000
[ INFO] [1487865360.381111647]: Convert mesh for link 'link_0.0'
[ INFO] [1487865360.422324023]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_0.0.STL with factor 1000
[ INFO] [1487865360.422541524]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_0.0.STL with factor 1000
Coin warning in SoBase::setName(): Bad characters in name '_visual_0_link_0.0'. Replacing with name '_visual_0_link_0_0'
Coin warning in SoBase::setName(): Bad characters in name '_link_0.0'. Replacing with name '_link_0_0'
[ INFO] [1487865360.433109641]: Convert mesh for link 'link_1.0'
[ INFO] [1487865360.433186530]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_1.0.STL with factor 1000
[ INFO] [1487865360.433368774]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_1.0.STL with factor 1000
Coin warning in SoBase::setName(): Bad characters in name '_visual_0_link_1.0'. Replacing with name '_visual_0_link_1_0'
Coin warning in SoBase::setName(): Bad characters in name '_link_1.0'. Replacing with name '_link_1_0'
[ INFO] [1487865360.445159858]: Convert mesh for link 'link_2.0'
[ INFO] [1487865360.445269595]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_2.0.STL with factor 1000
[ INFO] [1487865360.445488119]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_2.0.STL with factor 1000
Coin warning in SoBase::setName(): Bad characters in name '_visual_0_link_2.0'. Replacing with name '_visual_0_link_2_0'
Coin warning in SoBase::setName(): Bad characters in name '_link_2.0'. Replacing with name '_link_2_0'
[ INFO] [1487865360.453968215]: Convert mesh for link 'link_3.0'
[ INFO] [1487865360.454034524]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_3.0.STL with factor 1000
[ INFO] [1487865360.454135998]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_3.0.STL with factor 1000
Coin warning in SoBase::setName(): Bad characters in name '_visual_0_link_3.0'. Replacing with name '_visual_0_link_3_0'
[ INFO] [1487865360.454258345]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_3.0_tip.STL with factor 1000
[ INFO] [1487865360.454458503]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_3.0_tip.STL with factor 1000
Coin warning in SoBase::setName(): Bad characters in name '_visual_1_link_3.0'. Replacing with name '_visual_1_link_3_0'
Coin warning in SoBase::setName(): Bad characters in name '_link_3.0'. Replacing with name '_link_3_0'
[ INFO] [1487865360.469439630]: Convert mesh for link 'link_12.0'
[ INFO] [1487865360.469574626]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_12.0_right.STL with factor 1000
[ INFO] [1487865360.470240155]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_12.0_right.STL with factor 1000
Coin warning in SoBase::setName(): Bad characters in name '_visual_0_link_12.0'. Replacing with name '_visual_0_link_12_0'
Coin warning in SoBase::setName(): Bad characters in name '_link_12.0'. Replacing with name '_link_12_0'
[ INFO] [1487865360.506996159]: Convert mesh for link 'link_13.0'
[ INFO] [1487865360.507122141]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_13.0.STL with factor 1000
[ INFO] [1487865360.507283615]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_13.0.STL with factor 1000
Coin warning in SoBase::setName(): Bad characters in name '_visual_0_link_13.0'. Replacing with name '_visual_0_link_13_0'
Coin warning in SoBase::setName(): Bad characters in name '_link_13.0'. Replacing with name '_link_13_0'
[ INFO] [1487865360.510889341]: Convert mesh for link 'link_14.0'
[ INFO] [1487865360.510949537]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_14.0.STL with factor 1000
[ INFO] [1487865360.511092375]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_14.0.STL with factor 1000
Coin warning in SoBase::setName(): Bad characters in name '_visual_0_link_14.0'. Replacing with name '_visual_0_link_14_0'
Coin warning in SoBase::setName(): Bad characters in name '_link_14.0'. Replacing with name '_link_14_0'
[ INFO] [1487865360.518532106]: Convert mesh for link 'link_15.0'
[ INFO] [1487865360.518595875]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_15.0.STL with factor 1000
[ INFO] [1487865360.518736116]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_15.0.STL with factor 1000
Coin warning in SoBase::setName(): Bad characters in name '_visual_0_link_15.0'. Replacing with name '_visual_0_link_15_0'
[ INFO] [1487865360.518874935]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_15.0_tip.STL with factor 1000
[ INFO] [1487865360.519065277]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_15.0_tip.STL with factor 1000
Coin warning in SoBase::setName(): Bad characters in name '_visual_1_link_15.0'. Replacing with name '_visual_1_link_15_0'
Coin warning in SoBase::setName(): Bad characters in name '_link_15.0'. Replacing with name '_link_15_0'
[ INFO] [1487865360.538344687]: Convert mesh for link 'link_4.0'
[ INFO] [1487865360.538454084]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_0.0.STL with factor 1000
[ INFO] [1487865360.538677071]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_0.0.STL with factor 1000
Coin warning in SoBase::setName(): Bad characters in name '_visual_0_link_4.0'. Replacing with name '_visual_0_link_4_0'
Coin warning in SoBase::setName(): Bad characters in name '_link_4.0'. Replacing with name '_link_4_0'
[ INFO] [1487865360.549032017]: Convert mesh for link 'link_5.0'
[ INFO] [1487865360.549104952]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_1.0.STL with factor 1000
[ INFO] [1487865360.549292501]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_1.0.STL with factor 1000
Coin warning in SoBase::setName(): Bad characters in name '_visual_0_link_5.0'. Replacing with name '_visual_0_link_5_0'
Coin warning in SoBase::setName(): Bad characters in name '_link_5.0'. Replacing with name '_link_5_0'
[ INFO] [1487865360.560757470]: Convert mesh for link 'link_6.0'
[ INFO] [1487865360.560930394]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_2.0.STL with factor 1000
[ INFO] [1487865360.561228623]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_2.0.STL with factor 1000
Coin warning in SoBase::setName(): Bad characters in name '_visual_0_link_6.0'. Replacing with name '_visual_0_link_6_0'
Coin warning in SoBase::setName(): Bad characters in name '_link_6.0'. Replacing with name '_link_6_0'
[ INFO] [1487865360.570184856]: Convert mesh for link 'link_7.0'
[ INFO] [1487865360.570271119]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_3.0.STL with factor 1000
[ INFO] [1487865360.570406582]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_3.0.STL with factor 1000
Coin warning in SoBase::setName(): Bad characters in name '_visual_0_link_7.0'. Replacing with name '_visual_0_link_7_0'
[ INFO] [1487865360.570538719]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_3.0_tip.STL with factor 1000
[ INFO] [1487865360.570723149]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_3.0_tip.STL with factor 1000
Coin warning in SoBase::setName(): Bad characters in name '_visual_1_link_7.0'. Replacing with name '_visual_1_link_7_0'
Coin warning in SoBase::setName(): Bad characters in name '_link_7.0'. Replacing with name '_link_7_0'
[ INFO] [1487865360.585580016]: Convert mesh for link 'link_8.0'
[ INFO] [1487865360.585648046]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_0.0.STL with factor 1000
[ INFO] [1487865360.585825605]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_0.0.STL with factor 1000
Coin warning in SoBase::setName(): Bad characters in name '_visual_0_link_8.0'. Replacing with name '_visual_0_link_8_0'
Coin warning in SoBase::setName(): Bad characters in name '_link_8.0'. Replacing with name '_link_8_0'
[ INFO] [1487865360.596689663]: Convert mesh for link 'link_9.0'
[ INFO] [1487865360.596798463]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_1.0.STL with factor 1000
[ INFO] [1487865360.597050495]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_1.0.STL with factor 1000
Coin warning in SoBase::setName(): Bad characters in name '_visual_0_link_9.0'. Replacing with name '_visual_0_link_9_0'
Coin warning in SoBase::setName(): Bad characters in name '_link_9.0'. Replacing with name '_link_9_0'
[ INFO] [1487865360.608345435]: Convert mesh for link 'link_10.0'
[ INFO] [1487865360.608415736]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_2.0.STL with factor 1000
[ INFO] [1487865360.608580671]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_2.0.STL with factor 1000
Coin warning in SoBase::setName(): Bad characters in name '_visual_0_link_10.0'. Replacing with name '_visual_0_link_10_0'
Coin warning in SoBase::setName(): Bad characters in name '_link_10.0'. Replacing with name '_link_10_0'
[ INFO] [1487865360.616953647]: Convert mesh for link 'link_11.0'
[ INFO] [1487865360.617013129]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_3.0.STL with factor 1000
[ INFO] [1487865360.617107700]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_3.0.STL with factor 1000
Coin warning in SoBase::setName(): Bad characters in name '_visual_0_link_11.0'. Replacing with name '_visual_0_link_11_0'
[ INFO] [1487865360.617228612]: Converting mesh file /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_3.0_tip.STL with factor 1000
[ INFO] [1487865360.617413579]: Scaling the mesh /home/semih/catkin_ws/src/allegro-hand-ros/allegro_hand_description/meshes/link_3.0_tip.STL with factor 1000
Coin warning in SoBase::setName(): Bad characters in name '_visual_1_link_11.0'. Replacing with name '_visual_1_link_11_0'
Coin warning in SoBase::setName(): Bad characters in name '_link_11.0'. Replacing with name '_link_11_0'
[ INFO] [1487865360.635377698]: ### Urdf2GraspIt::postConvert for robot allegro_hand_right
Segmentation fault (core dumped)

Possible issue with GraspitSceneManagerHeadless GraspitCore Handling

Let me preface this with the fact that I am not very experienced with C++ and thread related structures so I apologize in advance if this seems like a silly issue. I was implementing a class that inherits GraspItAccessor by essentially using EigenGraspPlanner as template. Its a very simple class that retrieves the current hand, calls autograsp, then returns the dofs. I copied the necessary methods from EigenGraspPlanner (removing ivIdleCallback because this "planner" doesn't update states). The main problem I am having is during runtime. When an executable analogous to grasp_planning (except that it uses the autograsp planner rather than EigenGraspPlanner) that I'll call autograsp_planning is called repeatedly (in a for loop), something from the previous iteration remains initialized and I receive this stdout followed by hanging.

Singleton already set, overwriting!
Initializing GraspIt - autograsp_planning.cpp, 81
Enter INVENTOR thread loop - GraspItSceneManagerHeadless.cpp, 108
Starting with args GraspIt, --headless - GraspItSceneManagerHeadless.cpp, 114
Coin warning in SoQt::init(): This method should be called only once.
Coin error in SoType::createType(): a type with name ``SoComplexShape'' already created
Coin error in SoType::createType(): a type with name ``SoArrow'' already created
Coin error in SoType::createType(): a type with name ``SoTorquePointer'' already created
Created. - GraspItSceneManagerHeadless.cpp, 116
QObject::startTimer: QTimer can only be used with threads started with QThread
QObject::startTimer: QTimer can only be used with threads started with QThread
QObject::startTimer: QTimer can only be used with threads started with QThread
QObject::startTimer: QTimer can only be used with threads started with QThread
QApplication::exec: Must be called from the main thread
QObject::startTimer: QTimer can only be used with threads started with QThread
Exit INVENTOR thread loop - GraspItSceneManagerHeadless.cpp, 133

If I call autograsp_planning once and exit, there is no issue; however, for the sake of efficiency I would prefer not to. Below is the stdout that would normally precede the error. The class ContactGetter inherits GraspitAccessor. Also just for the sake of clarifcation, I am wrapping autograsp_planning for python and calling its method in a for loop (or list comprehension, no difference here) in python.

Getting hand - ContactGetter.cpp, 140
Performing autograsp - ContactGetter.cpp, 142
Getting hand dofs - ContactGetter.cpp, 160
Obtained hand dofs - ContactGetter.cpp, 170
Cleaning up - ContactGetter.cpp, 171
ContactGetter destructor - ContactGetter.cpp, 39
Removing idle listeners - ContactGetter.cpp, 40
Unregistering ContactGetter - GraspItSceneManager.cpp, 187
Exit ContactGetter destructor - ContactGetter.cpp, 58
GraspItSceneManagerHeadless::destroyCore() - GraspItSceneManagerHeadless.cpp, 60
Now exit Inventor thread. - GraspItSceneManagerHeadless.cpp, 77
Exit INVENTOR thread loop - GraspItSceneManagerHeadless.cpp, 132
QThreadStorage: Thread 0x7fbaa0001c40 exited after QThreadStorage 5 destroyed
GraspItSceneManager destructor - GraspItSceneManager.cpp, 93

I searching the errors and found that you had a similar issue in June when trying to communicate between the headless scene manager and graspitCore. From what I can tell above, it seems that my class ContactGetter destroys properly.

The two most relevant functions are included below:

std::vector<double> ContactGetter::autoGrasp(){
    PRINTMSG("Getting hand");
    Hand *h = getGraspItSceneManager()->getCurrentHand();
    PRINTMSG("Performing autograsp");
    GraspPlanningState gst = GraspPlanningState(h);
    const GraspPlanningState *s;
    s = &gst;
    if (!s->getHand()->autoGrasp(false))
    {
        PRINTWARN("Could not correctly open hand with auto-grasp, the pre-grasp state may not be ideal.");
    }
    
    const PostureState* handPosture = s->readPosture();
    if (!handPosture)
    {
        PRINTERROR("Posture is NULL!");
    }

    // std::string robotName="Robot1";
    // Robot *r = getGraspItSceneManager()->getRobot(robotName);
    // h = getGraspItSceneManager()->getCurrentHand();
    PRINTMSG("Getting hand dofs");
    const int numDOF = s->getHand()->getNumDOF();
    double * _dofs = new double[numDOF];
    handPosture->getHandDOF(_dofs);
    std::vector<double> dofs;
    for (int k = 0; k < numDOF; ++k)
    {
        dofs.push_back(_dofs[k]);
    }
    // r->getDOFVals(dofs);
    PRINTMSG("Obtained hand dofs");
    PRINTMSG("Cleaning up");
    // delete s;
    return dofs;
}

-------------------------------------
std::vector<double> quickGrasp(
    std::string& objectFilename, 
    std::string& robotFilename,
    Eigen::Vector3d& robPos, 
    const std::vector<double>& robRot)
{
    signal(SIGSEGV, handler);
    signal(SIGABRT, handler);
    PRINT_INIT_STD();
    PRINTMSG("Initializing GraspIt")
    SHARED_PTR<GraspIt::GraspItSceneManager> graspitMgr(new GraspIt::GraspItSceneManagerHeadless());  
    SHARED_PTR<GraspIt::ContactGetter> cg(new GraspIt::ContactGetter("ContactGetter", graspitMgr));
    GraspIt::EigenTransform robotTransform;
    GraspIt::EigenTransform objectTransform;
    // We want to keep the object at the absolute origin
    robotTransform.setIdentity();
    objectTransform.setIdentity();
    robotTransform.translate(robPos);
    // Have to do this because Eigen::Quaternion isn't covered by pybind/eigen
      // Eigen::Quaterniond q(2, 0, 1, -3); 
    Eigen::Quaterniond robRotQ(robRot[0], robRot[1], robRot[2], robRot[3]);
    robotTransform.rotate(robRotQ);
    // robotTransform.rotate(robRot);
    
    std::string robotName="Robot1";
    std::string objectName="Object1";

    if (graspitMgr->loadRobot(robotFilename, robotName, robotTransform) != 0)
    {
        PRINTERROR("Could not load robot");
        
    }

    if (graspitMgr->loadObject(objectFilename, objectName, true, objectTransform))
    {
        PRINTERROR("Could not load object");
    }
    
    std::vector<double> dofs = cg->autoGrasp();
    // cg.reset();
    // graspitMgr.reset();
    signal(SIGSEGV, handler);
    signal(SIGABRT, handler);
    // PRINT_INIT_STD();
    
    return dofs;
}

catkin error while compiling

Hello there!

I'm using Ubuntu 14.04 after successfully compiling convenience-pkgs, urdf-tools-pkg and graspit-pkgs, my ide can't resolve grasp_planning_graspit nor i can compile with catkin. Any idea what is this about?
By the way i erased graspit-simulator which couses bigger issues. So I think even if i could compile this i can't load world files right?

Choose final implementation for thread/mutex and shared pointers

At the moment thread-related headers and shared pointers are defined by macros. It is possible to switch between C++11 threads or using the boost libraries instead.

At some stage it should be decided which implementation to use and then get rid of the macros.

Decide whether to use EigenGraspPlanner or EigenGraspPlannerNoQt implementation

At the moment, EigenGraspPlannerNoQt is just an example for an implementation which does not use the Qt method, like EigenGraspPlanner does. See also this readme about this issue.

It should be decided whether to either:

  • keep EigenGraspPlannerNoQt just as an example / template, and keep main implementation as in EigenGraspPlanner, or
  • throw away either of the classes and opt to keep the other as main implementation, then called EigenGraspPlanner

How to access planning

Hi Jennifer,

First of all I think you have excellent code documentation although I couldn't find way to do what I want. What I need is to create my own planner. So how can I get access to whole joint space that has been reduced by eigengrasps?

energy function

Hi Jennifer:
By running rosrun grasp_planning_graspit graspit_simulator, I can see that the energy formulations include Contacts and Quality, Hand Contacts, Potential Quality, Autograsp Quality and so on. But from the original version, I see all of the energy formulations are different. Are there a matching between your energy functions and the original ones?

Thank you!

Install graspit-pkgs problem

Jenny,
when I'm installing your 'graspit-pkgs' package,
Step 1 and Step 2 to install system packages and required catkin packages is ok by following your Wiki.
I have git clone :
https://github.com/JenniferBuehler/graspit-pkgs.git
https://github.com/JenniferBuehler/joint-control-pkgs.git
https://github.com/JenniferBuehler/convenience-pkgs.git
https://github.com/JenniferBuehler/urdf-tools-pkgs.git
https://github.com/JenniferBuehler/jaco-arm-pkgs.git
in my catkin workspace .

But When catkin_make, it always has bug like :

/home/dex_hand/catkin_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13286:2: error: #endif without #if #endif ^ [ 4%] Built target _hand_dev_generate_messages_check_deps_finger [ 4%] Building CXX object graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/CMakeFiles/graspit.dir/include/DBase/moc_graspPlanningTask.cxx.o [ 4%] Built target _hand_dev_generate_messages_check_deps_hand /home/dex_hand/catkin_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13286:2: error: #endif without #if #endif ^ [ 4%] Built target logger_binding_boost [ 4%] Built target logger_binding_c++11 [ 4%] Built target nodelet_math [ 4%] Built target pluginlib_tutorials [ 4%] Building CXX object graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/CMakeFiles/graspit.dir/ui/moc_mainWindow.cxx.o [ 4%] Built target polygon_loader [ 4%] Building CXX object graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/CMakeFiles/graspit.dir/ui/moc_bodyPropDlg.cxx.o [ 4%] [ 4%] Building CXX object graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/CMakeFiles/graspit.dir/ui/moc_eigenGraspDlg.cxx.o Building CXX object graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/CMakeFiles/graspit_simulator.dir/ui/moc_eigenGraspDlg.cxx.o [ 4%] Building CXX object graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/CMakeFiles/graspit_simulator.dir/ui/EGPlanner/moc_egPlannerDlg.cxx.o /home/dex_hand/catkin_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13285:15: error: expected constructor, destructor, or type conversion before ‘;’ token ages_graspit(); } ^ /home/dex_hand/catkin_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13285:17: error: expected declaration before ‘}’ token ages_graspit(); } ^ /home/dex_hand/catkin_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13285:15: error: expected constructor, destructor, or type conversion before ‘;’ token ages_graspit(); } ^ /home/dex_hand/catkin_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13285:17: error: expected declaration before ‘}’ token ages_graspit(); } ^ make[2]: *** [graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/CMakeFiles/graspit_simulator.dir/qt_image_collection.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: *** [graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/CMakeFiles/graspit.dir/qt_image_collection.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs....

Improvements to urdf2graspit

  • Add a method to remove markers again in the contact points selector viewer. This can be done by re-clicking on the points for example.
  • Look into improving the contacts point generation (their mathematic definition). At the moment it's fairly generic.
  • Only meshes (no primitives) are supported for conversion into GraspIt format. This improvement is probably a more long-term aim.
  • Mesh conversion is now done with the ivconv package, which is adapted open source code. STL files work, but inventor files as input files don't - others weren't tested. It would be a good idea to move to another library to convert the meshes.
  • It would be a good idea to detach the marker generation from the actual conversion. So the robot can be converted once, and then the contact point generator can be run repeatedly on the existing result.

urdf2graspit problem

Hi, Jenny.
Bother you again.
I use your urdf2graspit to convert my own hand( Made by our lab)--named eagle_shoal.
I used other software to generate the eagle_shoal.urdf. And there are no problem when I use

1. check the urdf file.

roslaunch urdf_tutorial display.launch model:=<my-eagle_shoal.urdf-path>.
Both the DOF and my hand model are OK.

2. generate the graspit file.

roslaunch urdf2graspit example_urdf2graspit_eagleshoal.launch.
The example_urdf2graspit_eagleshoal.launch is :
`

<arg name="urdf_file" default="$(find eagle_shoal)/urdf/eagle_shoal.urdf"/>
<arg name="output_directory" default="$(find eagle_shoal)/urdf2graspit/"/>
<arg name="hand_root_link" default="p_b"/>
<arg name="finger_joint_names" default="f_3_0_j f_3_1_j f_2_0_m_j"/>
<arg name="scale_factor" default="1000"/>
<arg name="output_material" default="plastic"/>
<include file="$(find urdf2graspit)/launch/urdf2graspit.launch">
    <arg name="urdf_file" value="$(arg urdf_file)"/>
    <arg name="output_directory" value="$(arg output_directory)"/>
    <arg name="hand_root_link" value="$(arg hand_root_link)"/>
    <arg name="finger_joint_names" value="$(arg finger_joint_names)"/>
    <arg name="scale_factor" value="$(arg scale_factor)"/>
    <arg name="output_material" value="$(arg output_material)"/>
    <arg name="negate_joint_movement" value="false"/>
</include>
` It work well too . And the output info in the terminal is: ` roslaunch urdf2graspit example_urdf2graspit_eagleshoal.launch ... logging to /home/dex_hand/.ros/log/93297868-4fe3-11e7-8673-38d5472591a7/roslaunch-Dexhand-26880.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. started roslaunch server http://Dexhand:43926/ SUMMARY PARAMETERS * /rosdistro: indigo * /rosversion: 1.11.21 * /urdf2graspit_node/negate_joint_movement: False * /urdf2graspit_node/output_material: plastic * /urdf2graspit_node/scale_factor: 1000 * /urdf2graspit_node/visual_corr_axis_angle: 0 * /urdf2graspit_node/visual_corr_axis_x: 1 * /urdf2graspit_node/visual_corr_axis_y: 0 * /urdf2graspit_node/visual_corr_axis_z: 0 NODES / urdf2graspit_node (urdf2graspit/urdf2graspit_node) ROS_MASTER_URI=http://localhost:11311 core service [/rosout] found process[urdf2graspit_node-1]: started with pid [26944] [ INFO] [1497340512.333904413]: URDF file: /home/dex_hand/catkin_ws/src/eagle_shoal/urdf/eagle_shoal.urdf [ INFO] [1497340512.333968639]: Output dir: /home/dex_hand/catkin_ws/src/eagle_shoal/urdf2graspit/ [ INFO] [1497340512.333983845]: Hand root: p_b [ INFO] [1497340512.334009260]: Joint: f_3_0_j [ INFO] [1497340512.334024797]: Joint: f_3_1_j [ INFO] [1497340512.334036268]: Joint: f_2_0_m_j [ INFO] [1497340512.335545647]: output_material: [ INFO] [1497340512.336926511]: scale_factor: <1000.000000> [ INFO] [1497340512.338362626]: negate_joint_movement: <0> [ INFO] [1497340512.344182770]: Starting model conversion... [ INFO] [1497340512.344287567]: ### Loading from URDF file /home/dex_hand/catkin_ws/src/eagle_shoal/urdf/eagle_shoal.urdf... [ INFO] [1497340512.344772620]: Setting base model directory to /home/dex_hand/catkin_ws/src/eagle_shoal/urdf [ INFO] [1497340512.346564948]: ### Converting files starting from link p_b [ INFO] [1497340512.346593622]: ### Preparing for DH conversion... [ INFO] [1497340512.346607012]: ### Joining fixed links.. [ INFO] [1497340512.346629277]: ############### Joining fixed links [ INFO] [1497340512.346648887]: Start from root link: p_b [ INFO] [1497340512.346842479]: Joining fixed joint (f_0_0_b_j) between f_0_0_m and f_0_0_b [ INFO] [1497340512.347805164]: Joining fixed joint (f_0_0_f_j) between f_0_0_m and f_0_0_f [ INFO] [1497340512.348078035]: Joining fixed joint (f_0_1_f_j) between f_0_1_b and f_0_1_f [ INFO] [1497340512.348323037]: Joining fixed joint (f_b_0_j) between f_3_0 and f_b_0 [ INFO] [1497340512.348742767]: Joining fixed joint (f_1_0_b_j) between f_1_0_m and f_1_0_b [ INFO] [1497340512.348983842]: Joining fixed joint (f_1_0_f_j) between f_1_0_m and f_1_0_f [ INFO] [1497340512.349227939]: Joining fixed joint (f_1_1_f_j) between f_1_1_b and f_1_1_f [ INFO] [1497340512.349464231]: Joining fixed joint (f_b_1_j) between f_3_1 and f_b_1 [ INFO] [1497340512.349805628]: Joining fixed joint (f_2_0_b_j) between f_2_0_m and f_2_0_b [ INFO] [1497340512.350045724]: Joining fixed joint (f_2_0_f_j) between f_2_0_m and f_2_0_f [ INFO] [1497340512.350290110]: Joining fixed joint (f_2_1_f_j) between f_2_1_b and f_2_1_f [ INFO] [1497340512.350526686]: Joining fixed joint (f_b_2_j) between f_3_2 and f_b_2 [ INFO] [1497340512.350857867]: Joining fixed joint (f_3_2_j) between p_b and f_3_2 [ INFO] [1497340512.351379913]: ### Transforming rotation axes to z... [ INFO] [1497340512.351422572]: ############### Aligning rotation axis to [0, 0, 1] [ INFO] [1497340512.351568438]: ### Converting files... [ INFO] [1497340512.351617982]: ### Urdf2GraspIt::pretConvert for robot eagle_shoal [ INFO] [1497340512.351689125]: ##### Computing DH parameters out of model [ INFO] [1497340512.351706596]: ############### Getting DH params [ INFO] [1497340512.351756756]: ### Starting DH conversion from link p_b [ INFO] [1497340512.351782302]: ======== Transforming joint f_3_0_j to DH parameters. [ INFO] [1497340512.351817594]: ======== Transforming joint f_0_0_m_j to DH parameters. [ INFO] [1497340512.352224200]: ======== Transforming joint f_0_1_b_j to DH parameters. [ INFO] [1497340512.352426168]: DEBUG-INFO DHParam: Parallel case for getCommonNormal [ INFO] [1497340512.352453907]: DEBUG-INFO DHParam: Parallel case for getAlpha [ INFO] [1497340512.352565090]: ======== Transforming joint f_3_1_j to DH parameters. [ INFO] [1497340512.352604487]: ======== Transforming joint f_1_0_m_j to DH parameters. [ INFO] [1497340512.352792246]: DEBUG-INFO DHParams: Correcting alpha (is 1.5708): [0, 1, -3.55271e-15], [0, -1, -3.49148e-15] [ INFO] [1497340512.352829618]: DEBUG-INFO: Translation along z parallel to z, but not equal, so d is negative [ INFO] [1497340512.352922502]: ======== Transforming joint f_1_1_b_j to DH parameters. [ INFO] [1497340512.353095625]: DEBUG-INFO DHParam: Parallel case for getCommonNormal [ INFO] [1497340512.353121561]: DEBUG-INFO DHParam: Parallel case for getAlpha [ INFO] [1497340512.353229833]: ======== Transforming joint f_2_0_m_j to DH parameters. [ INFO] [1497340512.353268261]: ======== Transforming joint f_2_1_b_j to DH parameters. [ INFO] [1497340512.353425184]: DEBUG-INFO DHParam: Parallel case for getCommonNormal [ INFO] [1497340512.353450086]: DEBUG-INFO DHParam: Parallel case for getAlpha [ INFO] [1497340512.353561152]: ############### Transform links to DH reference frames [ INFO] [1497340512.357831351]: --- DH Parameters: --- [ INFO] [1497340512.357863410]: f_3_0_j: d=0.02985, r=0.049, theta=0, alpha=1.5708, dof_idx=0 [ INFO] [1497340512.357879095]: f_0_0_m_j: d=0, r=0.0570041, theta=1.5708, alpha=0, dof_idx=1 [ INFO] [1497340512.357893010]: f_0_1_b_j: d=0, r=0, theta=0, alpha=0, dof_idx=2 [ INFO] [1497340512.357908934]: f_3_1_j: d=-0.02985, r=0.049, theta=0, alpha=-1.5708, dof_idx=3 [ INFO] [1497340512.357924369]: f_1_0_m_j: d=0, r=0.0570041, theta=1.5708, alpha=0, dof_idx=4 [ INFO] [1497340512.357939607]: f_1_1_b_j: d=0, r=0, theta=0, alpha=0, dof_idx=5 [ INFO] [1497340512.357973652]: f_2_0_m_j: d=0, r=0.0570041, theta=1.5708, alpha=0, dof_idx=6 [ INFO] [1497340512.357988412]: f_2_1_b_j: d=0, r=0, theta=0, alpha=0, dof_idx=7 [ INFO] [1497340512.358001468]: ##### Scaling DH parameters [ INFO] [1497340512.358030202]: ############### Scaling model [ INFO] [1497340512.363748709]: ############### Converting meshes [ INFO] [1497340512.363819653]: Convert mesh for link 'p_b' [ INFO] [1497340512.422547776]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/p_b.stl with factor 1000 [ INFO] [1497340512.424849174]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/p_b.stl with factor 1000 [ INFO] [1497340512.426860987]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_3_2.stl with factor 1000 [ INFO] [1497340512.427210720]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_3_2.stl with factor 1000 [ INFO] [1497340512.427522288]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_b_2.stl with factor 1000 [ INFO] [1497340512.427976723]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_b_2.stl with factor 1000 [ INFO] [1497340512.579489333]: Convert mesh for link 'f_3_0' [ INFO] [1497340512.579696412]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_3_0.stl with factor 1000 [ INFO] [1497340512.580286934]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_3_0.stl with factor 1000 [ INFO] [1497340512.580915802]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_b_0.stl with factor 1000 [ INFO] [1497340512.581412490]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_b_0.stl with factor 1000 [ INFO] [1497340512.653214075]: Convert mesh for link 'f_0_0_m' [ INFO] [1497340512.653375112]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_0_0_m.stl with factor 1000 [ INFO] [1497340512.654031127]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_0_0_m.stl with factor 1000 [ INFO] [1497340512.654714492]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_0_0_b.stl with factor 1000 [ INFO] [1497340512.654911829]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_0_0_b.stl with factor 1000 [ INFO] [1497340512.655184432]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_0_0_f.stl with factor 1000 [ INFO] [1497340512.655455718]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_0_0_f.stl with factor 1000 [ INFO] [1497340512.734435922]: Convert mesh for link 'f_0_1_b' [ INFO] [1497340512.734607132]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_0_1_b.stl with factor 1000 [ INFO] [1497340512.735466058]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_0_1_b.stl with factor 1000 [ INFO] [1497340512.736327401]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_0_1_f.stl with factor 1000 [ INFO] [1497340512.736609961]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_0_1_f.stl with factor 1000 [ INFO] [1497340512.828802225]: Convert mesh for link 'f_3_1' [ INFO] [1497340512.829014922]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_3_1.stl with factor 1000 [ INFO] [1497340512.829592966]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_3_1.stl with factor 1000 [ INFO] [1497340512.830171831]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_b_1.stl with factor 1000 [ INFO] [1497340512.830657284]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_b_1.stl with factor 1000 [ INFO] [1497340512.903366484]: Convert mesh for link 'f_1_0_m' [ INFO] [1497340512.903522302]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_1_0_m.stl with factor 1000 [ INFO] [1497340512.904186382]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_1_0_m.stl with factor 1000 [ INFO] [1497340512.904861970]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_1_0_b.stl with factor 1000 [ INFO] [1497340512.905067369]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_1_0_b.stl with factor 1000 [ INFO] [1497340512.905342371]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_1_0_f.stl with factor 1000 [ INFO] [1497340512.905612384]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_1_0_f.stl with factor 1000 [ INFO] [1497340512.982826482]: Convert mesh for link 'f_1_1_b' [ INFO] [1497340512.983001200]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_1_1_b.stl with factor 1000 [ INFO] [1497340512.983873353]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_1_1_b.stl with factor 1000 [ INFO] [1497340512.984744323]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_1_1_f.stl with factor 1000 [ INFO] [1497340512.985027506]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_1_1_f.stl with factor 1000 [ INFO] [1497340513.074468761]: Convert mesh for link 'f_2_0_m' [ INFO] [1497340513.074650907]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_2_0_m.stl with factor 1000 [ INFO] [1497340513.075332634]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_2_0_m.stl with factor 1000 [ INFO] [1497340513.075985096]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_2_0_b.stl with factor 1000 [ INFO] [1497340513.076172020]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_2_0_b.stl with factor 1000 [ INFO] [1497340513.076428883]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_2_0_f.stl with factor 1000 [ INFO] [1497340513.076685156]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_2_0_f.stl with factor 1000 [ INFO] [1497340513.149028906]: Convert mesh for link 'f_2_1_b' [ INFO] [1497340513.149168207]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_2_1_b.stl with factor 1000 [ INFO] [1497340513.149981570]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_2_1_b.stl with factor 1000 [ INFO] [1497340513.150777306]: Converting mesh file /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_2_1_f.stl with factor 1000 [ INFO] [1497340513.151040903]: Scaling the mesh /home/dex_hand/catkin_ws/src/eagle_shoal/meshes/f_2_1_f.stl with factor 1000 [ INFO] [1497340513.236713815]: ### Urdf2GraspIt::postConvert for robot eagle_shoal [ INFO] [1497340513.236875004]: ############### Getting XML [ INFO] [1497340513.237560075]: Conversion done. [ INFO] [1497340513.237735750]: urdf2inventor::FileIO::writeMeshFiles into /home/dex_hand/catkin_ws/src/eagle_shoal/urdf2graspit/ [ INFO] [1497340513.252261488]: Cleaning up... [ INFO] [1497340513.252291655]: Done. [urdf2graspit_node-1] process has finished cleanly log file: /home/dex_hand/.ros/log/93297868-4fe3-11e7-8673-38d5472591a7/urdf2graspit_node-1*.log all processes on machine have died, roslaunch will exit shutting down processing monitor... ... shutting down processing monitor complete done ` But When I input the world/robot file, There are nothing at all. Can you help me?

urdf2graspit fails to generate wsg_50 contacts/fingers

Hi,

I'm trying to use the Schunk WSG 50 gripper in GraspIt. nalt/wsg50-ros-pkg contains a URDF of the hand that I'm trying to convert. I'm running Ubuntu 16.04 with ROS Kinetic and using the latest convenience-pkgs, graspit-pkgs. and urdf-tools-pkgs.

This conversion command seems to generate the GraspIt configuration correctly:
rosrun urdf2graspit urdf2graspit_node src/wsg50-ros-pkg/wsg_50_simulation/urdf/wsg_50.urdf schunk_wsg_50 base_link base_joint_gripper_left base_joint_gripper_right

The joints that the traverser finds are:

base_joint_gripper_left
base_joint_gripper_right
guide_joint_finger_left
guide_joint_finger_right

My generated configuration contains: eigen iv wsg_50.xml

When I try to load the model into GraspIt, the base of the hand appears, but the fingers don't. Here's the output from GraspIt:

Creating base...

Setting up 2 degrees of freedom...
Creating 2 kinematic chains (fingers)...
Chain 0: Creating joints
Joint 0
Creating links
Link 0
Creating dynamic joints
Chain 1: Creating joints
Joint 0
Creating links
Link 0
Creating dynamic joints
DOF default value too large; setting to max
DOF default value too small; setting to min
No normalization data found; using factors of 1.0
Read 1 eigengrasps from EG file
Using eigengrasps from file: eigen/eigen.xml
Could not open /home/matt/Software/graspit/models/robots/wsg_50/virtual/contacts.xml
Failed to load virtual contacts from file virtual/contacts.xml

I also tried to generate a new URDF from wsg_50.urdf.xacro:
rosrun xacro xacro --inorder src/wsg50-ros-pkg/wsg_50_simulation/urdf/wsg_50.urdf.xacro > src/wsg50-ros-pkg/wsg_50_simulation/urdf/new_wsg_50.urdf

However, when I try to generate a GraspIt config using rosrun urdf2graspit urdf2graspit_node src/wsg50-ros-pkg/wsg_50_simulation/urdf/new_wsg_50.urdf schunk_wsg_50 base_link base_joint_gripper_left base_joint_gripper_right, I get this error:

[ INFO] [1557961713.465940586]: URDF file: src/wsg50-ros-pkg/wsg_50_simulation/urdf/new_wsg_50.urdf
[ INFO] [1557961713.466011676]: Output dir: schunk_wsg_50
[ INFO] [1557961713.466043198]: Hand root: base_link
[ INFO] [1557961713.466055359]: Joint: base_joint_gripper_left
[ INFO] [1557961713.466069899]: Joint: base_joint_gripper_right
[ INFO] [1557961713.466476938]: output_material:
[ INFO] [1557961713.467035813]: scale_factor: <1000.000000>
[ INFO] [1557961713.467518663]: negate_joint_movement: <0>
[ INFO] [1557961713.469093656]: Starting model conversion...
[ INFO] [1557961713.469228798]: ### Loading from URDF file src/wsg50-ros-pkg/wsg_50_simulation/urdf/new_wsg_50.urdf...
[ INFO] [1557961713.469360746]: Setting base model directory to /home/matt/ros/urdf/src/wsg50-ros-pkg/wsg_50_simulation/urdf
[ERROR] [1557961713.469495546]: No link elements found in urdf file
[ERROR] [1557961713.469534689]: Could not load model from XML string
[ERROR] [1557961713.469543813]: Could not load file
[ERROR] [1557961713.469553800]: Could not load file
[ERROR] [1557961713.469569179]: Failed to process.

Please let me know if you need more info from me to reproduce this issue.
Thanks,
Matt

Improvement: extend GraspItDatabaseManager

GraspItDatabaseManager still needs methods to

  • remove models from the database again
  • to save the database to file and load from that file

It should also be investigated whether the main interface should be adapted in order to offer better support for integration with the code in the original graspit DBase classes.

Pre-grasp state computation still not 100% working

The pre-grasp state computation (grasp_planning_graspit::EigenGraspPlanner::getPregraspJointDOFs) is not working reliably yet. It just opens the hand completely in the cases I tested so far.
There are some problems with the GraspIt! methods Robot::autoGrasp() and Robot::quickOpen() and collisions being present (the latter being a "hack" of GraspIt!, but so far the only method with the functionality to open the hand until no contacts detected).

This issue needs more testing and probably a new method to replace the GraspIt! quickOpen().

How to obtain object bounding box and reposition robot?

I am working with an object database that I imported from Shapenet (as .wrl). At the moment grasp_planner.cpp places both the hand and the object at the origin which tends to lead towards the robot grabbing the object near that location (or at times grabbing objects from the interior, ie the hand is grabbing from an interior surface). I would like to be able to position the robot's hand along positions on these object's bounding boxes. I was thinking that I could just grab the max and min indeces from the object files (maybe by reading the wrl file directly). I noticed around line 247 of grasp_planner.cpp that it is possible to transform these objects using the translate method. I was wondering where to find the documentation of that method (I probably missed it in the ros docs). Does it just receive a 3d vector for position relative to the origin (ie replace the input in line 251)?

Boost version conflict causes build error

Hello, I'm interested in using this package on other robot arms.

My machine is on 16.04 with two boost versions 1.58 (system) and 1.66 (from source). It seems that in order to use the graspit_planning package, I would need at least 1.66. But rospack uses 1.58 by default in system ros installation. Namely, I won't be able to catkin_make successfully when using 1.58 solely. If I build with 1.66 and ignore the boost warnings, rospack will throw segfault when I run rosrun urdf2graspit urdf2graspit_node. So, I'm wondering if there's a workaround for this issue.

Misaligned axis when converting from urdf to graspit

I have been trying to convert allegro hand to graspit!. Everything looks good except the thumb link. The axes on the thumb link are a bit off.

urdf2graspit.txt is the output of the conversion. I just modified the example to work for my urdf.

Here is an image of the hand in graspit environment
urdf2graspit

GWS projection

Hi when I want to get the GWS projection like the paper Fig1:
image
Fig 1 paper image
I only get an empty result like Fig2 either I fix tx,ty,tz or fx,fy,fz with Fig3 config:
image
Fig2 my result
image
Fig3 projection parameters
What I did was:

  1. run simple_planning_tutorial.cpp with dlr_flask.xml (already added contact tag);
  2. open generated world in simulator and use GWS projection with the parameter mentioned above.

Is there a problem here? Thanks for your time and help!

Using urdf2graspit with single joint hand

Hello @JenniferBuehler

First of all thanks for the great set of packages, they save a lot of time for getting started with GraspIt!.

I am currently trying to convert my robot's end-effector model from urdf to graspit. It has a parallel gripper controlled with one actuated joint. So when I try to run urdf2graspit I am getting following error:

[ERROR] [1521939504.622503746]: Not enough arguments!
[ INFO] [1521939504.622523805]: Usage: /home/tarik/ros_ws/devel/lib/urdf2graspit/urdf2graspit_node <urdf-file> <output-directory> <palm link name> <finger joint name 0> ... <finger joint name n>

I am running as follows:

rosrun urdf2graspit urdf2graspit_node /opt/ros/kinetic/share/hsrb_description/robots/hsrb.urdf /home/tarik/ros_ws/src/frasier_graspit/models hand_palm_link hand_motor_joint

I checked the source code and it is throwing this error when the number of arguments is less than 6 so I guess it is expecting at least two joints.
Do you think I can fix this somehow?

Best,

make install error

Hello Jennifer,

I am trying to install graspit and graspit-pkgs following the instructions in your wiki and when i am running the make install command i get the following error.
Screenshot from 2019-04-03 12-49-18

Do you know if I am doing anything wrong? Thank you in advance.

Multi-threading support for Eigengrasp planner

At the moment, the interface of the Eigengrasp planner supports only single-threaded access.
Specifically, after calling method EigenGraspPlanner::plan(), subsequent EigenGraspPlanner::getResults() will retrieve the last results produced by plan(). And there are other limitations (with the GraspIt! world itself) which don't allow multiple simultaneous planning tasks. This allows the interface to be used by one robot only.
Accordingly, the class grasp_planning_graspit_ros::GraspItServices is limited to similar single-threaded access.

It would be nice to provide an implementation, at least of GraspItServices, which allows serving multiple simultaneous planning requests. The easiest way to implement this at the moment would probably be to create a separate GraspIt! world (and planner instance) for each request, but this would mean that each request must maintain its own database as well. It's not as quickly implemented as it seems at first glance.

energy 0

Hi Jennifer,
When I try to run simple_planning_tutorial.cpp with other world like dlr_flask.xml instead of jaco, I always get the following results:

=== EigenGraspPlanner update === - EigenGraspPlanner.cpp, 1042
Current Step: 65000 - EigenGraspPlanner.cpp, 1064
Energy: 0 - EigenGraspPlanner.cpp, 1152
=== EigenGraspPlanner update === - EigenGraspPlanner.cpp, 1042
Current Step: 65100 - EigenGraspPlanner.cpp, 1064
Energy: 0 - EigenGraspPlanner.cpp, 1152
=== EigenGraspPlanner update === - EigenGraspPlanner.cpp, 1042
Current Step: 65200 - EigenGraspPlanner.cpp, 1064
Energy: 0 - EigenGraspPlanner.cpp, 1152
Neighbor gen loops: 11
=== EigenGraspPlanner update === - EigenGraspPlanner.cpp, 1042
Current Step: 65300 - EigenGraspPlanner.cpp, 1064
Energy: 0 - EigenGraspPlanner.cpp, 1152
=== EigenGraspPlanner update === - EigenGraspPlanner.cpp, 1042
Current Step: 65400 - EigenGraspPlanner.cpp, 1064
Energy: 0 - EigenGraspPlanner.cpp, 1152
Neighbor gen loops: 11
=== EigenGraspPlanner update === - EigenGraspPlanner.cpp, 1042
Current Step: 65500 - EigenGraspPlanner.cpp, 1064
Energy: 0 - EigenGraspPlanner.cpp, 1152

Why it only shows energy 0? Thanks!

Catkin error when building graspit_external

Hi there! I run into the following errors when I try to build graspit-pkgs with catkin_make:

[18%] Building CXX object graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/CMakeFiles/graspit_simulator.dir/include/robots/moc_barrett.cxx.o
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp: In function ‘QImage uic_findImage(const QString&)’:
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13205:51: error: ‘const struct EmbedImage’ has no member named ‘colorTab22’
                         (QRgb*)embed_image_vec[i].colorTab22, 22, 32, (const unsigned char*)image_21_data, 123, 0, 0, true, "editcopy" },
                                                   ^
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13205:136: error: expected ‘)’ before ‘}’ token
                         (QRgb*)embed_image_vec[i].colorTab22, 22, 32, (const unsigned char*)image_21_data, 123, 0, 0, true, "editcopy" },
                                                                                                                                        ^
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13205:136: error: expected ‘,’ or ‘;’ before ‘}’ token
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13205:137: error: expected primary-expression before ‘,’ token
                         (QRgb*)embed_image_vec[i].colorTab22, 22, 32, (const unsigned char*)image_21_data, 123, 0, 0, true, "editcopy" },
                                                                                                                                         ^
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13206:5: error: expected primary-expression before ‘{’ token
     { 22, 22, 32, (const unsigned char*)image_22_data, 149, 0, 0, true, "editpaste" },
     ^
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13206:5: error: expected ‘;’ before ‘{’ token
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13206:86: error: expected primary-expression before ‘,’ token
     { 22, 22, 32, (const unsigned char*)image_22_data, 149, 0, 0, true, "editpaste" },
                                                                                      ^
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13207:5: error: expected primary-expression before ‘{’ token
     { 22, 22, 32, (const unsigned char*)image_23_data, 480, 0, 0, true, "searchfind" },
     ^
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13207:5: error: expected ‘;’ before ‘{’ token
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13207:87: error: expected primary-expression before ‘,’ token
     { 22, 22, 32, (const unsigned char*)image_23_data, 480, 0, 0, true, "searchfind" },
                                                                                       ^
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13208:5: error: expected primary-expression before ‘{’ token
     { 0, 0, 0, 0, 0, 0, 0, 0, 0 }
     ^
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13208:5: error: expected ‘;’ before ‘{’ token
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13212:1: error: a function-definition is not allowed here before ‘{’ token
 {
 ^
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13280:45: error: expected ‘}’ at end of input
 static StaticInitImages_graspit staticImages;
                                             ^
make[2]: *** [graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/CMakeFiles/graspit.dir/qt_image_collection.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 18%] /home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp: In function ‘QImage uic_findImage(const QString&)’:
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13205:51: error: ‘const struct EmbedImage’ has no member named ‘colorTab22’
                         (QRgb*)embed_image_vec[i].colorTab22, 22, 32, (const unsigned char*)image_21_data, 123, 0, 0, true, "editcopy" },
                                                   ^
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13205:136: error: expected ‘)’ before ‘}’ token
                         (QRgb*)embed_image_vec[i].colorTab22, 22, 32, (const unsigned char*)image_21_data, 123, 0, 0, true, "editcopy" },
                                                                                                                                        ^
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13205:136: error: expected ‘,’ or ‘;’ before ‘}’ token
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13205:137: error: expected primary-expression before ‘,’ token
                         (QRgb*)embed_image_vec[i].colorTab22, 22, 32, (const unsigned char*)image_21_data, 123, 0, 0, true, "editcopy" },
                                                                                                                                         ^
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13206:5: error: expected primary-expression before ‘{’ token
     { 22, 22, 32, (const unsigned char*)image_22_data, 149, 0, 0, true, "editpaste" },
     ^
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13206:5: error: expected ‘;’ before ‘{’ token
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13206:86: error: expected primary-expression before ‘,’ token
     { 22, 22, 32, (const unsigned char*)image_22_data, 149, 0, 0, true, "editpaste" },
                                                                                      ^
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13207:5: error: expected primary-expression before ‘{’ token
     { 22, 22, 32, (const unsigned char*)image_23_data, 480, 0, 0, true, "searchfind" },
     ^
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13207:5: error: expected ‘;’ before ‘{’ token
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13207:87: error: expected primary-expression before ‘,’ token
     { 22, 22, 32, (const unsigned char*)image_23_data, 480, 0, 0, true, "searchfind" },
                                                                                       ^
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13208:5: error: expected primary-expression before ‘{’ token
     { 0, 0, 0, 0, 0, 0, 0, 0, 0 }
     ^
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13208:5: error: expected ‘;’ before ‘{’ token
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13212:1: error: a function-definition is not allowed here before ‘{’ token
 {
 ^
/home/jack/ros_stuff/my_ws/build/graspit-pkgs/grasp_planning_graspit/graspit_external/graspit-build/qt_image_collection.cpp:13280:45: error: expected ‘}’ at end of input
 static StaticInitImages_graspit staticImages;
                                             ^

For context, I just deleted this workspace's build and devel directories. Also, catkin didn't complain in the past when I catkin_made the workspace with this metapackage. Although I do not know if it pulled and built graspit then.

Thanks!
Jack

Wiki tutorial edit: Eigengrasp Planner Example and GraspIt API ROS Wrapper

For the Eigengrasp Planner Example and GraspIt API ROS Wrapper tutorials, in the Inspect the Results section, the instructions say to run the command rosrun graspit graspit_simulator. This returns error [rospack] Error: package 'graspit' not found. I looked at the subsequently mentioned tutorial for the GraspIt! simulator and ran rosrun grasp_planning_graspit graspit_simulator_standalone instead, which was successful. I was then able to open up the world files of the results from there.

My comprehension of what I am doing is still minimal so please feel free to correct me if I am wrong. I was able to reproduce each of the other steps in the tutorial. Thanks for the tutorials!

P.S. Is there a Q/A location for asking general-use questions of this program; should I open issues or email you through your site? And what is the best way to know when I should re-clone your latest updates to my local storage (i.e. seg fault fixes vs wiki edits)? Thank you for your time!

Object addition to graspit world runs into infinite loop

Hello @JenniferBuehler ,
I am adding some graspable object in graspit world along with my robot.I do have some obstacle over which I am placing this graspable object.Pose for this object is basically fetched through pose estimation running on my machine. I am getting following logs and it goes on infinitily printing it without planning in some cases.

INFO] [1504805605.651663695]: Now starting the planning process... - GraspItServices.cpp, 416
[ INFO] [1504805605.651717189]: Initializing planner type - EigenGraspPlanner.cpp, 953
[ INFO] [1504805605.651761143]: Initiating planning, trial #0 - EigenGraspPlanner.cpp, 359
[ INFO] [1504805605.651783316]: Waiting for planning algorithm to finish... - EigenGraspPlanner.cpp, 364
[ INFO] [1504805605.651820976]: ### Start planner! ### - EigenGraspPlanner.cpp, 220
[ INFO] [1504805605.651845964]: Entering planner loop... - EigenGraspPlanner.cpp, 237
created new L1 Norm GWS.
Neighbor gen loops: 11
Neighbor gen loops: 11
Neighbor gen loops: 11
Neighbor gen loops: 13
Neighbor gen loops: 11
Neighbor gen loops: 16
Neighbor gen loops: 12

Code never comes out of this loop.What can be wrong with this?

With moveit_msgs now a string ID can be used for robots and objects

After getting rid of manipulation_msgs/household_msgs (see issue #32 and #40), now string IDs are used instead of int IDs. The code in grasp_planning_graspit_ros/src/GraspItServices.cpp (search for GetModelNameAndType in code) along with the tail of that will need to be updated for this. At the moment, we are still forced to use int IDs in the service requests.

Additionally, the API tutorial needs to be updated (all launch files not using ints any more, remove section "Background info: Why the mix of name and ID?", etc.).

This relates to issue #32.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.