wbc
JointIntegrator.hpp
Go to the documentation of this file.
1#ifndef JOINT_INTEGRATOR_HPP
2#define JOINT_INTEGRATOR_HPP
3
4#include <base/commands/Joints.hpp>
5
11
12namespace wbc {
13
18 bool initialized;
19 base::commands::Joints prev_cmd;
20 base::samples::Joints cur_joint_state;
21public:
22 JointIntegrator() : initialized(false){}
32 void integrate(const base::samples::Joints& joint_state, base::commands::Joints &cmd, double cycle_time, IntegrationMethod method = RECTANGULAR, bool use_cur_state = false);
38 void integrateRectangular(base::commands::Joints &cmd, double cycle_time, bool use_cur_state = false);
44 void integrateTrapezoidal(base::commands::Joints &cmd, double cycle_time, bool use_cur_state = false);
48 base::JointState::MODE cmdMode(const base::JointState &cmd);
52 void reinit(){initialized = false;}
53};
54
55}
56
57#endif
IntegrationMethod
Definition JointIntegrator.hpp:6
@ TRAPEZOIDAL
Definition JointIntegrator.hpp:9
@ NONE
Definition JointIntegrator.hpp:7
@ RECTANGULAR
Definition JointIntegrator.hpp:8
The JointIntegrator class implements different numerical integrators.
Definition JointIntegrator.hpp:17
void integrateTrapezoidal(base::commands::Joints &cmd, double cycle_time, bool use_cur_state=false)
Trapezoidal method for numerical integration.
Definition JointIntegrator.cpp:77
void integrateRectangular(base::commands::Joints &cmd, double cycle_time, bool use_cur_state=false)
Performs numerical from acceleration/velocity to positions using rectangular method.
Definition JointIntegrator.cpp:47
JointIntegrator()
Definition JointIntegrator.hpp:22
void reinit()
Reinitialize state of the integrator.
Definition JointIntegrator.hpp:52
void integrate(const base::samples::Joints &joint_state, base::commands::Joints &cmd, double cycle_time, IntegrationMethod method=RECTANGULAR, bool use_cur_state=false)
Performs numerical from acceleration/velocity to positions.
Definition JointIntegrator.cpp:6
base::JointState::MODE cmdMode(const base::JointState &cmd)
cmdType Return the control model type POSITION/VELOCITY/ACCELERATION depending on the valid fields
Definition JointIntegrator.cpp:107
Definition ContactsAccelerationConstraint.cpp:3