Skip to content

Commit 61a2f38

Browse files
author
Guilhem Saurel
authored
Merge pull request #60 from nim65s/topic/delete-shell
delete shell
2 parents d4b0e0e + e3e8b90 commit 61a2f38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+274
-1965
lines changed

CMakeLists.txt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@ INCLUDE(cmake/boost.cmake)
2020
INCLUDE(cmake/eigen.cmake)
2121
INCLUDE(cmake/lapack.cmake)
2222
INCLUDE(cmake/cpack.cmake)
23+
INCLUDE(cmake/python.cmake)
2324

2425
SET(PROJECT_NAME sot-core)
2526
SET(PROJECT_DESCRIPTION "Hierarchical task solver plug-in for dynamic-graph.")
2627
SET(PROJECT_URL "http://github.com/jrl-umi3218/sot-core")
2728

2829
SET(CUSTOM_HEADER_DIR "sot/core")
2930

31+
SET(DOXYGEN_USE_MATHJAX YES)
32+
3033
# Disable -Werror on Unix for now.
3134
SET(CXX_DISABLE_WERROR True)
3235

@@ -43,11 +46,20 @@ PKG_CONFIG_APPEND_LIBS("sot-core")
4346
# Search for dependencies.
4447
# Boost
4548
SET(BOOST_COMPONENTS thread filesystem program_options unit_test_framework system regex )
46-
SEARCH_FOR_BOOST()
4749
SEARCH_FOR_EIGEN()
4850

4951
ADD_REQUIRED_DEPENDENCY("dynamic-graph >= 3.0.0")
50-
ADD_REQUIRED_DEPENDENCY("dynamic-graph-python >= 3.0.0")
52+
53+
OPTION (BUILD_PYTHON_INTERFACE "Build the python binding" ON)
54+
IF(BUILD_PYTHON_INTERFACE)
55+
FINDPYTHON(2.7 EXACT REQUIRED)
56+
STRING(REGEX REPLACE "-" "_" PY_NAME ${PROJECT_NAME})
57+
SET(${PY_NAME}_INSTALL_DIR ${PYTHON_SITELIB}/${PY_NAME})
58+
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS})
59+
ADD_REQUIRED_DEPENDENCY("dynamic-graph-python >= 3.0.0")
60+
ENDIF(BUILD_PYTHON_INTERFACE)
61+
62+
SEARCH_FOR_BOOST()
5163

5264
ADD_SUBDIRECTORY(include)
5365
ADD_SUBDIRECTORY(src)

doc/CMakeLists.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
#
55

66
# get the python script install path
7-
INCLUDE(../cmake/python.cmake)
8-
FINDPYTHON()
97

10-
INCLUDE(../cmake/sphinx.cmake)
11-
SPHINX_SETUP()
12-
SPHINX_FINALIZE()
13-
INSTALL (FILES
14-
pictures/feature.png
15-
pictures/task.png
16-
DESTINATION ${_PKG_CONFIG_DOXYGENDOCDIR}/pictures)
8+
IF(BUILD_PYTHON_INTERFACE)
9+
INCLUDE(../cmake/sphinx.cmake)
10+
SPHINX_SETUP()
11+
SPHINX_FINALIZE()
12+
INSTALL (FILES
13+
pictures/feature.png
14+
pictures/task.png
15+
DESTINATION ${_PKG_CONFIG_DOXYGENDOCDIR}/pictures)
16+
ENDIF(BUILD_PYTHON_INTERFACE)

include/sot/core/binary-int-to-uint.hh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
/* --- API ------------------------------------------------------------- */
3535
/* --------------------------------------------------------------------- */
3636

37-
#if defined (WIN32)
37+
#if defined (WIN32)
3838
# if defined (binary_int_to_uint_EXPORTS)
3939
# define SOTBINARYINTTOUINT_EXPORT __declspec(dllexport)
40-
# else
40+
# else
4141
# define SOTBINARYINTTOUINT_EXPORT __declspec(dllimport)
42-
# endif
42+
# endif
4343
#else
4444
# define SOTBINARYINTTOUINT_EXPORT
4545
#endif
@@ -67,9 +67,6 @@ public:
6767
virtual unsigned& computeOutput( unsigned& res,int time );
6868

6969
virtual void display( std::ostream& os ) const;
70-
void commandLine( const std::string& cmdLine,
71-
std::istringstream& cmdArgs,
72-
std::ostream& os );
7370
};
7471

7572

include/sot/core/clamp-workspace.hh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ class SOTCLAMPWORKSPACE_EXPORT ClampWorkspace
8484
virtual MatrixHomogeneous& computeRef( MatrixHomogeneous& res, int time );
8585

8686
virtual void display( std::ostream& ) const;
87-
void commandLine( const std::string& cmdLine,
88-
std::istringstream& cmdArgs,
89-
std::ostream& os );
9087

9188
private:
9289

include/sot/core/constraint.hh

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ namespace dg = dynamicgraph;
4444
/* --- API ------------------------------------------------------------- */
4545
/* --------------------------------------------------------------------- */
4646

