Namespaces | Classes | Typedefs | Functions | Variables
dynamicgraph::python Namespace Reference

Namespaces

 convert
 
 debug
 
 entity
 
 factory
 
 internal
 
 pool
 
 signalBase
 

Classes

class  Interpreter
 
class  PythonSignalContainer
 
class  SignalWrapper
 

Typedefs

typedef shared_ptr< InterpreterInterpreterPtr_t
 
typedef Eigen::MatrixXd Matrix
 
typedef Eigen::Matrix< double, 4, 4 > Matrix4
 
typedef Eigen::Transform< double, 3, Eigen::Affine > MatrixHomogeneous
 
typedef Eigen::Matrix< double, 3, 3 > MatrixRotation
 
typedef Eigen::Matrix< double, 6, 6 > MatrixTwist
 
typedef Eigen::Quaternion< double > Quaternion
 
typedef Eigen::VectorXd Vector
 
typedef Eigen::Vector3d Vector3
 
typedef Eigen::Matrix< double, 7, 1 > Vector7
 
typedef Eigen::AngleAxis< double > VectorUTheta
 

Functions

 DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN (PythonSignalContainer, "PythonSignalContainer")
 
void enableTrace (bool enable, const char *filename)
 
template<typename T , typename bases = boost::python::bases<dynamicgraph::Entity>, int Options = AddCommands | AddSignals>
auto exposeEntity ()
 
template<typename T , typename Time >
auto exposeSignal (const std::string &name)
 
template<>
auto exposeSignal< MatrixHomogeneous, sigtime_t > (const std::string &name)
 
template<typename Time >
void exposeSignalBase (const char *name)
 
template<typename T , typename Time >
auto exposeSignalPtr (const std::string &name)
 
void exposeSignals ()
 
template<typename T , typename Time >
void exposeSignalsOfType (const std::string &name)
 
template<typename T , typename Time >
auto exposeSignalTimeDependent (const std::string &name)
 
template<typename T , typename Time >
auto exposeSignalWrapper (const std::string &name)
 
bool HandleErr (std::string &err, PyObject *globals_, int PythonInputType)
 
void plug (SignalBase< sigtime_t > *signalOut, SignalBase< sigtime_t > *signalIn)
 plug a signal into another one. More...
 
template<typename Iterator >
bp::list to_py_list (Iterator begin, Iterator end)
 
template<typename Iterator >
bp::tuple to_py_tuple (Iterator begin, Iterator end)
 
template<typename T >
std::vector< T > to_std_vector (const bp::object &iterable)
 

Variables

constexpr int AddCommands = 2
 
constexpr int AddSignals = 1
 
static const std::string pythonPrefix [8]
 

Typedef Documentation

◆ InterpreterPtr_t

Definition at line 16 of file fwd.hh.

◆ Matrix

typedef Eigen::MatrixXd dynamicgraph::python::Matrix

Definition at line 32 of file signal-base-py.cc.

◆ Matrix4

Definition at line 34 of file signal-base-py.cc.

◆ MatrixHomogeneous

typedef Eigen::Transform<double, 3, Eigen::Affine> dynamicgraph::python::MatrixHomogeneous

Definition at line 35 of file signal-base-py.cc.

◆ MatrixRotation

Definition at line 33 of file signal-base-py.cc.

◆ MatrixTwist

Definition at line 36 of file signal-base-py.cc.

◆ Quaternion

typedef Eigen::Quaternion<double> dynamicgraph::python::Quaternion

Definition at line 26 of file signal-base-py.cc.

◆ Vector

typedef Eigen::VectorXd dynamicgraph::python::Vector

Definition at line 28 of file signal-base-py.cc.

◆ Vector3

typedef Eigen::Vector3d dynamicgraph::python::Vector3

Definition at line 29 of file signal-base-py.cc.

◆ Vector7

Definition at line 30 of file signal-base-py.cc.

◆ VectorUTheta

typedef Eigen::AngleAxis<double> dynamicgraph::python::VectorUTheta

Definition at line 25 of file signal-base-py.cc.

Function Documentation

◆ DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN()

dynamicgraph::python::DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN ( PythonSignalContainer  ,
"PythonSignalContainer"   
)

◆ enableTrace()

void dynamicgraph::python::enableTrace ( bool  enable,
const char *  filename 
)

