diff --git a/include/sot/core/device.hh b/include/sot/core/device.hh index f1941a58f5e25bb1dee6d50d48a398281794c2a5..4aca1bf3f7ac3e6dbb7b15a850a1d6e323f78228 100644 --- a/include/sot/core/device.hh +++ b/include/sot/core/device.hh @@ -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 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 713f1a0a1cc37f60f419a5e015534e489746ce09..4abd586669f2b445122428c09a674d9fcc4cc0c0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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} diff --git a/src/dynamic_graph/sot/core/__init__.py b/src/dynamic_graph/sot/core/__init__.py index 4fc98dbcb3cb27e7a058bec20f3c9aee3c5c1f3e..868fdc21196a50b3f1c6d42e044882a586abdd20 100644 --- a/src/dynamic_graph/sot/core/__init__.py +++ b/src/dynamic_graph/sot/core/__init__.py @@ -1,4 +1,4 @@ -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('') diff --git a/src/tools/device.cpp b/src/tools/device.cpp index 779e1145260e6924a473b3ebe402a6b4744489ec..8d93676f43ff525e82bbf6b4afb0ee6592251b62 100644 --- a/src/tools/device.cpp +++ b/src/tools/device.cpp @@ -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