Skip to content

State representation library

Baptiste Busch edited this page Dec 17, 2019 · 1 revision

The state_representation library is the base library used to represent state of the robot and its environment to be shared among the different modules. It comes in a c++ and a python version.

Three types of representation are currently available: Cartesian, Joints and Dual Quaternions.

Cartesian state

Cartesian states are used to represent transformations in space. The base representation is the Pose:

Pose

A pose P represents the coordinates of a frame located at position [x,y,z] with [qw,qx,qy,qz] quaternion orientation. A pose is always named and expressed in the coordinate of another frame (by default world), its reference frame. We note wPo a frame o expressed in w.

Algebraic operations are defined when they are meaningful:

Multiplication

The multiplication between two frames corresponds to a changing of reference frames. aPb * bPc will result in the frame aPc. If this operation has no physical meaning it throws an error (e.g. aPb * cPd)

Multiplication with a vector

A vector V = [vx,vy,vz] can be multiplied by a pose wP. This results in a vector expressed in the reference frame of P (here w).

Addition and subtraction

The addition between two pose wPa + wPb is only valid if the two poses are expressed in the same reference frame and results in a new pose wPc. Same goes for subtracting two poses.

Inverse

The inverse of a pose wPo represent the inverse transformation oPw.

Twist

A twist represents the velocity of a frame, both linear [vx,vy,vz] and angular [wx, wy, wz]. Similarly to the pose, it also has a reference frame. Addition and subtraction between two twists are defined, so is the multiplication with a scalar. A twist can also be clamped to a maximum magnitude.

Wrench

A wrench represents the force [fx,fy,fz] and torque [tx,ty,tz] expressed in its reference frame.

Joints

Joint state represent the angle values of the joints of a robot. Positions, velocities and torques can be represented with their specific implementation.