I am facing a problem in robotics where a robot is localized in 3D-space to build up a map simultaneously (see SLAM, e.g. [1]). One approach is to build up a graph of poses $x_i$ and transforms $z_{ij}$ which connect two poses $x_i$ and $x_j$. In my case both poses and transforms consist of a translation vector and a rotation unit quaternion:
$$ x^T = z^T = (t^T, q^T) = (tx, ty, tz, qx, qy, qz, qw)$$
To find an optimal set of poses $X$ given constraints $Z$ one have to minimize the following formula:
$$ X^* = argmin_X \sum_{ij} e_{ij}^T \Sigma_{ij} e_{ij}$$
where $e_{ij}$ describes the error between estimates of transforms based on the current belief $X$ and measured transforms. Using the concept of uncertain transformation (see [2], [3]) the error can be expressed as follows:
$$ e_{ij} = z_{ij}^{-1} \oplus (x_{i}^{-1} \oplus x_{j})$$
where $\oplus$ is the motion composition operator:
$$ x_{i} \oplus x_{j} = \begin{pmatrix}q_i \begin{pmatrix} 0 \\ t_j \end{pmatrix} q_i^* \\ q_i q_j \end{pmatrix}$$
To solve the minimization problem I need to compute the following Jacobians:
$$ A_{ij} = \frac{\partial e_{ij}}{\partial x_i} $$ $$ B_{ij} = \frac{\partial e_{ij}}{\partial x_j} $$
How do I do that? I appreciate both an analytical approach and matlab code (e.g. using the symbolic math package). I am familiar with standard calculus. But my knowledge ends when its coming to vector and matrix calculus and custom operators being involved.
[1] Grisetti, G., Kummerle, R., Stachniss, C., & Burgard, W. (2010). A tutorial on graph-based SLAM. Intelligent Transportation Systems Magazine, IEEE, 2(4), 31-43.
[2] Smith, R., Self, M., & Cheeseman, P. (1990). Estimating uncertain spatial relationships in robotics. In Autonomous robot vehicles (pp. 167-193). Springer New York.
[3] Čurn, J., Marinescu, D., & Cahill, V. (2012). On the Monte Carlo Representation of Uncertain Spatial Constraints. Procedia Engineering, 41, 37-46.