47-
#if defined (WIN32)
47+
#if defined (WIN32)
4848
# if defined (constraint_EXPORTS)
4949
# define SOTCONSTRAINT_EXPORT __declspec(dllexport)
50-
# else
50+
# else
5151
# define SOTCONSTRAINT_EXPORT __declspec(dllimport)
52-
# endif
52+
# endif
5353
#else
5454
# define SOTCONSTRAINT_EXPORT
5555
#endif
@@ -68,8 +68,8 @@ namespace dynamicgraph {
6868
protected:
6969
typedef std::list< Signal<dg::Matrix,int>* > JacobianList;
7070
JacobianList jacobianList;
71-
72-
public:
71+
72+
public:
7373
static const std::string CLASS_NAME;
7474
virtual const std::string& getClassName( void ) const { return CLASS_NAME; }
7575

@@ -88,11 +88,6 @@ namespace dynamicgraph {
8888

8989
/* --- DISPLAY ------------------------------------------------------------ */
9090
SOTCONSTRAINT_EXPORT friend std::ostream& operator<< ( std::ostream& os,const Constraint& t );
91-
92-
/* --- PARAMS --- */
93-
virtual void commandLine( const std::string& cmdLine
94-
,std::istringstream& cmdArgs
95-
,std::ostream& os );
9691
};
9792
} // namespace sot
9893
} // namespace dynamicgraph

include/sot/core/device.hh

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ namespace dynamicgraph {
6363
virtual const std::string& getClassName(void) const {
6464
return CLASS_NAME;
6565
}
66-
66+
6767
enum ForceSignalSource
6868
{
6969
FORCE_SIGNAL_RLEG,
7070
FORCE_SIGNAL_LLEG,
7171
FORCE_SIGNAL_RARM,
7272
FORCE_SIGNAL_LARM
7373
};
74-
74+
7575
protected:
7676
dg::Vector state_;
7777
dg::Vector velocity_;
@@ -82,12 +82,12 @@ namespace dynamicgraph {
8282
PeriodicCall periodicCallBefore_;
8383
PeriodicCall periodicCallAfter_;
8484
public:
85-
85+
8686
/* --- CONSTRUCTION --- */
8787
Device(const std::string& name);
8888
/* --- DESTRUCTION --- */
8989
virtual ~Device();
90-
90+
9191
virtual void setStateSize(const unsigned int& size);
9292
virtual void setState(const dg::Vector& st);
9393
void setVelocitySize(const unsigned int& size);
@@ -96,7 +96,7 @@ namespace dynamicgraph {
9696
virtual void setNoIntegration();
9797
virtual void setControlInputType(const std::string& cit);
9898
virtual void increment(const double & dt = 5e-2);
99-
99+
100100
public: /* --- DISPLAY --- */
101101
virtual void display(std::ostream& os) const;
102102
SOT_CORE_EXPORT friend std::ostream&
@@ -129,9 +129,6 @@ namespace dynamicgraph {
129129
/*! \brief The ZMP reference send by the previous controller. */
130130
dynamicgraph::Signal<dg::Vector,int> ZMPPreviousControllerSOUT;
131131

132-
public: /* --- COMMANDS --- */
133-
void commandLine(const std::string&, std::istringstream&,
134-
std::ostream&){}
135132
protected:
136133
/// Compute roll pitch yaw angles of freeflyer joint.
137134
void integrateRollPitchYaw(dg::Vector& state, const dg::Vector& control,

include/sot/core/exception-tools.hh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ namespace dynamicgraph {
4848

4949
,CORBA
5050
,KALMAN_SIZE
51-
,PY_SHELL_PTR
5251
};
5352

5453
static const std::string EXCEPTION_NAME;

include/sot/core/feature-generic.hh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,6 @@ class SOTFEATUREGENERIC_EXPORT FeatureGeneric
128128
/*! \brief Display the information related to this generic implementation. */
129129
virtual void display( std::ostream& os ) const;
130130

131-
void commandLine( const std::string& cmdLine,
132-
std::istringstream& cmdArgs,
133-
std::ostream& os );
134-
135131
/*! \name Dealing with the reference value to be reach with this feature.
136132
@{
137133
*/

include/sot/core/feature-joint-limits.hh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,6 @@ class SOTFEATUREJOINTLIMITS_EXPORT FeatureJointLimits
104104
inline static Flags selectActuated( void );
105105

106106
virtual void display( std::ostream& os ) const;
107-
void commandLine( const std::string& cmdLine,
108-
std::istringstream& cmdArgs,
109-
std::ostream& os );
110-
111-
112107
} ;
113108

114109
} /* namespace sot */} /* namespace dynamicgraph */

include/sot/core/feature-line-distance.hh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ class SOTFEATURELINEDISTANCE_EXPORT FeatureLineDistance
9595

9696
virtual void display( std::ostream& os ) const;
9797

98-
virtual void commandLine( const std::string& cmdLine,
99-
std::istringstream& cmdArgs,
100-
std::ostream& os );
101-
10298
} ;
10399

104100

include/sot/core/feature-point6d-relative.hh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,7 @@ class SOTFEATUREPOINT6DRELATIVE_EXPORT FeaturePoint6dRelative
9898
virtual dg::Matrix& computeJacobian( dg::Matrix& res,int time );
9999

100100
virtual void display( std::ostream& os ) const;
101-
virtual void commandLine( const std::string& cmdLine,
102-
std::istringstream& cmdArgs,
103-
std::ostream& os );
101+
104102
void initCommands( void );
105103
void initSdes( const std::string& featureDesiredName );
106104

include/sot/core/feature-point6d.hh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ class SOTFEATUREPOINT6D_EXPORT FeaturePoint6d
118118

119119
virtual void display( std::ostream& os ) const;
120120

121-
virtual void commandLine( const std::string& cmdLine,
122-
std::istringstream& cmdArgs,
123-
std::ostream& os );
124121
public:
125122
void servoCurrentPosition( void );
126123
private:

include/sot/core/feature-task.hh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,6 @@ class SOTFEATURETASK_EXPORT FeatureTask
7878
/*! \brief Display the information related to this task implementation. */
7979
virtual void display( std::ostream& os ) const;
8080

81-
void commandLine( const std::string& cmdLine,
82-
std::istringstream& cmdArgs,
83-
std::ostream& os );
84-
85-
8681
} ;
8782