Definition at line 39 of file dynamic-graph-py.cc.

◆ exposeEntity()

template<typename T , typename bases = boost::python::bases<dynamicgraph::Entity>, int Options = AddCommands | AddSignals>
auto dynamicgraph::python::exposeEntity ( )
inline
Template Parameters
Optionsby default, all the signals and commands are added as attribute to the Python object. This behaviour works fine for entities that have static commands and signals. If some commands or signals are added or removed dynamiccally, then it is better to disable the default behaviour and handle it specifically.

Definition at line 49 of file module.hh.

◆ exposeSignal()

template<typename T , typename Time >
auto dynamicgraph::python::exposeSignal ( const std::string &  name)

Definition at line 17 of file signal.hh.

◆ exposeSignal< MatrixHomogeneous, sigtime_t >()

template<>
auto dynamicgraph::python::exposeSignal< MatrixHomogeneous, sigtime_t > ( const std::string &  name)

Definition at line 89 of file signal-base-py.cc.

◆ exposeSignalBase()

template<typename Time >
void dynamicgraph::python::exposeSignalBase ( const char *  name)

Definition at line 39 of file signal-base-py.cc.

◆ exposeSignalPtr()

template<typename T , typename Time >
auto dynamicgraph::python::exposeSignalPtr ( const std::string &  name)

Definition at line 44 of file signal.hh.

◆ exposeSignals()

void dynamicgraph::python::exposeSignals ( )

Definition at line 107 of file signal-base-py.cc.

◆ exposeSignalsOfType()

template<typename T , typename Time >
void dynamicgraph::python::exposeSignalsOfType ( const std::string &  name)

Definition at line 64 of file signal.hh.

◆ exposeSignalTimeDependent()

template<typename T , typename Time >
auto dynamicgraph::python::exposeSignalTimeDependent ( const std::string &  name)

Definition at line 54 of file signal.hh.

◆ exposeSignalWrapper()

template<typename T , typename Time >
auto dynamicgraph::python::exposeSignalWrapper ( const std::string &  name)

Definition at line 34 of file signal.hh.

◆ HandleErr()

bool dynamicgraph::python::HandleErr ( std::string &  err,
PyObject *  globals_,
int  PythonInputType 
)

Definition at line 39 of file interpreter.cc.

◆ plug()

void dynamicgraph::python::plug ( SignalBase< sigtime_t > *  signalOut,
SignalBase< sigtime_t > *  signalIn 
)

plug a signal into another one.

Definition at line 35 of file dynamic-graph-py.cc.

◆ to_py_list()

template<typename Iterator >
bp::list dynamicgraph::python::to_py_list ( Iterator  begin,
Iterator  end 
)
inline

Definition at line 21 of file dynamic-graph-py.hh.

◆ to_py_tuple()

template<typename Iterator >
bp::tuple dynamicgraph::python::to_py_tuple ( Iterator  begin,
Iterator  end 
)
inline

Definition at line 29 of file dynamic-graph-py.hh.

◆ to_std_vector()

template<typename T >
std::vector<T> dynamicgraph::python::to_std_vector ( const bp::object &  iterable)
inline

Definition at line 34 of file dynamic-graph-py.hh.

Variable Documentation

◆ AddCommands

constexpr int dynamicgraph::python::AddCommands = 2
constexpr

Definition at line 20 of file module.hh.

◆ AddSignals

constexpr int dynamicgraph::python::AddSignals = 1
constexpr

Definition at line 19 of file module.hh.

◆ pythonPrefix

const std::string dynamicgraph::python::pythonPrefix[8]
static
Initial value:
= {
"from __future__ import print_function\n",
"import traceback\n",
"class StdoutCatcher:\n"
" def __init__(self):\n"
" self.data = ''\n"
" def write(self, stuff):\n"
" self.data = self.data + stuff\n"
" def fetch(self):\n"
" s = self.data[:]\n"
" self.data = ''\n"
" return s\n",
"stdout_catcher = StdoutCatcher()\n",
"stderr_catcher = StdoutCatcher()\n",
"import sys\n",
"sys.stdout = stdout_catcher",
"sys.stderr = stderr_catcher"}

Definition at line 21 of file interpreter.cc.



dynamic-graph-python
Author(s): Nicolas Mansard, Olivier Stasse
autogenerated on Fri Oct 27 2023 02:16:37