# angle rates wrt another frame

My manipulator has a gyroscope attached to its end-effector (ee). The sensor provides angular velocity in the form of angular rates. Those rates are wrt fixed axis, so they effectively represent roll-pitch-yaw extrinsic sequence of angular rates. Let's call this angular velocity $$\dot{\gamma}$$. Now, $$\dot{\gamma}$$ is expressed with respect to the end-effector frame. For my control scheme I have to compute the joint velocity command, $$\dot{q}$$, as follow: $$\dot{q} = J_{A}^{-1}\dot{x}$$ where

• $$J_{A}^{-1}$$ is the inverse of the analytical Jacobian, which relates cartesian velocities with respect to the base link to joint velocities
• $$\dot{x}$$ is the cartesian velocity, whose angular component is not the angular velocity vector commonly denoted as $$\omega$$, but it's the time derivative (i.e. angle rates) of a minimal representation of orientation of the end-effector with respect to the base link. In this application, the angular component should be the above mentioned $$\dot{\gamma}$$

Here's the issue: $$\dot{\gamma}$$ is the angular rates expressed in the end-effector frame. Let's denote it as $$^{ee}\dot{\gamma}$$. For my computation, I need it to represent the angular rates wrt the base link of the manipulator (i.e. $$^{base}\dot{\gamma}$$).

How can I achieve this change of reference frame for the angular rates in order to use it with the analytical jacobian?

I'm also given $$^{base}R_{ee}$$, which is the matrix expressing the orientation of the end-effector frame wrt the base link frame. If $$^{ee}\dot{\gamma}$$ was an element of a vector space, it would be simple to change the frame of reference: $$^{base}\dot{\gamma} \text{ = } ^{base}R_{ee} \text{ } ^{ee}\dot{\gamma}$$ But since that's not the case, I don't think that multiplication is even feasible from a mathematical point of view.