8883
} /* namespace sot */} /* namespace dynamicgraph */

include/sot/core/feature-vector3.hh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ class SOTFEATUREVECTOR3_EXPORT FeatureVector3
8989

9090
virtual void display( std::ostream& os ) const;
9191

92-
virtual void commandLine( const std::string& cmdLine,
93-
std::istringstream& cmdArgs,
94-
std::ostream& os );
95-
9692
} ;
9793

9894
} /* namespace sot */} /* namespace dynamicgraph */

include/sot/core/fir-filter.hh

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ namespace dynamicgraph {
8282
namespace command {
8383
using ::dynamicgraph::command::Command;
8484
using ::dynamicgraph::command::Value;
85-
85+
8686
template <class sigT, class coefT>
8787
class SetElement : public Command
8888
{
@@ -101,7 +101,7 @@ namespace dynamicgraph {
101101
Value doExecute ();
102102
}; // class SetElement
103103
} // namespace command
104-
104+
105105
using ::dynamicgraph::command::Setter;
106106
using ::dynamicgraph::command::Getter;
107107

@@ -119,7 +119,7 @@ namespace dynamicgraph {
119119
return "Unknown";
120120
}
121121
static const std::string CLASS_NAME;
122-
122+
123123
std::string getDocString () const
124124
{
125125
return
@@ -173,7 +173,7 @@ namespace dynamicgraph {
173173
addCommand ("setSize",
174174
new Setter < FIRFilter, unsigned >
175175
(*this, &FIRFilter::resizeBuffer, docstring));
176-
176+
177177
docstring =
178178
" Get Number of coefficients\n"
179179
"\n"
@@ -182,22 +182,22 @@ namespace dynamicgraph {
182182
addCommand ("getSize",
183183
new Getter < FIRFilter, unsigned >
184184
(*this, &FIRFilter::getBufferSize, docstring));
185-
185+
186186
}
187-
187+
188188
virtual ~FIRFilter() {}
189-
189+
190190
virtual sigT& compute( sigT& res,int time )
191191
{
192192
const sigT& in = SIN.access( time );
193193
reset_signal( res, in );
194194
data.push_front( in );
195-
195+
196196
size_t SIZE = std::min(data.size(), coefs.size());
197197
for(size_t i = 0; i < SIZE; ++i) {
198198
res += coefs[i] * data[i];
199199
}
200-
200+
201201
return res;
202202
}
203203

@@ -207,35 +207,29 @@ namespace dynamicgraph {
207207
data.reset_capacity(s);
208208
coefs.resize (s);
209209
}
210-
210+
211211
unsigned int getBufferSize () const
212212
{
213213
return static_cast <unsigned int> (coefs.size ());
214-
214+
215215
}
216-
216+
217217
void setElement (const unsigned int& rank, const coefT& coef)
218218
{
219219
coefs [rank] = coef;
220220
}
221-
221+
222222
coefT getElement (const unsigned int& rank) const
223223
{
224224
return coefs [rank];
225225
}
226-
227-
virtual void commandLine( const std::string& ,
228-
std::istringstream&,
229-
std::ostream& )
230-
{
231-
}
232-
226+
233227
static void reset_signal(sigT& /*res*/, const sigT& /*sample*/ ) { }
234-
228+
235229
public:
236230
SignalPtr<sigT, int> SIN;
237231
SignalTimeDependent<sigT, int> SOUT;
238-
232+
239233
private:
240234
std::vector<coefT> coefs;
241235
detail::circular_buffer<sigT> data;

include/sot/core/gain-adaptive.hh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ class SOTGAINADAPTATIVE_EXPORT GainAdaptive
107107
protected:
108108
double& computeGain( double& res,int t );
109109

110-
public: /* --- PARAMS --- */
111-
virtual void commandLine( const std::string& cmdLine,std::istringstream& cmdArgs,
112-
std::ostream& os );
113110
private:
114111
void addCommands();
115112
};

0 commit comments

Comments
 (0)