omni.h
Go to the documentation of this file.
1 /**************************************************************************************************
2  Software License Agreement (BSD License)
3 
4  Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt
5  All rights reserved.
6 
7  Redistribution and use in source and binary forms, with or without modification, are permitted
8  provided that the following conditions are met:
9 
10  *Redistributions of source code must retain the above copyright notice, this list of
11  conditions and the following disclaimer.
12  *Redistributions in binary form must reproduce the above copyright notice, this list of
13  conditions and the following disclaimer in the documentation and/or other materials provided
14  with the distribution.
15  *Neither the name of the University of Aveiro nor the names of its contributors may be used to
16  endorse or promote products derived from this software without specific prior written permission.
17 
18  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
19  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
21  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
24  IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 ***************************************************************************************************/
33 #include <ros/ros.h>
34 #include <geometry_msgs/PoseStamped.h>
35 #include <tf/transform_broadcaster.h>
36 
37 #include <string.h>
38 #include <stdio.h>
39 #include <math.h>
40 #include <assert.h>
41 #include <sstream>
42 #include <vector>
43 
44 #include <HL/hl.h>
45 #include <HD/hd.h>
46 #include <HDU/hduError.h>
47 #include <HDU/hduVector.h>
48 #include <HDU/hduMatrix.h>
49 
50 
51 #define HOME_XX 0
52 #define HOME_YY 0
53 #define HOME_ZZ 0
54 
68 struct OmniState {
69  hduVector3Dd position; //3x1 vector of position
70  //hduVector3Dd velocity; //3x1 vector of velocity
71  //hduVector3Dd inp_vel1; //3x1 history of velocity used for filtering velocity estimate
72  //hduVector3Dd inp_vel2;
73  //hduVector3Dd inp_vel3;
74  //hduVector3Dd out_vel1;
75  //hduVector3Dd out_vel2;
76  //hduVector3Dd out_vel3;
77  hduVector3Dd pos_hist1; //3x1 history of position used for 2nd order backward difference estimate of velocity
78  //hduVector3Dd pos_hist2;
79  hduVector3Dd rot;
80  hduVector3Dd joints;
81  hduVector3Dd force; //3 element double vector force[0], force[1], force[2]
82  float thetas[7];
83  HDdouble temp[3]; // Motors Temperture
84  int buttons[2];
85  //int buttons_prev[2];
86  bool home;
87  hduVector3Dd home_pos;
88 };
float thetas[7]
Definition: omni.h:82
hduVector3Dd position
Definition: omni.h:69
hduVector3Dd home_pos
Definition: omni.h:87
HDdouble temp[3]
Definition: omni.h:83
hduVector3Dd joints
Definition: omni.h:80
bool home
Definition: omni.h:86
int buttons[2]
Definition: omni.h:84
hduVector3Dd rot
Definition: omni.h:79
Structure for holding the state variables of the haptic device.
Definition: omni.h:68
hduVector3Dd pos_hist1
Definition: omni.h:77
hduVector3Dd force
Definition: omni.h:81


phantom_control
Author(s): Emilio Estrelinha
autogenerated on Mon Mar 2 2015 01:32:35