Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
robotpkg-wip
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
Gepetto
robotpkg-wip
Commits
70501397
Commit
70501397
authored
8 years ago
by
Rohan Budhiraja
Browse files
Options
Downloads
Patches
Plain Diff
[wip/dynamic-graph3][PATCH] fix bug in matrix istream input operator
parent
6d0c4067
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dynamic-graph3/Makefile
+1
-1
1 addition, 1 deletion
dynamic-graph3/Makefile
dynamic-graph3/distinfo
+1
-0
1 addition, 0 deletions
dynamic-graph3/distinfo
dynamic-graph3/patches/patch-ac
+73
-0
73 additions, 0 deletions
dynamic-graph3/patches/patch-ac
with
75 additions
and
1 deletion
dynamic-graph3/Makefile
+
1
−
1
View file @
70501397
...
...
@@ -4,7 +4,7 @@
PKG_NAME
=
dynamic-graph
VERSION
=
3.0.0
DISTNAME
=
${
PKG_NAME
}
-
${
VERSION
}
PKGREVISION
=
1
PKGREVISION
=
2
CATEGORIES
=
wip
MASTER_SITES
=
${
MASTER_SITE_OPENROBOTS:
=
dynamic-graph/
}
...
...
This diff is collapsed.
Click to expand it.
dynamic-graph3/distinfo
+
1
−
0
View file @
70501397
...
...
@@ -3,3 +3,4 @@ RMD160 (dynamic-graph-3.0.0.tar.gz) = e2f50ba8e06003d264fd9e61afef9248c7df4dea
Size (dynamic-graph-3.0.0.tar.gz) = 429940 bytes
SHA1 (patch-aa) = d8d3aa22eea6c004d8bce7fbbe3c54c376463303
SHA1 (patch-ab) = f162e6527d43a57adb10700242997838c0446cc9
SHA1 (patch-ac) = 302875035b9e3ed3b82593bc4903c46b831b4bb8
This diff is collapsed.
Click to expand it.
dynamic-graph3/patches/patch-ac
0 → 100644
+
73
−
0
View file @
70501397
[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; }
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