1
$\begingroup$

I have a data-set containing points in SE(3), i.e the 4 $\times$ 4 transformation matrices and the corresponding dual quaternions. Now, I want to plot these points in a 3D graph. How to generate this plot?

$\endgroup$
5
  • $\begingroup$ What do you intend to see from the generated graph? $\endgroup$ Mar 15, 2018 at 10:14
  • $\begingroup$ I am about to perform a classification of the points using Support Vector Machines. So before doing that, I just wanted to have an intuition about the points in the space (so that it gives me an idea for choosing the input features and the kernel). $\endgroup$ Mar 15, 2018 at 18:44
  • $\begingroup$ I think while plotting those points just for the sake of visualization is fine, it would not be so useful if you want it to give you some intuition of how you should classify the points. Since a point in $SE(3)$ needs 6 coordinates, to actually plot it you need some kind of projection. And I think what kind of plot and what kind of intuition you get are pretty much dependent on the choice of projection function. $\endgroup$ Mar 16, 2018 at 7:43
  • $\begingroup$ @PetchPuttichai What kind of projection function do you think would be suitable for my purpose ? $\endgroup$ Mar 16, 2018 at 22:07
  • $\begingroup$ Well, I don't really know. A natural choice seems to be decoupling rotation and translation as the answer suggested. But whether or not it suits your purpose, you just need to try it out. $\endgroup$ Mar 17, 2018 at 7:58

3 Answers 3

4
$\begingroup$

A point in SE(3) has six degrees of freedom, so the three DOF's in a 3D plot would not be sufficient to capture this. I would split it up into two 3D plots. One of them would be quite straight forward, namely just plot the 3D position vector. The other plot should capture the information of the attitude part. There are multiple ways of representing this in 3D, such as Euler angles or axis angle representation, where the axis is of unit length and then scaled that by the angle. I myself would prefer the last one.

If your SE(3) is represented as a 4 by 4 matrix

$$ M = \begin{bmatrix} R & p \\ 0 & 1 \end{bmatrix} $$

with $R\in\mathbb{R}^{3\times3}$ a rotation matrix and $p\in\mathbb{R}^{3}$ the position vector. So the position vector $p$ is straight forward to extract. The axis angle information can be extracted from $R$ after some calculations

$$ \theta = \cos^{-1}\left(\frac{\mathrm{Tr}(R)-1}{2}\right) $$

$$ \begin{bmatrix} 0 & -v_3 & v_2 \\ v_3 & 0 & -v_1 \\ -v_2 & v_1 & 0 \end{bmatrix} = \frac{R - R^\top}{2\,\sin\theta} $$

$\endgroup$
3
$\begingroup$

An alternative visualization would be to draw coordinate axes in the 3D plot to represent each SE(3) point. Provided you have a way to view 3D graphs, this allows the points to be all viewed without projecting down to a lower-dimensional space. e.g., you can do this in Matlab with the drawframe function from Brad Kradochvil's kinematics toolbox. It draws an arrow of a different color for the X, Y, and Z axes.

$\endgroup$
3
$\begingroup$

Or you can use the trplot() function from my Robotics Toolbox for MATLAB

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.