forked from RainerKuemmerle/g2o
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Written code for 3D lines vertex representation. Testing phase.
- Loading branch information
Showing
12 changed files
with
377 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
INCLUDE_DIRECTORIES(${CSPARSE_INCLUDE_DIR}) | ||
|
||
ADD_EXECUTABLE(line_test line_test.cpp) | ||
TARGET_LINK_LIBRARIES(line_test types_slam3d_addons types_slam3d) | ||
SET_TARGET_PROPERTIES(line_test PROPERTIES OUTPUT_NAME line_test${EXE_POSTFIX}) | ||
|
||
# ADD_EXECUTABLE(simulator_3d_plane | ||
# simulator_3d_plane.cpp | ||
# ) | ||
# TARGET_LINK_LIBRARIES(simulator_3d_plane solver_csparse types_slam3d_addons) | ||
# SET_TARGET_PROPERTIES(simulator_3d_plane PROPERTIES OUTPUT_NAME simulator_3d_plane${EXE_POSTFIX}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#include <iostream> | ||
|
||
#include "g2o/types/slam3d/isometry3d_mappings.h" | ||
#include "g2o/types/slam3d/isometry3d_gradients.h" | ||
#include "g2o/types/slam3d_addons/types_slam3d_addons.h" | ||
|
||
using namespace std; | ||
using namespace Eigen; | ||
using namespace g2o; | ||
using namespace g2o::internal; | ||
|
||
template <typename T> | ||
ostream& printVector(ostream& os, const T& t) { | ||
for(int i = 0; i < t.rows(); ++i) { | ||
os << t(i) << " "; | ||
} | ||
return os; | ||
} | ||
|
||
// TODO Jacopo | ||
|
||
int main(int /*argc*/, char** /*argv*/) { | ||
// Vector6d t; | ||
// t << -3.0, -2.0, -4.0, 0.2, 0.1, 0.3; | ||
// Isometry3D T = fromVectorMQT(t); | ||
// std::cout << "Transform" << std::endl; | ||
// std::cout << T.matrix() << std::endl; | ||
|
||
// Vector6d cl1; | ||
// cl1 << 20.0, 50.0, -70.0, 0.1, 0.2, 0.3; | ||
// cl1 = normalizeCartesianLine(cl1); | ||
// std::cout << "Cartesian line L1: "; | ||
// printVector(std::cout, cl1); | ||
// std::cout << endl; | ||
|
||
// Line3D pl1 = Line3D::fromCartesian(cl1); | ||
// std::cout << "Pluecker line L1: "; | ||
// printVector(std::cout, pl1); | ||
// std::cout << std::endl; | ||
// std::cout << "Cartesian line L1, reconstructed from pluecker: "; | ||
// printVector(std::cout, pl1.toCartesian()); | ||
// std::cout << std::endl; | ||
|
||
// Vector6d cl2 = transformCartesianLine(T, cl1); | ||
// Line3D pl2 = T*pl1; | ||
|
||
// std::cout << "Transformed line L2: "; | ||
// printVector(std::cout, cl2); | ||
// std::cout << std::endl; | ||
// std::cout << "Transformed pline L2: "; | ||
// printVector(std::cout, pl2); | ||
// std::cout << std::endl; | ||
// std::cout << "Error of cartesian line L2, reconstructed from puecker: "; | ||
// printVector(std::cout, cl2 - pl2.toCartesian()); | ||
// std::cout << endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,8 @@ | |
#include "g2o/config.h" | ||
#include "g2o/core/base_binary_edge.h" | ||
|
||
// TODO Jacopo | ||
|
||
namespace g2o | ||
{ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.