3#ifndef CTRL_LIB_CARTESIANFORCECONTROLLER_TASK_HPP
4#define CTRL_LIB_CARTESIANFORCECONTROLLER_TASK_HPP
6#include "ctrl_lib/CartesianForceControllerBase.hpp"
7#include <base/samples/Wrenches.hpp>
8#include <base/samples/RigidBodyState.hpp>
9#include <base/samples/RigidBodyStateSE3.hpp>
10#include <wbc/controllers/CartesianForcePIDController.hpp>
14class CartesianForcePIDController;
19 friend class CartesianForceControllerBase;
40 virtual const base::VectorXd&
computeActivation(wbc::ActivationFunction& activation_function);
44 return !base::isNaN(w.force(0)) && !base::isNaN(w.force(1)) && !base::isNaN(w.force(2)) &&
45 !base::isNaN(w.torque(0)) && !base::isNaN(w.torque(1)) && !base::isNaN(w.torque(2));
48 const base::VectorXd
wrenchToRaw(
const base::samples::Wrench& wrench, base::VectorXd& raw){
50 raw.segment(0,3) = wrench.force;
51 raw.segment(3,3) = wrench.torque;
Definition CartesianForceController.hpp:18
void errorHook()
Definition CartesianForceController.cpp:47
base::VectorXd setpoint_raw
Definition CartesianForceController.hpp:58
std::string ft_sensor_name
Definition CartesianForceController.hpp:57
virtual void updateController()
Definition CartesianForceController.cpp:98
void stopHook()
Definition CartesianForceController.cpp:51
bool isValid(const base::Wrench &w)
Definition CartesianForceController.hpp:43
void cleanupHook()
Definition CartesianForceController.cpp:55
base::samples::Wrench feedback
Definition CartesianForceController.hpp:55
base::samples::Wrenches feedback_wrenches
Definition CartesianForceController.hpp:56
virtual bool readSetpoint()
Definition CartesianForceController.cpp:85
virtual const base::VectorXd & computeActivation(wbc::ActivationFunction &activation_function)
Definition CartesianForceController.cpp:106
void updateHook()
Definition CartesianForceController.cpp:43
base::VectorXd ctrl_output_raw
Definition CartesianForceController.hpp:58
bool configureHook()
Definition CartesianForceController.cpp:17
virtual bool readFeedback()
Definition CartesianForceController.cpp:60
base::VectorXd feedback_raw
Definition CartesianForceController.hpp:58
~CartesianForceController()
Definition CartesianForceController.hpp:24
const base::VectorXd wrenchToRaw(const base::samples::Wrench &wrench, base::VectorXd &raw)
Definition CartesianForceController.hpp:48
CartesianForceController(std::string const &name="ctrl_lib::CartesianForceController")
Definition CartesianForceController.cpp:9
wbc::CartesianForcePIDController * controller
Definition CartesianForceController.hpp:60
base::samples::RigidBodyStateSE3 control_output
Definition CartesianForceController.hpp:59
base::samples::Wrench setpoint
Definition CartesianForceController.hpp:55
bool startHook()
Definition CartesianForceController.cpp:35
Definition CartesianForceController.hpp:12