Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dependency compiler error and local setting #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

IF (NOT DEFINED REPO_DIR)
SET(REPO_DIR \".\")
ENDIF()
ADD_DEFINITIONS(-DREPO_DIR=${REPO_DIR})

# required libs
find_package(Eigen3 REQUIRED)
find_package(OpenCV REQUIRED)
Expand Down
4 changes: 2 additions & 2 deletions examples/run_dso_euroc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ using namespace ldso;

std::string source = "/home/xiang/Dataset/EUROC/MH_01_easy/cam0";
std::string output_file = "./results.txt";
std::string calib = "./examples/EUROC/EUROC.txt";
std::string vocPath = "./vocab/orbvoc.dbow3";
std::string calib = std::string(REPO_DIR) + "/examples/EUROC/EUROC.txt";
std::string vocPath = std::string(REPO_DIR) + "/vocab/orbvoc.dbow3";

int startIdx = 0;
int endIdx = 100000;
Expand Down
4 changes: 2 additions & 2 deletions examples/run_dso_kitti.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ using namespace ldso;

std::string source = "/media/Data/Dataset/Kitti/dataset/sequences/00";
std::string output_file = "./results.txt";
std::string calib = "./examples/Kitti/Kitti00-02.txt";
std::string vocPath = "./vocab/orbvoc.dbow3";
std::string calib = std::string(REPO_DIR) + "/examples/Kitti/Kitti00-02.txt";
std::string vocPath = std::string(REPO_DIR) + "/vocab/orbvoc.dbow3";

int startIdx = 0;
int endIdx = 100000;
Expand Down
2 changes: 1 addition & 1 deletion examples/run_dso_tum_mono.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ std::string gammaCalib = "/media/gaoxiang/Data1/Dataset/TUM-MONO/sequence_31/pca
std::string source = "/media/gaoxiang/Data1/Dataset/TUM-MONO/sequence_31/";
std::string calib = "/media/gaoxiang/Data1/Dataset/TUM-MONO/sequence_31/camera.txt";
std::string output_file = "./results.txt";
std::string vocPath = "./vocab/orbvoc.dbow3";
std::string vocPath = std::string(REPO_DIR) + "/vocab/orbvoc.dbow3";

double rescale = 1;
bool reversePlay = false;
Expand Down
13 changes: 7 additions & 6 deletions make_project.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
#!/usr/bin/env bash

set -e

BUILD_TYPE=Release
NUM_PROC=4

BASEDIR="$PWD"

cd "$BASEDIR/thirdparty/DBoW3"
mkdir build
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
make -j$NUM_PROC

cd "$BASEDIR/thirdparty/g2o"
mkdir build
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
make -j$NUM_PROC

cd "$BASEDIR"
mkdir build
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
make -j$NUM_PROC

cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DREPO_DIR=\"$BASEDIR\" ..
make -j$NUM_PROC
4 changes: 2 additions & 2 deletions thirdparty/g2o/g2o/core/base_binary_edge.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ namespace g2o {
typedef typename BaseEdge<D,E>::ErrorVector ErrorVector;
typedef typename BaseEdge<D,E>::InformationType InformationType;

typedef Eigen::Map<Matrix<double, Di, Dj>, Matrix<double, Di, Dj>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockType;
typedef Eigen::Map<Matrix<double, Dj, Di>, Matrix<double, Dj, Di>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockTransposedType;
typedef Eigen::Map<Matrix<double, Di, Dj>, Matrix<double, Di, Dj>::Flags & PacketAccessBit ? Aligned : Unaligned > HessianBlockType;
typedef Eigen::Map<Matrix<double, Dj, Di>, Matrix<double, Dj, Di>::Flags & PacketAccessBit ? Aligned : Unaligned > HessianBlockTransposedType;

BaseBinaryEdge() : BaseEdge<D,E>(),
_hessianRowMajor(false),
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/g2o/g2o/core/base_multi_edge.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace g2o {
typedef MatrixXd::MapType JacobianType;
typedef typename BaseEdge<D,E>::ErrorVector ErrorVector;
typedef typename BaseEdge<D,E>::InformationType InformationType;
typedef Eigen::Map<MatrixXd, MatrixXd::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockType;
typedef Eigen::Map<MatrixXd, MatrixXd::Flags & PacketAccessBit ? Aligned : Unaligned > HessianBlockType;

BaseMultiEdge() : BaseEdge<D,E>()
{
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/g2o/g2o/core/base_vertex.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace g2o {

static const int Dimension = D; ///< dimension of the estimate (minimal) in the manifold space

typedef Eigen::Map<Matrix<double, D, D>, Matrix<double,D,D>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockType;
typedef Eigen::Map<Matrix<double, D, D>, Matrix<double,D,D>::Flags & PacketAccessBit ? Aligned : Unaligned > HessianBlockType;

public:
BaseVertex();
Expand Down
14 changes: 6 additions & 8 deletions thirdparty/g2o/g2o/core/hyper_graph_action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,16 +252,14 @@ namespace g2o {

void applyAction(HyperGraph* graph, HyperGraphElementAction* action, HyperGraphElementAction::Parameters* params, const std::string& typeName)
{
for (HyperGraph::VertexIDMap::iterator it=graph->vertices().begin();
it!=graph->vertices().end(); ++it){
if ( typeName.empty() || typeid(*it->second).name()==typeName){
(*action)(it->second, params);
for (const auto& it: graph->vertices()){
if ( typeName.empty() || typeid(*it.second).name()==typeName){
(*action)(it.second, params);
}
}
for (HyperGraph::EdgeSet::iterator it=graph->edges().begin();
it!=graph->edges().end(); ++it){
if ( typeName.empty() || typeid(**it).name()==typeName)
(*action)(*it, params);
for (const auto& it: graph->edges()){
if ( typeName.empty() || typeid(*it).name()==typeName)
(*action)(it, params);
}
}

Expand Down
5 changes: 3 additions & 2 deletions thirdparty/g2o/g2o/core/optimizable_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,9 @@ namespace g2o {
for (size_t i=0; i<_parameters.size(); i++){
int index = _parameterIds[i];
*_parameters[i] = graph()->parameter(index);
if (typeid(**_parameters[i]).name()!=_parameterTypes[i]){
cerr << __PRETTY_FUNCTION__ << ": FATAL, parameter type mismatch - encountered " << typeid(**_parameters[i]).name() << "; should be " << _parameterTypes[i] << endl;
const auto& ref_parameter = **_parameters[i];
if (typeid(ref_parameter).name()!=_parameterTypes[i]){
cerr << __PRETTY_FUNCTION__ << ": FATAL, parameter type mismatch - encountered " << typeid(ref_parameter).name() << "; should be " << _parameterTypes[i] << endl;
}
if (!*_parameters[i]) {
cerr << __PRETTY_FUNCTION__ << ": FATAL, *_parameters[i] == 0" << endl;
Expand Down