grasp
forceClosure.h
1 /* Copyright: (C) 2014 iCub Facility - Istituto Italiano di Tecnologia
2  * Authors: Ilaria Gori
3  * email: ilaria.gori@iit.it
4  * Permission is granted to copy, distribute, and/or modify this program
5  * under the terms of the GNU General Public License, version 2 or any
6  * later version published by the Free Software Foundation.
7  *
8  * A copy of the license can be found in the file LICENSE located in the
9  * root directory.
10  *
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
14  * Public License for more details
15 */
16 
27 #ifndef __FORCECLOSURE_H__
28 #define __FORCECLOSURE_H__
29 
30 #include <string>
31 #include <stdio.h>
32 #include <stdlib.h>
33 #include <iostream>
34 #include <fstream>
35 #include <sstream>
36 #include <vector>
37 #include <cmath>
38 #include <deque>
39 #include <yarp/os/RFModule.h>
40 #include <yarp/sig/Vector.h>
41 #include <yarp/math/Math.h>
42 #include <yarp/os/Time.h>
43 #include <yarp/os/Random.h>
44 #include <iCub/ctrl/math.h>
45 
46 namespace iCub
47 {
48 namespace grasp
49 {
61 {
62  yarp::sig::Vector c1;
63  yarp::sig::Vector c2;
64  yarp::sig::Vector c3;
65  yarp::sig::Vector n1;
66  yarp::sig::Vector n2;
67  yarp::sig::Vector n3;
68  //angle between cone normal and cone lines
69  double alpha1;
70  double alpha2;
71  double alpha3;
72  int ov_cones;
73 };
74 
75 struct ConeBounds
76 {
77  yarp::sig::Vector n1;
78  yarp::sig::Vector n2;
79 };
80 
87  bool isForceClosure(const ContactPoints &contactPoints);
88 
89 }
90 }
91 
92 #endif
93 
Definition of the ForceClosure.
Definition: forceClosure.h:60