1#ifndef CHRONO_ROBOT_POSE_H
2#define CHRONO_ROBOT_POSE_H
4#include "bitrl/bitrl_config.h"
8#include <chrono/physics/ChBody.h>
12namespace rb::bitrl_chrono
28 explicit CHRONO_RobotPose(std::shared_ptr<chrono::ChBody> robot_ptr=
nullptr);
34 void set_body(std::shared_ptr<chrono::ChBody> robot_ptr){robot_ptr_ = robot_ptr;}
39 const chrono::ChVector3d& position()
const {
return robot_ptr_ -> GetPos();}
44 const chrono::ChVector3d& velocity()
const {
return robot_ptr_ -> GetLinVel();}
49 const chrono::ChVector3d& acceleration()
const {
return robot_ptr_ -> GetLinAcc();}
54 const chrono::ChMatrix33d& rotation_matrix()
const {
return robot_ptr_ -> GetRotMat();}
59 chrono::ChVector3d to_world_coords(chrono::ChVector3d point){
return robot_ptr_ -> GetFrameRefToAbs().TransformPointLocalToParent(point);}
64 chrono::ChVector3d to_local_coords(chrono::ChVector3d point){
return robot_ptr_ -> GetFrameRefToAbs().TransformPointParentToLocal(point);}
70 std::shared_ptr<chrono::ChBody> robot_ptr_;
75CHRONO_RobotPose::CHRONO_RobotPose(std::shared_ptr<chrono::ChBody> robot_ptr)
Definition bitrl_consts.h:14