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 clear();
19
20public:
22 virtual ~RobotModelRBDL();
23
29 virtual bool configure(const RobotModelConfig& cfg);
30
36 virtual void update(const base::samples::Joints& joint_state,
37 const base::samples::RigidBodyStateSE3& floating_base_state = base::samples::RigidBodyStateSE3());
38
40 virtual void systemState(base::VectorXd &q, base::VectorXd &qd, base::VectorXd &qdd);
41
48 virtual const base::samples::RigidBodyStateSE3 &rigidBodyState(const std::string &root_frame, const std::string &tip_frame);
49
55 virtual const base::MatrixXd &spaceJacobian(const std::string &root_frame, const std::string &tip_frame);
56
62 virtual const base::MatrixXd &bodyJacobian(const std::string &root_frame, const std::string &tip_frame);
63
69 virtual const base::MatrixXd &comJacobian();
70
78 virtual const base::MatrixXd &jacobianDot(const std::string &root_frame, const std::string &tip_frame);
79
85 virtual const base::Acceleration &spatialAccelerationBias(const std::string &root_frame, const std::string &tip_frame);
86
88 virtual const base::MatrixXd &jointSpaceInertiaMatrix();
89
91 virtual const base::VectorXd &biasForces();
92
94 virtual const base::samples::RigidBodyStateSE3& centerOfMass();
95
97 virtual void computeInverseDynamics(base::commands::Joints &solver_output);
98};
99
100}
101
102#endif
virtual const base::VectorXd & biasForces()
Definition RobotModelRBDL.cpp:381
virtual void systemState(base::VectorXd &q, base::VectorXd &qd, base::VectorXd &qdd)
Definition RobotModelRBDL.cpp:205
virtual void computeInverseDynamics(base::commands::Joints &solver_output)
Compute and return the inverse dynamics solution.
Definition RobotModelRBDL.cpp:413
virtual bool configure(const RobotModelConfig &cfg)
Load and configure the robot model.
Definition RobotModelRBDL.cpp:27
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:211
Eigen::VectorXd q
Definition RobotModelRBDL.hpp:14
virtual ~RobotModelRBDL()
Definition RobotModelRBDL.cpp:18
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:246
RobotModelRBDL()
Definition RobotModelRBDL.cpp:14
void clear()
Definition RobotModelRBDL.cpp:22
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:316
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:339
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:392
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:343
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:282
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:121
virtual const base::MatrixXd & jointSpaceInertiaMatrix()
Definition RobotModelRBDL.cpp:370
RigidBodyDynamics::Math::MatrixNd H_q
Definition RobotModelRBDL.hpp:15
RigidBodyDynamics::Math::MatrixNd J
Definition RobotModelRBDL.hpp:15
Eigen::VectorXd qdd
Definition RobotModelRBDL.hpp:14
RobotModel()
Definition RobotModel.cpp:15
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