Commit 185a3811 authored by Noëlie Ramuzat's avatar Noëlie Ramuzat Committed by Olivier Stasse
Browse files

[include, tools] Modify includes to use sot-core files

Use robot_utils, signal_helper and matrix_geometry from sot-core instead of common and signal_helper or with vector_conversion from sot-torque-control.

Remove logger includes and use directly sendMsg method of robot_utils instead of getLogger.sendMsg.
parent 861942e5
......@@ -36,16 +36,19 @@
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */
#include <sot/torque_control/signal-helper.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
#include <sot/torque_control/utils/logger.hh>
#include <sot/torque_control/common.hh>
#include <map>
#include "boost/assign.hpp"
#include <tsid/robots/robot-wrapper.hpp>
#include <tsid/tasks/task-se3-equality.hpp>
/* HELPER */
#include <dynamic-graph/signal-helper.h>
#include <sot/core/matrix-geometry.hh>
#include <sot/core/robot-utils.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
namespace dynamicgraph {
namespace sot {
namespace torque_control {
......@@ -105,7 +108,7 @@ namespace dynamicgraph {
void sendMsg(const std::string& msg, MsgType t=MSG_TYPE_INFO, const char* file="", int line=0)
{
getLogger().sendMsg("["+name+"] "+msg, t, file, line);
sendMsg("["+name+"] "+msg, t, file, line);
}
protected:
......
......@@ -36,10 +36,6 @@
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */
#include <sot/torque_control/common.hh>
#include <sot/torque_control/signal-helper.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
#include <sot/torque_control/utils/logger.hh>
#include <map>
#include "boost/assign.hpp"
//#include <boost/random/normal_distribution.hpp>
......@@ -50,6 +46,13 @@
#include <pinocchio/parsers/urdf.hpp>
#include <pinocchio/algorithm/kinematics.hpp>
/* HELPER */
#include <dynamic-graph/signal-helper.h>
#include <sot/core/matrix-geometry.hh>
#include <sot/core/robot-utils.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
namespace dynamicgraph {
namespace sot {
namespace torque_control {
......@@ -171,7 +174,7 @@ namespace dynamicgraph {
void sendMsg(const std::string& msg, MsgType t=MSG_TYPE_INFO, const char* file="", int line=0)
{
getLogger().sendMsg("["+name+"] "+msg, t, file, line);
sendMsg("["+name+"] "+msg, t, file, line);
}
protected:
......
......@@ -17,13 +17,14 @@
#ifndef __sot_torquecontrol_commands_helper_H__
#define __sot_torquecontrol_commands_helper_H__
#include <boost/function.hpp>
/* --- COMMON INCLUDE -------------------------------------------------- */
#include <dynamic-graph/command.h>
#include <dynamic-graph/command-direct-setter.h>
#include <dynamic-graph/command-direct-getter.h>
#include <dynamic-graph/command-bind.h>
#include <boost/function.hpp>
/* --- HELPER ---------------------------------------------------------- */
namespace dynamicgraph {
......
......@@ -36,10 +36,7 @@
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */
#include <sot/torque_control/signal-helper.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
#include <sot/torque_control/utils/logger.hh>
#include <sot/torque_control/common.hh>
#include <map>
#include "boost/assign.hpp"
......@@ -48,6 +45,10 @@
#include <pinocchio/parsers/urdf.hpp>
#include <tsid/robots/robot-wrapper.hpp>
#include <dynamic-graph/signal-helper.h>
#include <sot/core/matrix-geometry.hh>
#include <sot/core/robot-utils.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
namespace dynamicgraph {
namespace sot {
......@@ -150,7 +151,7 @@ namespace dynamicgraph {
void sendMsg(const std::string& msg, MsgType t=MSG_TYPE_INFO, const char* file="", int line=0)
{
getLogger().sendMsg("[ControlManager-"+name+"] "+msg, t, file, line);
sendMsg("[ControlManager-"+name+"] "+msg, t, file, line);
}
protected:
......
......@@ -36,10 +36,6 @@
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */
#include <sot/torque_control/signal-helper.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
#include <sot/torque_control/utils/logger.hh>
#include <sot/torque_control/common.hh>
#include <map>
#include "boost/assign.hpp"
......@@ -48,6 +44,10 @@
#include <pinocchio/parsers/urdf.hpp>
#include <tsid/robots/robot-wrapper.hpp>
#include <dynamic-graph/signal-helper.h>
#include <sot/core/matrix-geometry.hh>
#include <sot/core/robot-utils.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
namespace dynamicgraph {
namespace sot {
......@@ -115,7 +115,7 @@ namespace dynamicgraph {
void sendMsg(const std::string& msg, MsgType t=MSG_TYPE_INFO, const char* file="", int line=0)
{
getLogger().sendMsg("[CurrentController-"+name+"] "+msg, t, file, line);
sendMsg("[CurrentController-"+name+"] "+msg, t, file, line);
}
protected:
......
......@@ -15,10 +15,13 @@
# define SOTDDPACTUATORSOLVER_EXPORT
#endif
#include <sot/torque_control/signal-helper.hh>
#include <tsid/utils/stop-watch.hpp>
#include <dynamic-graph/signal-helper.h>
#include <sot/core/matrix-geometry.hh>
#include <sot/core/robot-utils.hh>
#include <sot/torque_control/utils/causal-filter.hh>
#include <sot/torque_control/utils/logger.hh>
#include <ddp-actuator-solver/ddpsolver.hh>
#include <ddp-actuator-solver/ddpsolver.hh>
......
......@@ -17,16 +17,7 @@
#ifndef _DeviceTorqueCtrl_H_
#define _DeviceTorqueCtrl_H_
#include <dynamic-graph/entity.h>
#include <dynamic-graph/signal.h>
#include <dynamic-graph/signal-ptr.h>
#include <dynamic-graph/linear-algebra.h>
#include <sot/core/device.hh>
#include <sot/core/abstract-sot-external-interface.hh>
#include <sot/torque_control/signal-helper.hh>
#include <sot/torque_control/common.hh>
#include <sot/torque_control/utils/logger.hh>
#include <Eigen/Cholesky>
#include <boost/random/mersenne_twister.hpp>
#include <boost/random/normal_distribution.hpp>
......@@ -35,7 +26,17 @@
#include <tsid/robots/robot-wrapper.hpp>
#include <tsid/tasks/task-se3-equality.hpp>
#include <Eigen/Cholesky>
#include <dynamic-graph/entity.h>
#include <dynamic-graph/signal.h>
#include <dynamic-graph/signal-ptr.h>
#include <dynamic-graph/linear-algebra.h>
#include <sot/core/device.hh>
#include <sot/core/abstract-sot-external-interface.hh>
/* HELPER */
#include <dynamic-graph/signal-helper.h>
#include <sot/core/robot-utils.hh>
namespace dgsot=dynamicgraph::sot;
......@@ -97,7 +98,7 @@ namespace dynamicgraph
void sendMsg(const std::string& msg, MsgType t=MSG_TYPE_INFO, const char* file="", int line=0)
{
getLogger().sendMsg("[DeviceTorqueCtrl] "+msg, t, file, line);
sendMsg("[DeviceTorqueCtrl] "+msg, t, file, line);
}
/// \brief Current integration step.
......
......@@ -38,10 +38,9 @@
/* --------------------------------------------------------------------- */
/* HELPER */
#include <sot/torque_control/signal-helper.hh>
#include <tsid/utils/stop-watch.hpp>
#include <dynamic-graph/signal-helper.h>
#include <sot/torque_control/utils/causal-filter.hh>
#include <sot/torque_control/utils/logger.hh>
namespace dynamicgraph {
namespace sot {
......@@ -107,7 +106,7 @@ namespace dynamicgraph {
void sendMsg(const std::string& msg, MsgType t=MSG_TYPE_INFO, const char* file="", int line=0)
{
getLogger().sendMsg("["+name+"] "+msg, t, file, line);
sendMsg("["+name+"] "+msg, t, file, line);
}
public: /* --- ENTITY INHERITANCE --- */
......
......@@ -35,12 +35,6 @@
/* --------------------------------------------------------------------- */
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */
#include <dynamic-graph/linear-algebra.h>
#include <sot/torque_control/common.hh>
#include <sot/torque_control/signal-helper.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
#include <sot/torque_control/utils/logger.hh>
#include <map>
#include "boost/assign.hpp"
......@@ -50,6 +44,16 @@
#include <pinocchio/algorithm/kinematics.hpp>
//~ #include <pinocchio/algorithm/rnea.hpp>
//~ #include "pinocchio/algorithm/crba.hpp"
#include <dynamic-graph/linear-algebra.h>
/* HELPER */
#include <dynamic-graph/signal-helper.h>
#include <sot/core/matrix-geometry.hh>
#include <sot/core/robot-utils.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
namespace dynamicgraph {
namespace sot {
namespace torque_control {
......@@ -93,7 +97,7 @@ namespace dynamicgraph {
void sendMsg(const std::string& msg, MsgType t=MSG_TYPE_INFO, const char* file="", int line=0)
{
getLogger().sendMsg("[FreeFlyerLocator-"+name+"] "+msg, t, file, line);
sendMsg("[FreeFlyerLocator-"+name+"] "+msg, t, file, line);
}
protected:
......
......@@ -36,12 +36,15 @@
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */
#include <sot/torque_control/signal-helper.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
#include <sot/torque_control/utils/logger.hh>
#include <map>
#include "boost/assign.hpp"
#include <dynamic-graph/signal-helper.h>
#include <sot/core/matrix-geometry.hh>
#include <sot/core/robot-utils.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
namespace dynamicgraph {
namespace sot {
namespace torque_control {
......@@ -81,7 +84,7 @@ namespace dynamicgraph {
void update_offset_impl(int iter);
void sendMsg(const std::string& msg, MsgType t=MSG_TYPE_INFO, const char* file="", int line=0)
{
getLogger().sendMsg("[ImuOffsetCompensation-"+name+"] "+msg, t, file, line);
sendMsg("[ImuOffsetCompensation-"+name+"] "+msg, t, file, line);
}
protected:
......
......@@ -36,10 +36,6 @@
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */
#include <sot/torque_control/signal-helper.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
#include <sot/torque_control/utils/logger.hh>
#include <sot/torque_control/common.hh>
#include <map>
#include "boost/assign.hpp"
......@@ -55,6 +51,13 @@
#include <tsid/tasks/task-joint-posture.hpp>
#include <tsid/trajectories/trajectory-euclidian.hpp>
/* HELPER */
#include <dynamic-graph/signal-helper.h>
#include <sot/core/matrix-geometry.hh>
#include <sot/core/robot-utils.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
namespace dynamicgraph {
namespace sot {
namespace torque_control {
......@@ -185,7 +188,7 @@ namespace dynamicgraph {
void sendMsg(const std::string& msg, MsgType t=MSG_TYPE_INFO, const char* file="", int line=0)
{
getLogger().sendMsg("["+name+"] "+msg, t, file, line);
sendMsg("["+name+"] "+msg, t, file, line);
}
protected:
......
......@@ -37,12 +37,12 @@
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */
#include <tsid/utils/stop-watch.hpp>
/* HELPER */
#include <sot/torque_control/signal-helper.hh>
#include <dynamic-graph/signal-helper.h>
#include <sot/core/matrix-geometry.hh>
#include <sot/core/robot-utils.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
#include <tsid/utils/stop-watch.hpp>
#include <sot/torque_control/utils/logger.hh>
#include <sot/torque_control/common.hh>
/*Motor model*/
#include <sot/torque_control/motor-model.hh>
......@@ -128,7 +128,7 @@ namespace dynamicgraph {
void sendMsg(const std::string& msg, MsgType t=MSG_TYPE_INFO, const char* file="", int line=0)
{
getLogger().sendMsg("["+name+"] "+msg, t, file, line);
sendMsg("["+name+"] "+msg, t, file, line);
}
public:
......
......@@ -35,14 +35,17 @@
/* --------------------------------------------------------------------- */
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */
#include <map>
#include "boost/assign.hpp"
#include <sot/torque_control/signal-helper.hh>
#include <sot/torque_control/common.hh>
/* HELPER */
#include <dynamic-graph/signal-helper.h>
#include <sot/core/matrix-geometry.hh>
#include <sot/core/robot-utils.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
#include <sot/torque_control/utils/logger.hh>
#include <sot/torque_control/utils/trajectory-generators.hh>
#include <map>
#include "boost/assign.hpp"
namespace dynamicgraph {
......@@ -160,7 +163,7 @@ namespace dynamicgraph {
void sendMsg(const std::string& msg, MsgType t=MSG_TYPE_INFO, const char* file="", int line=0)
{
getLogger().sendMsg("[JointTrajectoryGenerator-"+name+"] "+msg, t, file, line);
sendMsg("[JointTrajectoryGenerator-"+name+"] "+msg, t, file, line);
}
protected:
......
......@@ -47,13 +47,15 @@
/* --------------------------------------------------------------------- */
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */
#include <sot/torque_control/signal-helper.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
#include <sot/torque_control/utils/logger.hh>
#include <map>
#include "boost/assign.hpp"
/* HELPER */
#include <dynamic-graph/signal-helper.h>
#include <sot/core/matrix-geometry.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
#define betaDef 0.01f // 2 * proportional g
namespace dynamicgraph {
......@@ -95,7 +97,7 @@ namespace dynamicgraph {
//void madgwickAHRSupdate(float gx, float gy, float gz, float ax, float ay, float az, float mx, float my, float mz);
void sendMsg(const std::string& msg, MsgType t=MSG_TYPE_INFO, const char* file="", int line=0)
{
getLogger().sendMsg("[MadgwickAHRS-"+name+"] "+msg, t, file, line);
sendMsg("[MadgwickAHRS-"+name+"] "+msg, t, file, line);
}
protected:
......
......@@ -36,6 +36,8 @@
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */
#include <map>
#include "boost/assign.hpp"
#include <parametric-curves/spline.hpp>
#include <parametric-curves/constant.hpp>
......@@ -45,14 +47,12 @@
#include <parametric-curves/infinite-sinusoid.hpp>
#include <parametric-curves/infinite-const-acc.hpp>
#include <sot/torque_control/signal-helper.hh>
/* HELPER */
#include <dynamic-graph/signal-helper.h>
#include <sot/core/matrix-geometry.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
#include <sot/torque_control/utils/logger.hh>
//#include <sot/torque_control/utils/trajectory-generators.hh>
#include <map>
#include "boost/assign.hpp"
namespace dynamicgraph {
namespace sot {
......@@ -148,7 +148,7 @@ namespace dynamicgraph {
void sendMsg(const std::string& msg, MsgType t=MSG_TYPE_INFO, const char* file="", int line=0)
{
getLogger().sendMsg("[NdTrajectoryGenerator-"+name+"] "+msg, t, file, line);
sendMsg("[NdTrajectoryGenerator-"+name+"] "+msg, t, file, line);
}
protected:
......
......@@ -38,11 +38,12 @@
/* --------------------------------------------------------------------- */
/* HELPER */
#include <sot/torque_control/signal-helper.hh>
#include <boost/circular_buffer.hpp>
#include <dynamic-graph/signal-helper.h>
#include <sot/core/matrix-geometry.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
#include <sot/torque_control/utils/stop-watch.hh>
#include <sot/torque_control/utils/logger.hh>
#include <boost/circular_buffer.hpp>
/* Polynomial estimators */
#include <sot/torque_control/utils/lin-estimator.hh>
......@@ -116,7 +117,7 @@ namespace dynamicgraph {
protected:
void sendMsg(const std::string& msg, MsgType t=MSG_TYPE_INFO, const char* file="", int line=0)
{
getLogger().sendMsg("["+name+"] "+msg, t, file, line);
sendMsg("["+name+"] "+msg, t, file, line);
}
public: /* --- ENTITY INHERITANCE --- */
......
......@@ -36,13 +36,15 @@
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */
#include <sot/torque_control/signal-helper.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
#include <sot/torque_control/utils/logger.hh>
#include <sot/torque_control/common.hh>
#include <map>
#include "boost/assign.hpp"
#include <dynamic-graph/signal-helper.h>
#include <sot/core/matrix-geometry.hh>
#include <sot/core/robot-utils.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
namespace dynamicgraph {
namespace sot {
namespace torque_control {
......@@ -87,7 +89,7 @@ namespace dynamicgraph {
void sendMsg(const std::string& msg, MsgType t=MSG_TYPE_INFO, const char* file="", int line=0)
{
getLogger().sendMsg("[PositionController-"+name+"] "+msg, t, file, line);
sendMsg("[PositionController-"+name+"] "+msg, t, file, line);
}
protected:
......
......@@ -36,14 +36,16 @@
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */
#include <sot/torque_control/signal-helper.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
#include <sot/torque_control/utils/logger.hh>
#include <sot/torque_control/utils/trajectory-generators.hh>
#include <parametric-curves/spline.hpp>
#include <map>
#include "boost/assign.hpp"
#include <parametric-curves/spline.hpp>
/* HELPER */
#include <dynamic-graph/signal-helper.h>
#include <sot/core/matrix-geometry.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
#include <sot/torque_control/utils/trajectory-generators.hh>
namespace dynamicgraph {
namespace sot {
......@@ -138,7 +140,7 @@ namespace dynamicgraph {
void sendMsg(const std::string& msg, MsgType t=MSG_TYPE_INFO, const char* file="", int line=0)
{
getLogger().sendMsg("[SE3TrajectoryGenerator-"+name+"] "+msg, t, file, line);
sendMsg("[SE3TrajectoryGenerator-"+name+"] "+msg, t, file, line);
}
protected:
......
......@@ -37,20 +37,26 @@
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */
/* HELPER */
#include <sot/torque_control/signal-helper.hh>
#include <sot/torque_control/utils/stop-watch.hh>
#include <sot/torque_control/utils/logger.hh>
#include <sot/torque_control/common.hh>
#include <boost/circular_buffer.hpp>
#include <Eigen/StdVector>
/*Motor model*/
#include <sot/torque_control/motor-model.hh>
#include <pinocchio/multibody/model.hpp>
#include <pinocchio/parsers/urdf.hpp>
#include <pinocchio/algorithm/rnea.hpp>
#include <pinocchio/algorithm/kinematics.hpp>
/* HELPER */
#include <dynamic-graph/signal-helper.h>
#include <sot/core/matrix-geometry.hh>
#include <sot/core/robot-utils.hh>
#include <sot/torque_control/utils/stop-watch.hh>
/*Motor model*/
#include <sot/torque_control/motor-model.hh>
namespace dynamicgraph {
namespace sot {
namespace torque_control {
......@@ -108,7 +114,7 @@ namespace dynamicgraph {
void sendMsg(const std::string& msg, MsgType t=MSG_TYPE_INFO, const char* file="", int line=0)
{
getLogger().sendMsg("["+name+"] "+msg, t, file, line);
sendMsg("["+name+"] "+msg, t, file, line);
}
private:
......
......@@ -37,11 +37,13 @@
/* --------------------------------------------------------------------- */
#include <vector>
#include <sot/torque_control/signal-helper.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
#include <sot/torque_control/utils/logger.hh>
#include <map>
#include "boost/assign.hpp"
/* HELPER */
#include <dynamic-graph/signal-helper.h>
#include <sot/core/matrix-geometry.hh>
#include <sot/core/robot-utils.hh>
#include <sot/torque_control/utils/vector-conversions.hh>
namespace dynamicgraph {
......@@ -92,7 +94,7 @@ namespace dynamicgraph {
void sendMsg(const std::string& msg, MsgType t=MSG_TYPE_INFO, const char* file="", int line=0)
{
getLogger().sendMsg("["+name+"] "+msg, t, file, line);