The Oncilla Trunk is able to sense translational acceleration and orientation of the robot’s trunk.
To get these values:
Oncilla oncilla; // get robot instance
Trunk::Ptr trunk = oncilla.getTrunk(); // get trunk
std::cout << trunk->getOrientation(); // gets current orientation
std::cout << trunk->getTranslationalAcceleration(); // gets current acceleration
Refer to the API documentation of rci::oncilla::OncillaTrunk for the full technical interface of the trunk.