[Rock-dev] frame convention invariant code

Jakob Schwendner jakob.schwendner at dfki.de
Wed Dec 19 17:11:44 CET 2012


Hey,

I've started seeing a lot of frame convention changing code (e.g. x 
forward or y forward), and thought it would be nice to have something 
shared between these modules. I would propose to have a class, that can 
be configured, and that is then used to get the individual axis.

class PoseConvention
{
     enum Preset
     {
         LEFTHAND_X_FORWARD_Z_UP,
         LEFTHAND_Y_FORWARD_Z_UP,
         ...
     };
     void set( Preset c );

     base::Vector3()& getForward() const;
     base::Vector3()& getBackward() const;
     base::Vector3()& getLeft() const;
     base::Vector3()& getRight() const;
     ...
};

I think base/pose.h would be the right place for this.

cheers,

Jakob



More information about the Rock-dev mailing list