Tag Archives: java

Simple Dual Quaternion based Scene graph

I’m currently working on a simple scene graph implementation in Java, which I will share under a open source license soon. By simple I mean simple. If you are looking for a scene graph for your game, you might want to check out other more elaborate scene graphs made especially for that purpose. The purpose of mine is primarily to model simple kinematic chains like robot manipulators for simulation purposes.

What’s neat about this one is that it uses uses Dual Quaternions instead of homogeneous transformation matrices. On of the benefits of doing so is a increase in performance.

The Dual Quaternion class is basically a Java implementation of the C# code found in this beginners guide to Dual Quaterions.

I got a working prototype up and running, and so far I am very pleased with the result.

EDIT: I have a working Dual Quaternion javascript implementation running here, which showcases the ScLERP function.

Continue reading Simple Dual Quaternion based Scene graph

Symbolic manipulator FK and Jacobian in Java

Today I’m posting my Java code for getting the symbolic forward kinematics (FK) and Jacobian for an arbitrary serial manipulator.
As symbolic computation libraries are sparse in Java, I’m invoking Python from the terminal and retrevies the output using I/O streams. As such, Python needs to present on the system.
The Python code is embedded in the Java code as a String.

Continue reading Symbolic manipulator FK and Jacobian in Java

JOVR – Java bindings for Oculus Rift SDK 0.4.2.0

Oculus Rift Development Kit 2
Oculus Rift Development Kit 2

A software developer with the alias jericho has released JNA based Java bindings for the newly released Oculus Rift 0.4.2.0 SDK.

It is available from his github page.

Prebuilt jars are available from the maven repository (.dlls are embedded)

Here is a simple  WebSocket server  I’ve wrote that provides clients with the tracking info:

Now go code some awsome Oculus demoes 😉

Numerically determinate the manipulator Jacobian

In classic kinematics, the Jacobian is used to solve the inverse velocity kinematics.

The forward kinematics equation is given by \( \quad x = f(\theta) \)and the Jacobian matrix is a linear approximation to \(f\).

$$J(\theta) = \begin{bmatrix} \frac{\partial p_x}{\partial \theta_1} & \frac{\partial p_x}{\partial \theta_2} & … & \frac{\partial p_x}{\partial \theta_n} \\[0.3em] \frac{\partial p_y}{\partial \theta_1} & \frac{\partial p_y}{\partial \theta_2} & … & \frac{\partial p_y}{\partial \theta_n} \\[0.3em] … & … & … & … \\[0.3em] \frac{\partial a_z}{\partial \theta_1} & \frac{\partial a_z}{\partial \theta_2} & … & \frac{\partial a_z}{\partial \theta_n} \end{bmatrix}$$

Continue reading Numerically determinate the manipulator Jacobian