Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sot-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stack Of Tasks
sot-core
Commits
3d23af3a
Commit
3d23af3a
authored
14 years ago
by
Nicolas Mansard
Browse files
Options
Downloads
Patches
Plain Diff
Modified the initialiazor of python, to add various small math entities such as Derivator_matrix.
parent
76979eff
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/CMakeLists.txt
+1
-0
1 addition, 0 deletions
src/CMakeLists.txt
src/dynamic_graph/sot/core/__init__.py
+1
-8
1 addition, 8 deletions
src/dynamic_graph/sot/core/__init__.py
src/matrix/derivator.cpp
+31
-34
31 additions, 34 deletions
src/matrix/derivator.cpp
with
33 additions
and
42 deletions
src/CMakeLists.txt
+
1
−
0
View file @
3d23af3a
...
...
@@ -233,6 +233,7 @@ INSTALL(FILES
)
INSTALL
(
FILES
${
CMAKE_CURRENT_SOURCE_DIR
}
/dynamic_graph/sot/core/__init__.py
${
CMAKE_CURRENT_SOURCE_DIR
}
/dynamic_graph/sot/core/math_small_entities.py
${
CMAKE_CURRENT_SOURCE_DIR
}
/dynamic_graph/sot/core/feature_position.py
DESTINATION
${
PYTHON_SITELIB
}
/dynamic_graph/sot/core
)
This diff is collapsed.
Click to expand it.
src/dynamic_graph/sot/core/__init__.py
+
1
−
8
View file @
3d23af3a
from
robot_simu
import
RobotSimu
from
vector_constant
import
VectorConstant
from
matrix_constant
import
MatrixConstant
from
unary_op
import
RPYToMatrix
,
MatrixHomoToPoseRollPitchYaw
from
derivator
import
Derivator_of_Vector
from
feature_point6d
import
FeaturePoint6d
from
feature_position
import
FeaturePosition
from
feature_point6d_relative
import
FeaturePoint6dRelative
...
...
@@ -15,11 +12,8 @@ from gain_adaptive import GainAdaptive
from
sot
import
SOT
RobotSimu
(
''
)
VectorConstant
(
''
)
MatrixConstant
(
''
)
RPYToMatrix
(
''
)
MatrixHomoToPoseRollPitchYaw
(
''
)
Derivator_of_Vector
(
''
)
FeaturePoint6d
(
''
)
FeaturePoint6dRelative
(
''
)
FeatureGeneric
(
''
)
...
...
@@ -33,8 +27,7 @@ SOT('')
from
op_point_modifier
import
OpPointModifier
OpPointModifier
(
''
)
from
math_small_entities
import
*
...
...
This diff is collapsed.
Click to expand it.
src/matrix/derivator.cpp
+
31
−
34
View file @
3d23af3a
...
...
@@ -25,53 +25,50 @@ using namespace sot;
using
namespace
ml
;
using
namespace
dynamicgraph
;
// Unrolled Code:
// template<>
// const double Derivator<double>::TIMESTEP_DEFAULT = 1.;
// template<>
// std::string Derivator<double>::
// getTypeName( void ) { return #double; }
// template<>
// const std::string Derivator<double>::CLASS_NAME = std::string("Derivator_of_double");
// extern "C" {
// Entity *regFunctiondoubleDerivator( const std::string& objname )
// {
// return new Derivator<double>( objname );
// }
// EntityRegisterer regObjdoubleDerivator
// ( std::string("Derivator_of_double"),
// ®FunctiondoubleDerivator );
// }
#define SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN(sotClassType,sotType,className) \
template<> \
const double Derivator<sotType>::TIMESTEP_DEFAULT = 1.; \
const double Derivator<sotType>::TIMESTEP_DEFAULT = 1.;
\
template<> \
std::string sotClassType<sotType>:: \
getTypeName( void ) { return #sotType; } \
template<> \
const std::string sotClassType<sotType>::CLASS_NAME \
= std::string(className)+"
<
"+#sotType
+">";
\
= std::string(className)+"
_of_
"+#sotType
;
\
extern "C" { \
Entity *regFunction##_##sotType##_##sotClassType( const std::string& objname )
\
Entity *regFunction##_##sotType##_##sotClassType( const std::string& objname ) \
{ \
return new sotClassType<sotType>( objname ); \
} \
EntityRegisterer regObj##_##sotType##_##sotClassType( std::string(className)+"_of_"+#sotType, \
®Function##_##sotType##_##sotClassType ); \
EntityRegisterer regObj##_##sotType##_##sotClassType \
( std::string(className)+"_of_"+#sotType, \
®Function##_##sotType##_##sotClassType ); \
}
namespace
sot
{
SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN
(
Derivator
,
double
,
"Derivator"
)
SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN
(
Derivator
,
Vector
,
"Derivator"
)
SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN
(
Derivator
,
Matrix
,
"Derivator"
)
SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN
(
Derivator
,
VectorQuaternion
,
"Derivator"
)
SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN
(
Derivator
,
double
,
"Derivator"
)
SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN
(
Derivator
,
Vector
,
"Derivator"
)
SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN
(
Derivator
,
Matrix
,
"Derivator"
)
SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN
(
Derivator
,
VectorQuaternion
,
"Derivator"
)
}
//SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN(Derivator,double,"T");
/*
#define SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN(sotClassType,sotType,className,typeName,regFunction,regObj) \
template<> \
std::string sotClassType<sotType>:: \
getTypeName( void ) { return typeName; } \
template<> \
const std::string sotClassType<sotType>::CLASS_NAME = std::string(className)+typeName; \
extern "C" { \
Entity *regFunction( const std::string& objname ) \
{ \
return new sotClassType<sotType>( objname ); \
} \
EntityRegisterer regObj( std::string(className)+typeName,®Function ); \
}
SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN(Derivator,double,"derivator","Double",rfd,rod);
SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN(Derivator,ml::Vector,"derivator","Vector",rfv,rov);
SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN(Derivator,ml::Matrix,"derivator","Matrix",rfm,rom);
*/
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment