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

Jetson nx #76

Open
wants to merge 23 commits into
base: jetson-nx
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
2 changes: 1 addition & 1 deletion 3DReconDemo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ int main(int argc, char **argv)
slam.AddKeyFrameAvailableHandler(saveFrameHandler, "saveframe");
}

SegmentedMesh * mesh = new SegmentedMesh(voxel_size, voxel_size * 5, open3d::integration::TSDFVolumeColorType::RGB8, block_size);
SegmentedMesh * mesh = new SegmentedMesh(voxel_size, voxel_size * 5, open3d::pipelines::integration::TSDFVolumeColorType::RGB8, block_size);

std::vector<float> intrinsics = camera.getColorIntrinsics();
auto intr = open3d::camera::PinholeCameraIntrinsic(640, 480, intrinsics[0], intrinsics[1], intrinsics[2], intrinsics[3]);
Expand Down
30 changes: 19 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required( VERSION 3.5 )
cmake_policy( VERSION 3.5 )


project( OpenARK )
set( OpenARK_VERSION_MAJOR 0 )
set( OpenARK_VERSION_MINOR 9 )
Expand All @@ -26,20 +25,34 @@ set( SLAM_REPLAYING_NAME "OpenARK_slam_replaying")
set( TEST_NAME "OpenARK_test" )
set( UNITY_PLUGIN_NAME "UnityPlugin" )

option( BUILD_HAND_DEMO "BUILD_HAND_DEMO" OFF )
option( BUILD_AVATAR_DEMO "BUILD_AVATAR_DEMO" OFF)
# Options.
option( EIGEN_HACK "EIGEN_HACK" ON)
option( BUILD_HAND_DEMO "BUILD_HAND_DEMO" ON )
option( BUILD_AVATAR_DEMO "BUILD_AVATAR_DEMO" ON)
option( BUILD_SLAM_DEMO "BUILD_SLAM_DEMO" ON)
option( BUILD_3DRECON_DEMO "BUILD_3DRECON_DEMO" ON)
option( BUILD_DATA_RECORDING "BUILD_DATA_RECORDING" OFF)
option( BUILD_DATA_RECORDING "BUILD_DATA_RECORDING" ON)
option( BUILD_SLAM_RECORDING "BUILD_SLAM_RECORDING" ON)
option( BUILD_SLAM_REPLAYING "BUILD_SLAM_REPLAYING" ON)
option( BUILD_TESTS "BUILD_TESTS" OFF )
option( BUILD_UNITY_PLUGIN "BUILD_UNITY_PLUGIN" ON )
option( BUILD_UNITY_PLUGIN "BUILD_UNITY_PLUGIN" OFF )
option( USE_AZURE_KINECT_SDK "USE_AZURE_KINECT_SDK" OFF )
option( USE_RSSDK2 "USE_RSSDK2" ON )
option( USE_RSSDK2 "USE_RSSDK2" OFF )
option( USE_RSSDK "USE_RSSDK" OFF )
option( USE_PMDSDK "USE_PMDSDK" OFF )

# Eigen hack for OpenARK Ubuntu version.
if( ${EIGEN_HACK} )
add_definitions(-DEIGEN_DONT_ALIGN=1)
add_definitions(-DEIGEN_DONT_VECTORIZE=1)
endif()

# NVIDIA Jetson Xavier NX
if(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "arm*")
message(STATUS "ARM processor detected, will attempt to use NEON.")
add_definitions(-D__ARM_NEON__)
endif()

include( CheckCXXCompilerFlag )
CHECK_CXX_COMPILER_FLAG( "-std=c++11" COMPILER_SUPPORTS_CXX11 )
CHECK_CXX_COMPILER_FLAG( "-std=c++0x" COMPILER_SUPPORTS_CXX0X )
Expand All @@ -54,11 +67,6 @@ else()
message( STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler." )
endif()

message(STATUS "using c++17")
add_definitions(-DEIGEN_DONT_ALIGN=1)
add_definitions(-DEIGEN_DONT_VECTORIZE=1)


if ( CMAKE_COMPILER_IS_GNUCXX )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -Wno-deprecated-declarations -O3 -g" )
endif ( CMAKE_COMPILER_IS_GNUCXX )
Expand Down
10 changes: 5 additions & 5 deletions SegmentedMesh.cpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#include "SegmentedMesh.h"
#include "include/SegmentedMesh.h"

namespace ark {

SegmentedMesh::SegmentedMesh(double voxel_length,
double sdf_trunc,
open3d::integration::TSDFVolumeColorType color_type,
open3d::pipelines::integration::TSDFVolumeColorType color_type,
double block_length)
: block_length_(block_length),
voxel_length_(voxel_length),
sdf_trunc_(sdf_trunc),
color_type_(color_type){
Eigen::Vector3i * temp = &current_block;
temp = NULL;
active_volume = new open3d::integration::ScalableTSDFVolume(voxel_length_,
active_volume = new open3d::pipelines::integration::ScalableTSDFVolume(voxel_length_,
sdf_trunc_,
color_type_);
}
Expand Down Expand Up @@ -98,7 +98,7 @@ namespace ark {
completed_meshes.push_back(completed_mesh);


active_volume = new open3d::integration::ScalableTSDFVolume(voxel_length_, sdf_trunc_, color_type_);
active_volume = new open3d::pipelines::integration::ScalableTSDFVolume(voxel_length_, sdf_trunc_, color_type_);
active_volume_keyframe = latest_keyframe;
active_volume_map_index = active_map_index;

Expand Down Expand Up @@ -326,4 +326,4 @@ namespace ark {
}


}
}
2 changes: 1 addition & 1 deletion SlamReplaying.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,4 @@ int main(int argc, char **argv)
slam.ShutDown();
printf("\nExiting...\n");
return 0;
}
}
Loading