wbc
RobotModelRBDL.hpp
Go to the documentation of this file.
1#ifndef ROBOT_MODEL_RBDL_HPP
2#define ROBOT_MODEL_RBDL_HPP
3
5#include <rbdl/rbdl.h>
6
7namespace wbc {
8
10protected:
12
13 std::shared_ptr<RigidBodyDynamics::Model> rbdl_model;
14 Eigen::VectorXd q, qd, qdd, tau;
15 RigidBodyDynamics::Math::MatrixNd J, H_q;
16
17 std::vector<std::string> jointNamesInRBDLOrder(const std::string &urdf_file);
18 void updateFloatingBase(const base::samples::RigidBodyStateSE3& floating_base_state_in);
19 void clear();
20
21public:
23 virtual ~RobotModelRBDL();
24
30 virtual bool configure(const RobotModelConfig& cfg);
31
37 virtual void update(const base::samples::Joints& joint_state,
38 const base::samples::RigidBodyStateSE3& floating_base_state = base::samples::RigidBodyStateSE3());
39
41 virtual void systemState(base::VectorXd &q, base::VectorXd &qd, base::VectorXd &qdd);
42
49 virtual const base::samples::RigidBodyStateSE3 &rigidBodyState(const std::string &root_frame, const std::string &tip_frame);
50
56 virtual const base::MatrixXd &spaceJacobian(const std::string &root_frame, const std::string &tip_frame);
57
63 virtual const base::MatrixXd &bodyJacobian(const std::string &root_frame, const std::string &tip_frame);
64
70 virtual const base::MatrixXd &comJacobian();
71
79 virtual const base::MatrixXd &jacobianDot(const std::string &root_frame, const std::string &tip_frame);
80
86 virtual const base::Acceleration &spatialAccelerationBias(const std::string &root_frame, const std::string &tip_frame);
87
89 virtual const base::MatrixXd &jointSpaceInertiaMatrix();
90
92 virtual const base::VectorXd &biasForces();
93
95 virtual const base::samples::RigidBodyStateSE3& centerOfMass();
96
98 virtual void computeInverseDynamics(base::commands::Joints &solver_output);
99};
100
101}
102
103#endif
Definition RobotModelRBDL.hpp:9
virtual const base::VectorXd & biasForces()
Definition RobotModelRBDL.cpp:384
virtual void systemState(base::VectorXd &q, base::VectorXd &qd, base::VectorXd &qdd)
Definition RobotModelRBDL.cpp:208
virtual void computeInverseDynamics(base::commands::Joints &solver_output)
Compute and return the inverse dynamics solution.
Definition RobotModelRBDL.cpp:416
virtual bool configure(const RobotModelConfig &cfg)
Load and configure the robot model.
Definition RobotModelRBDL.cpp:30
virtual const base::samples::RigidBodyStateSE3 & rigidBodyState(const std::string &root_frame, const std::string &tip_frame)
Computes and returns the relative transform between the two given frames. By convention this is the p...
Definition RobotModelRBDL.cpp:214
Eigen::VectorXd q
Definition RobotModelRBDL.hpp:14
virtual ~RobotModelRBDL()
Definition RobotModelRBDL.cpp:17
Eigen::VectorXd qd
Definition RobotModelRBDL.hpp:14
virtual const base::MatrixXd & spaceJacobian(const std::string &root_frame, const std::string &tip_frame)
Returns the Space Jacobian for the kinematic chain between root and the tip frame as full body Jacobi...
Definition RobotModelRBDL.cpp:249
RobotModelRBDL()
Definition RobotModelRBDL.cpp:13
void clear()
Definition RobotModelRBDL.cpp:21
virtual const base::MatrixXd & comJacobian()
Returns the CoM Jacobian for the entire robot, which maps the robot joint velocities to linear spatia...
Definition RobotModelRBDL.cpp:319
virtual const base::MatrixXd & jacobianDot(const std::string &root_frame, const std::string &tip_frame)
Returns the derivative of the Jacobian for the kinematic chain between root and the tip frame as full...
Definition RobotModelRBDL.cpp:342
std::vector< std::string > jointNamesInRBDLOrder(const std::string &urdf_file)
virtual const base::samples::RigidBodyStateSE3 & centerOfMass()
Return Current center of gravity in expressed base frame.
Definition RobotModelRBDL.cpp:395
Eigen::VectorXd tau
Definition RobotModelRBDL.hpp:14
static RobotModelRegistry< RobotModelRBDL > reg
Definition RobotModelRBDL.hpp:11
std::shared_ptr< RigidBodyDynamics::Model > rbdl_model
Definition RobotModelRBDL.hpp:13
virtual const base::Acceleration & spatialAccelerationBias(const std::string &root_frame, const std::string &tip_frame)
Returns the spatial acceleration bias, i.e. the term Jdot*qdot.
Definition RobotModelRBDL.cpp:346
virtual const base::MatrixXd & bodyJacobian(const std::string &root_frame, const std::string &tip_frame)
Returns the Body Jacobian for the kinematic chain between root and the tip frame as full body Jacobia...
Definition RobotModelRBDL.cpp:285
virtual void update(const base::samples::Joints &joint_state, const base::samples::RigidBodyStateSE3 &floating_base_state=base::samples::RigidBodyStateSE3())
Update the robot configuration.
Definition RobotModelRBDL.cpp:124
virtual const base::MatrixXd & jointSpaceInertiaMatrix()
Definition RobotModelRBDL.cpp:373
RigidBodyDynamics::Math::MatrixNd H_q
Definition RobotModelRBDL.hpp:15
void updateFloatingBase(const base::samples::RigidBodyStateSE3 &floating_base_state_in)
Definition RobotModelRBDL.cpp:26
RigidBodyDynamics::Math::MatrixNd J
Definition RobotModelRBDL.hpp:15
Eigen::VectorXd qdd
Definition RobotModelRBDL.hpp:14
Interface for all robot models. This has to provide all kinematics and dynamics information that is r...
Definition RobotModel.hpp:22
base::samples::RigidBodyStateSE3 floating_base_state
Definition RobotModel.hpp:31
base::samples::Joints joint_state
Definition RobotModel.hpp:42
Definition ContactsAccelerationConstraint.cpp:3
Robot Model configuration class.
Definition RobotModelConfig.hpp:40
Definition RobotModel.hpp:239