How to do the following $$\frac{d}{d q} \|q^*_c \times q - q_I\|^2,$$ where
- $q$ : a unit quaternion, i.e., $q^Tq=1$
- $\times$ : vector cross product
- $q_I$ : $[0 \ \ 0 \ \ 0 \ \ 1]^T$, i.e., no rotation
- $q^*_c$ : a constant unit quaternion
My effort is that it becomes
$$2(q^*_c \times q -q_I) \frac{d}{d q}(q^*_c \times q)=2(q^*_r \times q -q_I) q^*_c\times I_{4}.$$
The last part is from the following
Derivative of cross product wrt vector
It looks like the dimension is not correct, how to modify it?
And how to move onto the next step?
Thanks!