diff --git a/dynamic-graph-v3/Makefile b/dynamic-graph-v3/Makefile index 3a31e102fdcb2435a4ec353ecab5e24e14fb34df..04a062d1b0fb61e6a6e0ac4fb18178bda4d78e7f 100644 --- a/dynamic-graph-v3/Makefile +++ b/dynamic-graph-v3/Makefile @@ -2,9 +2,9 @@ # Created: Rohan Budhiraja on Fri, 25 Jan 2016 # PKG_NAME= dynamic-graph-v3 -VERSION= 3.0.0 +VERSION= 3.0.1 DISTNAME= ${PKG_NAME}-${VERSION} -PKGREVISION= 2 +PKGREVISION= 0 CATEGORIES= wip MASTER_SITES= ${MASTER_SITE_OPENROBOTS:=dynamic-graph-v3/} diff --git a/dynamic-graph-v3/PLIST b/dynamic-graph-v3/PLIST index bc1040b6591a27d87ef4a39ffac6ff632059d0ff..10aaeb12914ca6aacfe3998f933020635c0c8129 100644 --- a/dynamic-graph-v3/PLIST +++ b/dynamic-graph-v3/PLIST @@ -1,59 +1,58 @@ @comment Fri Dec 11 17:57:27 CET 2015 -include/dynamic-graph/all-commands.h -include/dynamic-graph/all-signals.h -include/dynamic-graph/command-bind.h -include/dynamic-graph/command-direct-getter.h -include/dynamic-graph/command-direct-setter.h -include/dynamic-graph/command-getter.h -include/dynamic-graph/command-getter.t.cpp -include/dynamic-graph/command-setter.h -include/dynamic-graph/command-setter.t.cpp -include/dynamic-graph/command.h -include/dynamic-graph/config-contiifstream.hh -include/dynamic-graph/config-shell-procedure.hh -include/dynamic-graph/config-tracer-real-time.hh -include/dynamic-graph/config-tracer.hh -include/dynamic-graph/config.h + include/dynamic-graph/config.hh +include/dynamic-graph/deprecated.hh +include/dynamic-graph/warning.hh +include/dynamic-graph/config-tracer.hh +include/dynamic-graph/config-tracer-real-time.hh +include/dynamic-graph/config-shell-procedure.hh +include/dynamic-graph/config-contiifstream.hh +lib/pkgconfig/dynamic-graph.pc +lib/libdynamic-graph.so.${PKGVERSION} +lib/libdynamic-graph.so +lib/plugin/tracer.so +lib/plugin/tracer-real-time.so +include/dynamic-graph/import-default-paths.h +include/dynamic-graph/fwd.hh +include/dynamic-graph/null-ptr.hh include/dynamic-graph/contiifstream.h include/dynamic-graph/debug.h -include/dynamic-graph/deprecated.hh include/dynamic-graph/dynamic-graph-api.h -include/dynamic-graph/entity-helper.h include/dynamic-graph/entity.h +include/dynamic-graph/factory.h +include/dynamic-graph/pool.h include/dynamic-graph/exception-abstract.h include/dynamic-graph/exception-factory.h include/dynamic-graph/exception-signal.h include/dynamic-graph/exception-traces.h -include/dynamic-graph/factory.h -include/dynamic-graph/fwd.hh -include/dynamic-graph/import-default-paths.h -include/dynamic-graph/linear-algebra.h -include/dynamic-graph/eigen-io.h -include/dynamic-graph/null-ptr.hh -include/dynamic-graph/pool.h +include/dynamic-graph/signal.h include/dynamic-graph/signal-array.h include/dynamic-graph/signal-base.h -include/dynamic-graph/signal-cast-helper.h -include/dynamic-graph/signal-caster.h -include/dynamic-graph/signal-helper.h include/dynamic-graph/signal-ptr.h -include/dynamic-graph/signal-ptr.t.cpp include/dynamic-graph/signal-time-dependent.h -include/dynamic-graph/signal.h +include/dynamic-graph/signal-ptr.t.cpp include/dynamic-graph/signal.t.cpp include/dynamic-graph/time-dependency.h include/dynamic-graph/time-dependency.t.cpp -include/dynamic-graph/tracer-real-time.h +include/dynamic-graph/signal-caster.h +include/dynamic-graph/signal-cast-helper.h +include/dynamic-graph/all-signals.h +include/dynamic-graph/signal-helper.h +include/dynamic-graph/entity-helper.h include/dynamic-graph/tracer.h +include/dynamic-graph/tracer-real-time.h +include/dynamic-graph/command.h +include/dynamic-graph/eigen-io.h +include/dynamic-graph/linear-algebra.h include/dynamic-graph/value.h -include/dynamic-graph/warning.hh -lib/libdynamic-graph.so -lib/libdynamic-graph.so.${PKGVERSION} -lib/pkgconfig/dynamic-graph.pc -lib/plugin/tracer-real-time.so -lib/plugin/tracer.so +include/dynamic-graph/command-setter.h +include/dynamic-graph/command-setter.t.cpp +include/dynamic-graph/command-getter.h +include/dynamic-graph/command-getter.t.cpp +include/dynamic-graph/command-direct-getter.h +include/dynamic-graph/command-direct-setter.h +include/dynamic-graph/command-bind.h +include/dynamic-graph/all-commands.h share/dynamic-graph/script/shell.dg share/dynamic-graph/script/tracer.dg ${PKGMANDIR}/man1/dg-shell-plugin.1.gz -${PKGMANDIR}/man1/dg-shell.1.gz diff --git a/dynamic-graph-v3/distinfo b/dynamic-graph-v3/distinfo index de055fdaf715fc2681a9e9d681c6aa13de8399d3..370187eb37db049233af62cf6c3052fc82cc0dda 100644 --- a/dynamic-graph-v3/distinfo +++ b/dynamic-graph-v3/distinfo @@ -1,6 +1,3 @@ -SHA1 (dynamic-graph-v3-3.0.0.tar.gz) = d04fb4f291b0b2f214502a95006f83e94a804182 -RMD160 (dynamic-graph-v3-3.0.0.tar.gz) = 07a796479e24a08ad8600010846402ba5003c12b -Size (dynamic-graph-v3-3.0.0.tar.gz) = 430209 bytes -SHA1 (patch-aa) = d8d3aa22eea6c004d8bce7fbbe3c54c376463303 -SHA1 (patch-ab) = f162e6527d43a57adb10700242997838c0446cc9 -SHA1 (patch-ac) = 302875035b9e3ed3b82593bc4903c46b831b4bb8 +SHA1 (dynamic-graph-v3-3.0.1.tar.gz) = be6b9f53e57394a85ec48763fd840d5e618ead7d +RMD160 (dynamic-graph-v3-3.0.1.tar.gz) = f2a95a3d995ecf88cc866ac68d88884c1c5bcb58 +Size (dynamic-graph-v3-3.0.1.tar.gz) = 1210602 bytes diff --git a/dynamic-graph-v3/patches/patch-aa b/dynamic-graph-v3/patches/patch-aa deleted file mode 100644 index b4410610b5f8598558437d8e2045c7421dfad196..0000000000000000000000000000000000000000 --- a/dynamic-graph-v3/patches/patch-aa +++ /dev/null @@ -1,193 +0,0 @@ -Patch for inputing Eigen::Transform as Matrix4d - - -diff --git a/include/dynamic-graph/value.h b/include/dynamic-graph/value.h -index d8adc30..ffa43c0 100644 ---- include/dynamic-graph/value.h -+++ include/dynamic-graph/value.h -@@ -30,8 +30,6 @@ namespace dynamicgraph { - class Value; - class DYNAMIC_GRAPH_DLLAPI EitherType { - public: -- EIGEN_MAKE_ALIGNED_OPERATOR_NEW -- - EitherType(const Value& value); - ~EitherType(); - operator bool () const; -@@ -41,16 +39,14 @@ namespace dynamicgraph { - operator double () const; - operator std::string () const; - operator Vector () const; -- operator Matrix () const; -+ operator Eigen::MatrixXd () const; -+ operator Eigen::Matrix4d () const; - private: - const Value* value_; - }; - - class DYNAMIC_GRAPH_DLLAPI Value { - public: -- -- EIGEN_MAKE_ALIGNED_OPERATOR_NEW -- - enum Type { - NONE, - BOOL, -@@ -61,6 +57,7 @@ namespace dynamicgraph { - STRING, - VECTOR, - MATRIX, -+ MATRIX4D, - NB_TYPES - }; - ~Value(); -@@ -72,7 +69,8 @@ namespace dynamicgraph { - explicit Value(const double& value); - explicit Value(const std::string& value); - explicit Value(const Vector& value); -- explicit Value(const Matrix& value); -+ explicit Value(const Eigen::MatrixXd& value); -+ explicit Value(const Eigen::Matrix4d& value); - /// Copy constructor - Value(const Value& value); - // Construct an empty value (None) -@@ -108,7 +106,8 @@ namespace dynamicgraph { - double doubleValue() const; - std::string stringValue() const; - Vector vectorValue() const; -- Matrix matrixValue() const; -+ Eigen::MatrixXd matrixXdValue() const; -+ Eigen::Matrix4d matrix4dValue() const; - Type type_; - const void* const value_; - }; -diff --git a/src/command/command.cpp b/src/command/command.cpp -index 7cd2b51..350a6af 100644 ---- src/command/command.cpp -+++ src/command/command.cpp -@@ -50,7 +50,7 @@ namespace dynamicgraph { - for (unsigned int iParam=0; iParam < values.size(); iParam++) { - if (values[iParam].type() != paramTypes[iParam]) { - std::stringstream ss; -- ss << "argument " << iParam << "is of wrong type: " -+ ss << "argument " << iParam << " is of wrong type: " - << Value::typeName(paramTypes[iParam]) << " expected, got " - << Value::typeName(values[iParam].type()); - throw ExceptionAbstract(ExceptionAbstract::TOOLS, ss.str()); -diff --git a/src/command/value.cpp b/src/command/value.cpp -index ed77090..4ff3123 100644 ---- src/command/value.cpp -+++ src/command/value.cpp -@@ -61,9 +61,14 @@ namespace dynamicgraph { - { - return value_->vectorValue(); - } -- EitherType::operator Matrix() const -+ EitherType::operator Eigen::MatrixXd() const - { -- return value_->matrixValue(); -+ return value_->matrixXdValue(); -+ } -+ -+ EitherType::operator Eigen::Matrix4d() const -+ { -+ return value_->matrix4dValue(); - } - - void Value::deleteValue () -@@ -91,7 +96,10 @@ namespace dynamicgraph { - delete(const Vector*)value_; - break; - case MATRIX: -- delete(const Matrix*)value_; -+ delete(const Eigen::MatrixXd*)value_; -+ break; -+ case MATRIX4D: -+ delete(const Eigen::Matrix4d*)value_; - break; - default:; - } -@@ -129,8 +137,12 @@ namespace dynamicgraph { - value_(new Vector(value)) - { - } -- Value::Value(const Matrix& value) : type_(MATRIX), -- value_(new Matrix(value)) -+ Value::Value(const Eigen::MatrixXd& value) : type_(MATRIX), -+ value_(new Eigen::MatrixXd(value)) -+ { -+ } -+ Value::Value(const Eigen::Matrix4d& value) : type_(MATRIX4D), -+ value_(new Eigen::Matrix4d(value)) - { - } - -@@ -168,7 +180,10 @@ namespace dynamicgraph { - copy = new Vector(value.vectorValue()); - break; - case Value::MATRIX: -- copy = new Matrix(value.matrixValue()); -+ copy = new Eigen::MatrixXd(value.matrixXdValue()); -+ break; -+ case Value::MATRIX4D: -+ copy = new Eigen::Matrix4d(value.matrix4dValue()); - break; - default: - abort(); -@@ -262,12 +277,20 @@ namespace dynamicgraph { - "value is not an vector"); - } - -- Matrix Value::matrixValue() const -+ Eigen::MatrixXd Value::matrixXdValue() const - { - if(type_ == MATRIX) -- return *((const Matrix*)value_); -+ return *((const Eigen::MatrixXd*)value_); -+ throw ExceptionAbstract(ExceptionAbstract::TOOLS, -+ "value is not a Eigen matrixXd"); -+ } -+ -+ Eigen::Matrix4d Value::matrix4dValue() const -+ { -+ if(type_ == MATRIX4D) -+ return *((const Eigen::Matrix4d*)value_); - throw ExceptionAbstract(ExceptionAbstract::TOOLS, -- "value is not a matrix"); -+ "value is not a Eigen matrix4d"); - } - - std::string Value::typeName(Type type) -@@ -288,7 +311,9 @@ namespace dynamicgraph { - case VECTOR: - return std::string("vector"); - case MATRIX: -- return std::string("matrix"); -+ return std::string("matrixXd"); -+ case MATRIX4D: -+ return std::string("matrix4d"); - default: - return std::string("unknown"); - } -@@ -321,7 +346,10 @@ namespace dynamicgraph { - os << value.vectorValue(); - break; - case Value::MATRIX: -- os << value.matrixValue(); -+ os << value.matrixXdValue(); -+ break; -+ case Value::MATRIX4D: -+ os << value.matrix4dValue(); - break; - default: - return os; -@@ -336,7 +364,8 @@ namespace dynamicgraph { - template<> const Value::Type ValueHelper<double>::TypeID = Value::DOUBLE; - template<> const Value::Type ValueHelper<std::string>::TypeID = Value::STRING; - template<> const Value::Type ValueHelper<Vector>::TypeID = Value::VECTOR; -- template<> const Value::Type ValueHelper<Matrix>::TypeID = Value::MATRIX; -+ template<> const Value::Type ValueHelper<Eigen::MatrixXd>::TypeID = Value::MATRIX; -+ template<> const Value::Type ValueHelper<Eigen::Matrix4d>::TypeID = Value::MATRIX4D; - - } // namespace command - } //namespace dynamicgraph diff --git a/dynamic-graph-v3/patches/patch-ab b/dynamic-graph-v3/patches/patch-ab deleted file mode 100644 index f1c35cbf09cb84e8d26ae8dc6b3466d03dd44cb4..0000000000000000000000000000000000000000 --- a/dynamic-graph-v3/patches/patch-ab +++ /dev/null @@ -1,41 +0,0 @@ -[c++] Patch to update ostream output format for MatrixHomogeneous - -diff --git include/dynamic-graph/eigen-io.h include/dynamic-graph/eigen-io.h -index 60eab3f..89d8f33 100644 ---- include/dynamic-graph/eigen-io.h -+++ include/dynamic-graph/eigen-io.h -@@ -138,9 +138,21 @@ namespace Eigen { - - - -+ -+ /* \brief Eigen Homogeneous Matrix output -+ * -+ * Matrix format: [M,N]((val11,val12,val13,...,val1N),...,(valM1,valM2,...,valMN)) -+ * e.g. [2,5]((1 23 32.2 12.12 32),(2 32 23 92.01 19.2)) -+ */ -+ - inline std::ostream& operator << (std::ostream &os, - Transform<double,3,Affine> MH) { -- os << MH.matrix(); return os; } -+ IOFormat boostFmt(StreamPrecision, DontAlignCols, -+ ",", ",", -+ "(",")", -+ "(",")"); -+ -+ os << "[4,4]"<< MH.matrix().format(boostFmt); return os; } - - - inline std::ostream& operator << (std::ostream &os, -diff --git include/dynamic-graph/linear-algebra.h include/dynamic-graph/linear-algebra.h -index 7605815..4b566fb 100644 ---- include/dynamic-graph/linear-algebra.h -+++ include/dynamic-graph/linear-algebra.h -@@ -18,6 +18,7 @@ - #ifndef DYNAMIC_GRAPH_LINEAR_ALGEBRA_H - #define DYNAMIC_GRAPH_LINEAR_ALGEBRA_H - #include <Eigen/Core> -+#include <Eigen/Geometry> - - namespace dynamicgraph { - typedef Eigen::MatrixXd Matrix; diff --git a/dynamic-graph-v3/patches/patch-ac b/dynamic-graph-v3/patches/patch-ac deleted file mode 100644 index 5591b2e22f40f46dd652e40fb0e85fb25f2aeb1f..0000000000000000000000000000000000000000 --- a/dynamic-graph-v3/patches/patch-ac +++ /dev/null @@ -1,73 +0,0 @@ -[c++] fix bug in matrix istream input operator - -diff --git include/dynamic-graph/eigen-io.h include/dynamic-graph/eigen-io.h -index 89d8f33..6352cb5 100644 ---- include/dynamic-graph/eigen-io.h -+++ include/dynamic-graph/eigen-io.h -@@ -39,6 +39,7 @@ using dynamicgraph::ExceptionSignal; - */ - namespace Eigen { - typedef EIGEN_DEFAULT_DENSE_INDEX_TYPE eigen_index; -+ - inline std::istringstream& operator >> (std::istringstream &iss, - dynamicgraph::Vector &inst) { - unsigned int _size; -@@ -88,7 +89,8 @@ namespace Eigen { - unsigned int _rowsize; - double _dbl_val; - char _ch; -- boost::format fmt ("Failed to enter %s as vector. Reenter as [N](val1,val2,val3,...,valN)"); -+ boost::format fmt ("Failed to enter %s as matrix. Reenter as ((val11,val12,val13,...,val1N),...,(valM1,valM2,...,valMN))"); -+ MatrixXd _tmp_matrix; - fmt %iss.str(); - if(iss>> _ch && _ch != '['){ - throw ExceptionSignal(ExceptionSignal::GENERIC, fmt.str()); -@@ -101,7 +103,7 @@ namespace Eigen { - if (iss.fail()) - throw ExceptionSignal(ExceptionSignal::GENERIC,fmt.str()); - else { -- inst.resize(_rowsize,_colsize); -+ _tmp_matrix.resize(_rowsize,_colsize); - if(iss >> _ch && _ch != ']') - throw ExceptionSignal(ExceptionSignal::GENERIC, fmt.str()); - else { -@@ -115,7 +117,7 @@ namespace Eigen { - iss >> _dbl_val; - if (iss.peek() == ',' || iss.peek() == ' ') - iss.ignore(); -- inst(j,i) = _dbl_val; -+ _tmp_matrix(j,i) = _dbl_val; - } - if(iss >> _ch && _ch != ')') - throw ExceptionSignal(ExceptionSignal::GENERIC, fmt.str()); -@@ -128,13 +130,14 @@ namespace Eigen { - } - } - } -+ inst = _tmp_matrix; - return iss; - } - - - inline std::istringstream& operator >> (std::istringstream &iss, - Transform<double,3,Affine> &inst) { -- Matrix4d M; iss >> M; inst = M; return iss; } -+ MatrixXd M; iss >> M; inst.matrix() = M; return iss; } - - - -@@ -157,12 +160,12 @@ namespace Eigen { - - inline std::ostream& operator << (std::ostream &os, - AngleAxisd quat) { -- Vector4d v; v(0) = quat.angle(); v.tail<3>() = quat.axis(); -+ VectorXd v(4); v(0) = quat.angle(); v.tail<3>() = quat.axis(); - os << v; return os; } - - inline std::istringstream& operator >> (std::istringstream &iss, - AngleAxisd &inst) { -- Vector4d v; iss >>v; -+ VectorXd v(4); iss >>v; - inst.angle() = v(0); inst.axis() = v.tail<3>(); - return iss; } -