-
Notifications
You must be signed in to change notification settings - Fork 21
Novint Falcon, 3DConnexion SpaceNavigator, etc
Jump to 3DConnection SpaceNavigator, etc
The Novint Falcon is a consumer-priced 3D input device with extremely sophisticated haptic feedback. To create the sense of touch, or physical objects accurately, it normally updates the forces 1000 times per second. GlovePIE can’t really go that fast, but you can set GlovePIE’s frame rate quite high with lines like this:
PIE.FrameRate = 500Hz
With the normal grip, the falcon has 4 buttons, which you can read as follows. They are either true or false:
Falcon.Button1
, Falcon.Button2
, Falcon.Button3
, and Falcon.Button4
But the Falcon supports grips with up to 31 buttons, so GlovePIE also supports Button5 to Button31 just in case Novint releases new grips one day.
The Falcon can measure the 3D position of the grip, which will be in these values:
Falcon.x (How far to the right the grip is)
Falcon.y (How far up the grip is)
Falcon.z (How far towards the body of the falcon the grip is)
They are all measured in metres by default. But GlovePIE supports units, so you can use whatever units you want, like this:
Key.D = Falcon.X > 1 inch
Key.A = Falcon.X < -1 inch
Key.W = Falcon.Z > 3 cm
Key.S = Falcon.Z < -3 cm
The range of the Falcon is small, it goes from -2 inches to +2 inches in each direction.
You can also read the position as a vector, with falcon.pos.
Warning! Danger! The Falcon also allows you to set forces. This means that the falcon can push your hand in any direction. It also means it can injure you, break things, or whatever else a robot arm can do. Even if your script is perfect, GlovePIE is not, it has bugs, so there is a chance that the grip may move about in unexpected ways. So hold it carefully and in such a way that it won’t injure you if it moves suddenly. And start by using only small forces in your script, then make them bigger.
You can set the forces in the 3 directions like this:
Falcon.ForceX
, Falcon.ForceY
, Falcon.ForceZ
The force is in Newtons by default. The force of Gravity is -9.8 Newtons per kilogram. That means that when you hold something that weighs 100 grams in your hand, it will push down on your hand with a force of 1 Newton. But you can also use units of weight to specify the force, and GlovePIE will convert them. For example:
Falcon.ForceY = -0.5 pounds
That will make the grip feel half a pound heavier.
The maximum force is about 2 pounds, 1 kilogram, or 10 Newtons.
Here is an example of how to make a force at a certain point:
If falcon.x < -1 inch then
falcon.ForceX = 2 newtons
else
falcon.ForceX = 0
end if
That makes the falcon push you back if you try to move too far to the left.
You can also set the force as a vector with Falcon.Force
Falcon.exists will be true when the falcon (and driver) exists, and false when it doesn’t.
Falcon.homed will be true when the falcon has been homed, and false when it hasn’t.
See http://home.novint.com/community/message_boards.php for discussion on using the Novint Falcon.
GlovePIE now supports 3DConnexion 6DOF input devices like the SpaceNavigator, SpaceTraveler, SpaceExplorer, and SpacePilot. These are the modern descendents of the original SpaceBall which you might have heard of many years ago.
GlovePIE calls them all “SpaceBall”.
The “SpaceBall” provides 3 position values, and three rotation values:
SpaceBall.x
, SpaceBall.y
, and SpaceBall.z
.
X
is how far you are pushing to the right
Y
is how far you are pulling up
Z
is how far you are pushing forwards (away from your body)
SpaceBall.yaw
, SpaceBall.pitch
, and SpaceBall.roll
Yaw
is how far you are twisting it to the right
Pitch
is how far you are tilting it upwards
Roll
is how far you are tilting it to the right
The spaceball can only move a limited amount in each direction.
The units for x, y, z, yaw, pitch and roll are the same. But they depend on the settings in the control panel. 3DConnexion does that deliberately so that users can choose the speed and sensitivity they want outside the applications. So the maximum value could be 80 or it could be more than a thousand, depending on control panel settings.
It is not recommended to require the full use of the spaceball’s range. Most of the time users will only use about 75% of the range.
Most people will only have a SpaceNavigator. It has two buttons. But the user can choose what those two buttons are in Control Panel. You need to know what those buttons are set to, if you want to use them in GlovePIE.
For example if the left button is set to be the “Fit” button in control panel, then you need to read it like this in GlovePIE:
Enter = SpaceBall.Fit
In control panel, the buttons can be set to either “Fit
”, “ApplicationPanel
”, or “Button1
”… “Button29
”.
If you have a SpaceExplorer or SpacePilot, then there will be more than two buttons and they might have fixed functions.
You can detect what kind of spaceball it is, by reading SpaceBall.Type
.
You can also detect whether the SpaceBall exists by reading SpaceBall.exists
.
If you want the angles in some other form besides Yaw, Pitch, and Roll, then you can use AxisAngle
or a rotation matrix. For the rotation matrix, just use SpaceBall.RotMat
. For AxisAngle
just use SpaceBall.Axis
to get the axis vector that the rotation is rotating around, and use SpaceBall.AxisAngle
to get the angle of rotation around that axis.