wbc
RobotModelPinocchio.hpp
Go to the documentation of this file.
1#ifndef ROBOT_MODEL_PINOCCHIO_HPP
2#define ROBOT_MODEL_PINOCCHIO_HPP
3
5#include <pinocchio/multibody/fwd.hpp>
6#include <pinocchio/parsers/urdf.hpp>
7
8namespace wbc {
9
11protected:
13
14 Eigen::VectorXd q, qd, qdd;
15 pinocchio::Model model;
16 typedef std::shared_ptr<pinocchio::Data> DataPtr;
18
20 void clear();
21public:
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
44 virtual const base::samples::RigidBodyStateSE3 &rigidBodyState(const std::string &root_frame, const std::string &tip_frame);
45
52 virtual const base::MatrixXd &spaceJacobian(const std::string &root_frame, const std::string &tip_frame);
53
60 virtual const base::MatrixXd &bodyJacobian(const std::string &root_frame, const std::string &tip_frame);
61
67 virtual const base::MatrixXd &comJacobian();
68
74 virtual const base::Acceleration &spatialAccelerationBias(const std::string &root_frame, const std::string &tip_frame);
75
83 virtual const base::MatrixXd &jacobianDot(const std::string &root_frame, const std::string &tip_frame);
84
86 virtual const base::MatrixXd &jointSpaceInertiaMatrix();
87
89 virtual const base::VectorXd &biasForces();
90
92 virtual const base::samples::RigidBodyStateSE3& centerOfMass();
93
95 virtual void computeInverseDynamics(base::commands::Joints &solver_output);
96
97};
98
99}
100
101#endif
Definition RobotModelPinocchio.hpp:10
static RobotModelRegistry< RobotModelPinocchio > reg
Definition RobotModelPinocchio.hpp:12
virtual void update(const base::samples::Joints &joint_state, const base::samples::RigidBodyStateSE3 &floating_base_state=base::samples::RigidBodyStateSE3())
Update the robot configuration.
Definition RobotModelPinocchio.cpp:133
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 RobotModelPinocchio.cpp:290
virtual const base::MatrixXd & jointSpaceInertiaMatrix()
Compute and return the joint space mass-inertia matrix, which is nj x nj, where nj is the number of j...
Definition RobotModelPinocchio.cpp:365
Eigen::VectorXd q
Definition RobotModelPinocchio.hpp:14
virtual const base::samples::RigidBodyStateSE3 & rigidBodyState(const std::string &root_frame, const std::string &tip_frame)
Definition RobotModelPinocchio.cpp:223
pinocchio::Model model
Definition RobotModelPinocchio.hpp:15
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 RobotModelPinocchio.cpp:360
RobotModelPinocchio()
Definition RobotModelPinocchio.cpp:16
std::shared_ptr< pinocchio::Data > DataPtr
Definition RobotModelPinocchio.hpp:16
Eigen::VectorXd qdd
Definition RobotModelPinocchio.hpp:14
virtual const base::MatrixXd & comJacobian()
Returns the CoM Jacobian for the entire robot, which maps the robot joint velocities to linear spatia...
Definition RobotModelPinocchio.cpp:320
DataPtr data
Definition RobotModelPinocchio.hpp:17
virtual void computeInverseDynamics(base::commands::Joints &solver_output)
Compute and return the inverse dynamics solution.
Definition RobotModelPinocchio.cpp:410
Eigen::VectorXd qd
Definition RobotModelPinocchio.hpp:14
~RobotModelPinocchio()
Definition RobotModelPinocchio.cpp:20
virtual void systemState(base::VectorXd &q, base::VectorXd &qd, base::VectorXd &qdd)
Definition RobotModelPinocchio.cpp:217
virtual const base::VectorXd & biasForces()
Compute and return the bias force vector, which is nj x 1, where nj is the number of joints of the sy...
Definition RobotModelPinocchio.cpp:379
void clear()
Definition RobotModelPinocchio.cpp:23
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 RobotModelPinocchio.cpp:333
virtual bool configure(const RobotModelConfig &cfg)
Load and configure the robot model.
Definition RobotModelPinocchio.cpp:30
virtual const base::samples::RigidBodyStateSE3 & centerOfMass()
Compute and return center of mass expressed in base frame.
Definition RobotModelPinocchio.cpp:391
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 RobotModelPinocchio.cpp:260
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