Skip to content
Snippets Groups Projects
Commit d761866d authored by Florent Lamiraux's avatar Florent Lamiraux
Browse files

Reintroduce robotSimu.

    RobotSimu now derives from Device.
parent f5270a32
No related branches found
No related tags found
No related merge requests found
......@@ -97,8 +97,8 @@ namespace dynamicgraph {
dynamicgraph::Signal<ml::Vector,int> ZMPPreviousControllerSOUT;
public: /* --- COMMANDS --- */
void commandLine(const std::string& cmdLine,std::istringstream& cmdArgs,
std::ostream& os){}
void commandLine(const std::string&, std::istringstream&,
std::ostream&){}
};
} // namespace sot
......
......@@ -73,7 +73,7 @@ SET(plugins
tools/timer
tools/seq-play
tools/sequencer
tools/device
tools/robot-simu
tools/motion-period
tools/neck-limitation
tools/mailbox-vector
......@@ -144,6 +144,7 @@ SET(${LIBRARY_NAME}_SOURCES
tools/utils-windows
tools/periodic-call
tools/device
)
ADD_LIBRARY(${LIBRARY_NAME}
......
from device import Device
from robot_simu import RobotSimu
from unary_op import RPYToMatrix, MatrixHomoToPoseRollPitchYaw
from feature_point6d import FeaturePoint6d
from feature_position import FeaturePosition
......@@ -12,7 +12,7 @@ from constraint import Constraint
from gain_adaptive import GainAdaptive
from sot import SOT
Device('')
RobotSimu('')
RPYToMatrix('')
MatrixHomoToPoseRollPitchYaw('')
FeaturePoint6d('')
......
......@@ -31,12 +31,11 @@ using namespace std;
#include <dynamic-graph/factory.h>
#include <dynamic-graph/all-commands.h>
using namespace dynamicgraph::sot;
using namespace dynamicgraph;
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(Device, "Device");
const std::string Device::CLASS_NAME = "Device";
/* --------------------------------------------------------------------- */
/* --- CLASS ----------------------------------------------------------- */
......@@ -139,24 +138,14 @@ Device( const std::string& n )
/* --- Commands --- */
{
using namespace dynamicgraph::command;
std::string docstring;
/* Command increment. */
docstring =
"\n"
" Integrate dynamics for time step provided as input\n"
"\n"
" take one floating point number as input\n"
"\n";
addCommand("increment",
makeCommandVoid1( *this,&Device::increment,docstring));
/* Command setStateSize. */
docstring =
"\n"
" Set size of state vector\n"
"\n";
addCommand("resize",
new Setter<Device, unsigned int>
new command::Setter<Device, unsigned int>
(*this, &Device::setStateSize, docstring));
/* Command set. */
docstring =
......@@ -164,7 +153,7 @@ Device( const std::string& n )
" Set state vector value\n"
"\n";
addCommand("set",
new Setter<Device, Vector>
new command::Setter<Device, Vector>
(*this, &Device::setState, docstring));
}
}
......@@ -225,12 +214,8 @@ increment( const double & dt )
ml::Vector zmp(3); zmp.fill( .0 );
ZMPPreviousControllerSOUT .setConstant( zmp );
}
/* --- DISPLAY ------------------------------------------------------------ */
void Device::display ( std::ostream& os ) const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment