Asked
— Edited
Does anyone know if the SDK of the Oculus Rift package would work with EZB if there was a plug in developed for it? It doesn't really need to be something as big and bulky as that. Very unfortunate that Vuzix is no longer offering support with EZB. That would work great.
Like the Vuzix, I'd like to pull from the IMU data to move servos and transfer the camera feed from the EZ camera to the goggles over two complete separate computers in different places.
Any ideas or suggestions on how to POC this, would be grateful.
I will just try something here...and this could work! And hopefully @ptp can come up with a codeable solution for my idea!
Obs:
You have a single connection to the EZB. EZBController is a "Singleton" it's shared, so all the RotNew instances call Connect, the first call connects the other calls are ignored. EZB only accepts one TCP/Serial client connection. You can't have your Unity, ARC or a custom SDK application all connected at same time to the same EZB.
The function SetServo (EZB servo position) sends 2 bytes via TCP/Wifi to the controller. No EZ-Script is involved, faster than that only sending the same 2 bytes via Serial Port (EZB wired).
3) The concurrency is handled inside the EZB library. No problem if you have 2 or 20 joints (RotNew instances) sending values at same time, all the values will be serialized (FIFO - First In First Out) and transmitted via the existent connection (point 1).
and yes, you can have a single Unity script capturing the joint values and sending all them with a single API call:
the advantage is a single TCP payload message (e.g. 10 servo positions 10 x 2 bytes = 20 bytes), versus individual 20 messages of 2 bytes.
Don't expect a huge improvement , unless you have bad WIFI connection.
I assume you have configured a RotNew instance per joint, if you have a way to assign a single instance script, i can create another script.
@ptp thanks for explaining in detail how this works!
1 I understood! 2 Very good, the faster the better for us!
When I hook up two instances of the script to the BioJoints, the board drops out. This is correct...but there will be three separate scripts, one for X, Y, and one for Z rotations. When I am having one script lets say RotNew_Y and ond RotNew_Z the second script gives me an error saying it cannot connect to the EZ_B... This is why I guess we will have to have one script which can be used to either extract all rotations at once, or works in a way that you can change it to whichever rotation we would want to extract?@Fxrtst:
Each servo can only represent a single axis (X/Y/Z) rotation e.g. (Yaw/Pitch/Roll).
Mickey666Maus script:
Is only looking for the Y part and then only Mickey666Maus knows why
he adds +90
So only Y+90 is sent to the EZB Servo.
I'm not an expert in 3D Math... but some points to think:
is the joint.Y.GetTargetValue(), joint.X.GetTargetValue(), joint.Z.GetTargetValue() positions or rotation values ?
If they are positions, does not help. You will need at least 2 reference points and calculate the angles, for each rotation.
If they are rotation values are Radians or Degrees ?
Are rotation values absolute, or related to the Parent's joint ?
Rotation system: Left Hand or Right Hand, you need to understand where X,Y,Z are pointing and if the value increases to the left/right or up/down or CW/CCW.
Each servo represents a Joint Rotation, for example the JD Ankle has two servos: S0 (rotation on axis X) foot servo, S1 (rotation on axis Y) the next servo up. ROS/Right Hand System
So for the servo S0 you want the X rotation value, for the servo S1 you want Y.
To summarize, if you are communicating directly to the EZB servo, this means you need to find away to setup (Unity) for each servo (not per joint) the following information:
So you have some homework to do
Is the drop out specific to EZB/ ARC Wi-Fi? I Don't have a FTDI breakout board or I would test.
https://answers.unity.com/questions/38924/unity-is-a-left-handed-coordinate-system-why.html Unity is Left Handed.
https://www.evl.uic.edu/ralph/508S98/coordinates.html
Please verify the rotation directions.
ROS on the other side is Right hand:
I don't know, but the update method is called at each frame, and you can't expect to have servos responding so fast.
I think the best option is to print the values in a debug window and see the values and how fast they are being collected (updated).
@ptp The joint values are rotations in degrees...you get get Radians if you pass GetTargetValue(true) During the setup stage in BioIK it me and @fxrtst both setup our model with degrees that were ranging from -90/+90 degrees in our angle values, so I just put a lazy +90 to the script, it has no other meaning...we could set up the 3D model differently and the +90 is obsolete!