Skip to content
Snippets Groups Projects
Commit 8aae04af authored by Rohan Budhiraja's avatar Rohan Budhiraja
Browse files

[wip/dynamic-graph3][PATCH] update the ostream output format for MatrixHomogeneous

parent ec02ca3d
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
PKG_NAME= dynamic-graph
VERSION= 3.0.0
DISTNAME= ${PKG_NAME}-${VERSION}
PKGREVISION= 1
CATEGORIES= wip
MASTER_SITES= ${MASTER_SITE_OPENROBOTS:=dynamic-graph/}
......@@ -25,7 +26,6 @@ CMAKE_ARGS+= -DMANDIR=${PREFIX}/${PKGMANDIR}
# library location
CMAKE_ARGS+= -DCMAKE_INSTALL_LIBDIR=lib
PATCH_STRIP?= -p1
include ../../math/eigen3/depend.mk
include ../../pkgtools/pkg-config/depend.mk
include ../../mk/sysdep/cmake.mk
......
SHA1 (dynamic-graph-3.0.0.tar.gz) = 2d88c7942ecbb2b8d5d680fcf8c21eaf4bc6ff34
RMD160 (dynamic-graph-3.0.0.tar.gz) = e2f50ba8e06003d264fd9e61afef9248c7df4dea
Size (dynamic-graph-3.0.0.tar.gz) = 429940 bytes
SHA1 (patch-aa) = d0c2f6a2201962295e3efc5c5a5c61d19c32a5fd
SHA1 (patch-aa) = d8d3aa22eea6c004d8bce7fbbe3c54c376463303
SHA1 (patch-ab) = f162e6527d43a57adb10700242997838c0446cc9
......@@ -3,8 +3,8 @@ 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
--- a/include/dynamic-graph/value.h
+++ b/include/dynamic-graph/value.h
--- include/dynamic-graph/value.h
+++ include/dynamic-graph/value.h
@@ -30,8 +30,6 @@ namespace dynamicgraph {
class Value;
class DYNAMIC_GRAPH_DLLAPI EitherType {
......@@ -63,8 +63,8 @@ index d8adc30..ffa43c0 100644
};
diff --git a/src/command/command.cpp b/src/command/command.cpp
index 7cd2b51..350a6af 100644
--- a/src/command/command.cpp
+++ b/src/command/command.cpp
--- 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]) {
......@@ -76,8 +76,8 @@ index 7cd2b51..350a6af 100644
throw ExceptionAbstract(ExceptionAbstract::TOOLS, ss.str());
diff --git a/src/command/value.cpp b/src/command/value.cpp
index ed77090..4ff3123 100644
--- a/src/command/value.cpp
+++ b/src/command/value.cpp
--- src/command/value.cpp
+++ src/command/value.cpp
@@ -61,9 +61,14 @@ namespace dynamicgraph {
{
return value_->vectorValue();
......
[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;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment