i agree.  and have added util/axis2rpy.m 

On Mar 24, 2014, at 10:14 AM, Andres Valenzuela <notifications@github.com> wrote:

> In systems/plants/@RigidBodyManipulator/changeRootLink.m:
> 
> > +      current_body.Ttree = inv(grandparent_old_body.Ttree);
> > +    end
> > +    
> > +    % note: flip joint axis here to keep the joint direction the same (and
> > +    % avoid flipping joint limits, etc)
> > +    current_body.joint_axis = T_old_body_to_new_body(1:3,1:3) * [-old_child_new_parent_body.joint_axis];
> > +    
> > +    if dot(current_body.joint_axis,[0;0;1])<1-1e-4
> > +      % see RigidBodyManipulator/addJoint
> > +      axis_angle = [cross(current_body.joint_axis,[0;0;1]); acos(dot(current_body.joint_axis,[0;0;1]))]; % both are already normalized
> > +      if all(abs(axis_angle(1:3))<1e-4)
> > +        % then it's a scaling of the z axis.
> > +        valuecheck(sin(axis_angle(4)),0,1e-4);
> > +        axis_angle(1:3)=[0;1;0];
> > +      end
> > +      jointrpy = quat2rpy(axis2quat(axis_angle));
> Should we have an axis2rpy that uses quat2rpy(axis2quat(...)) internally? It feels like we should either have functions for all of the conversions, or restrict all conversions to be either other2quat or quat2other. This is probably a question for it's own issue/pull-request, however.
> 
> —
> Reply to this email directly or view it on GitHub.
>