• Is it imperative that you use the analytical Jacobian? Given that it is straightforward to compute the angular velocity $\omega$ from roll pitch yaw derivatives, you could simply apply the appropriate rotation transformation to convert $^{ee}\omega$ to $^{base}\omega$. Also, note that the analytic Jacobian has representational singularities that the geometric Jacobian does not. I would be happy to write up more details on this as answer - but your choice of Jacobian is essential to what that answer would be. Sep 16, 2022 at 16:18
• @domo_arigato well, the choice of which jacobian to employ is actually free. I'd prefer the analytical one since I'm working with ROS and the angular velocity are actually rpy angular rates for most. In the end, I'm a beginner in robotics so I would like to fully understand well both approaches. What makes me confused about the geometric jacobian way is whether $\omega$ computed from $\dot{x}_{RPY}$ (angular rates in end-effector frame) does refers to the base link or to the end effector frame.
– dcfg
Sep 16, 2022 at 20:27
• @domo_arigato the analytical Jacobian for kinematic control, yes it is imperative. Sep 16, 2022 at 20:29
• @CroCo first --> basically is just a change of orientation of a vector, isn't it? So it's exactly the formula I've written in the question. I thought that $\dot{\gamma}$ couldn't be multiplied by a rotation matrix since it's not a vector, but just the time derivative of a minimal representation of an orientation (e.g. RPY angles in my case). second --> AFAIK the analytical jacobian works with angular rates ($\dot{\gamma}$), while the geometric one works with angular velocity ($\omega$)
– dcfg
Sep 16, 2022 at 20:49
• I might be missing something here, but AFAIK the analytical Jacobian is not a requirement for kinematic control. A good deal of IK solvers using a Jacobian-based method utilize the geometric Jacobian, and these methods are equivalent to kinematic tracking control (there's probably a more official name for it). Sep 16, 2022 at 21:13

It sounds like part of the problem here is what frame the RPY derivative, $$\dot{\mathbf{x}}_{RPY}$$, is in. Considering the fact that the RPY values, lets call them $$\psi, \theta, \phi$$ respectively, are used to parameterize the rotation matrix between the world frame and the end-effector frame - it is unlikely then that $$\dot{\mathbf{x}}_{RPY}$$ is defined in the end-effector frame. Consider

$$^{base}R_{ee}(\psi, \theta, \phi) = \ R_{z}(\psi) R_{y}(\theta) R_{x}(\phi)$$

So a change in these parameters is perhaps best not viewed as being in one frame vs another, but instead as changes in elementary parameters that effect the final orientation. That being said, if you use the analytical Jacobian you should not have to perform any change of bases for $$\dot{\mathbf{x}}_{RPY}$$ as these variables are the change in bases.

Now, for my personal schpeal on why the geometric Jacobian is better here. RPY is traditionally used for aircrafts and the like (the naming convention being a clear indicator) and they generally perform well in this arena. This is because it is highly unlikely that a passenger jet reaches the RPY singular configurations ($$\theta = \pm \frac{\pi}{2}$$) - as this would mean the plane is pointed "upwardly" or "downwardly" or perhaps "about-to-crashedly". So, for objects who are generally constrained to certain orientation ranges this should not be a problem. However, revolute-joint robots are not at all orientationally challenged - and as such find themselves in a wide range of orientations. In fact, it is within reason to assume that every orientation (i.e. all of $$\text{SO}(3)$$) is reachable for specific locations in a 6 DoF robot's workspace (up to self-collision and joint limits of course).

That being said, using a representation that contains singularites should be avoided if it can. Also note, the analytical Jacobian is not technically valid at these representational singularities (if you have access to Spong's robotics textbook check out section 4.8). We know how to convert RPY derivatives to angular velocity (here), the geometric Jacobian is required to compute the analytical Jacobian, and the analytical Jacobian can be undefined - angular velocity may be difficult to conceptualize at first but the math is better defined than its parameterized counterparts. As a final note, once the angular velocity has been computed from the RPY derivatives, this will be in the base frame - so no re-framing necessary.

• it is unlikely then that $\dot{x}_{RPY}$ is defined in the end-effector frame that measures comes straight from the gyroscope attached to the end-effector and whose coordinate axes are also aligned with the ones of the end-effector. So I think that makes it referred to the end-effector frame actually. But, if I understand correctly, it doesn't matter if I use the geometric jacobian since the $\omega$ computed with them is still referred wrt the base link.
– dcfg
Sep 17, 2022 at 5:51
• As a side note, from a mathematical point of view does it make sense to multiply $\dot{x}_{RPY}$ by a rotation matrix to change its axes of reference?
– dcfg
Sep 17, 2022 at 5:52
• The way I am seeing it, it does not make sense that the RPY derivatives would be in the ee frame. RPY angles are parameters that rotate from one frame to another, so those derivatives are the change in the rotation of the final frame. So, considering your gyroscope, it feels strange to say that it is measuring RPY derivatives in the ee frame - as that would imply it there is a transformation between the ee frame and itself and these are the measurements of the change of that transformation. I could be wrong here, but my best guess is that the gyro is measuring the change in RPY wrt the base. Sep 17, 2022 at 14:50
• Also, (see above) once you convert to $\omega$ there is no problem using the geometric Jacobian as it expects world frame rates of change. And regardless of all, no never try to “rotate” RPY angles or there derivatives as they have nonlinear relationships and discontinuities between themselves and the rotation matrices they represent, thus no rotation matrix would be able to do such a thing. Sep 17, 2022 at 14:54
• If the axes of the gyroscope are always aligned to the ee frame, then the transformation between the ee and the gyroscope will be the identity. In this case, $^{ee}\omega$ should be equivalent to the RPY derivatives, as each of these derivatives represents the rate of change of the x, y, and z rotation angles - and those angles correspond always to the x, y, and z axes of the end effector. So, in this case you should be able to assign the appropriate values from $\dot{\mathbf{x}}_{RPY}$ to $^{ee}\omega$ and use the transpose of the ee rotation matrix to return back to the world frame. Sep 17, 2022 at 19:57