You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[src] Add option to support the wireless grip version with 3 buttons (#28)
NEEDLE-11 #done #time 2h
---------
* [src] Add option to support the wireless grip version with 3 buttons
* [src] Fix several bugs in the integration of the wireless stylus
---------
Co-authored-by: epernod <erik.pernod@gmail.com>
, d_orientationBase(initData(&d_orientationBase, Quat(0, 0, 0, 1), "orientationBase", "Orientation of the device base in the SOFA scene world coordinates"))
60
61
, d_scale(initData(&d_scale, 1.0, "scale", "Default scale applied to the Device coordinates"))
61
62
62
-
, d_handleButton(initData(&d_handleButton, false, "handleButton", "Bool value showing if handle button is pressed"))
63
+
, d_handleButtonA(initData(&d_handleButtonA, false, "handleButtonA", "Bool value returning if VerseGrip Stylus first button (resp. VerseGrip Quill single button) is pressed."))
64
+
, d_handleButtonB(initData(&d_handleButtonB, false, "handleButtonB", "Bool value returning if VerseGrip Stylus second button is pressed"))
65
+
, d_handleButtonC(initData(&d_handleButtonC, false, "handleButtonC", "Bool value returning if VerseGrip Stylus calibrate button is pressed"))
63
66
, d_posDevice(initData(&d_posDevice, "positionDevice", "position of the device end-effector in SOFA frame"))
64
67
, d_rawForceDevice(initData(&d_rawForceDevice, "rawForceDevice", "For debug: raw values sent to the device in the device frame"))
65
68
, d_dampingForce(initData(&d_dampingForce, 0.0001, "damping", "Default damping applied to the force feedback"))
Copy file name to clipboardExpand all lines: src/SofaHaplyRobotics/Haply_Inverse3Controller.h
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -105,7 +105,9 @@ class SOFA_HAPLYROBOTICS_API Haply_Inverse3Controller : public Controller
105
105
Data<SReal> d_scale; ///< Default scale applied to the device Coordinates
106
106
107
107
/// Output Data
108
-
Data<bool> d_handleButton; ///< Bool value showing if handle button is pressed
108
+
Data<bool> d_handleButtonA; ///< Bool value showing if First button is pressed
109
+
Data<bool> d_handleButtonB; ///< Bool value showing if Second button is pressed
110
+
Data<bool> d_handleButtonC; ///< Bool value showing if Third button is pressed
109
111
Data<Coord> d_posDevice; ///< position of the device end-effector in SOFA Frame. Take into account @sa d_positionBase, @sa d_orientationBase and @sa d_scale
110
112
Data<Vec3> d_rawForceDevice; ///< For debug: raw values sent to the device in the device frame
111
113
Data<SReal> d_dampingForce; ///< Damping value, it is a factor applied to the velocity and substracted to force feedback to avoid oscillations.
@@ -127,7 +129,9 @@ class SOFA_HAPLYROBOTICS_API Haply_Inverse3Controller : public Controller
127
129
float position[3]; // raw position of the end-effector
128
130
float orientation[4]; // raw quaternion of the handle
129
131
float force[3]; // debug raw force vector sent to the device
130
-
bool buttonStatus; // button press status
132
+
bool buttonA; // button A press status
133
+
bool buttonB; // button B press status
134
+
bool buttonC; // button C press status
131
135
};
132
136
133
137
/// Data belonging to the haptic thread only
@@ -163,6 +167,7 @@ class SOFA_HAPLYROBOTICS_API Haply_Inverse3Controller : public Controller
0 commit comments