Skip to content
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ libraries/setup/boost_1_58_0/
libraries/tbb43_20150611oss/
libraries/vicon/
libraries/*.log
modules/infinitam/
*.tags
tags
tests/mike/
Expand Down
69 changes: 69 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"files.associations": {
"xstring": "cpp",
"memory": "cpp",
"*.tpp": "cpp",
"*.tcu": "cpp",
"algorithm": "cpp",
"atomic": "cpp",
"bit": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"compare": "cpp",
"concepts": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"deque": "cpp",
"exception": "cpp",
"fstream": "cpp",
"functional": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"ios": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"iterator": "cpp",
"limits": "cpp",
"list": "cpp",
"map": "cpp",
"new": "cpp",
"numeric": "cpp",
"ostream": "cpp",
"queue": "cpp",
"set": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"string": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"typeinfo": "cpp",
"unordered_map": "cpp",
"utility": "cpp",
"vector": "cpp",
"xfacet": "cpp",
"xhash": "cpp",
"xiosbase": "cpp",
"xlocale": "cpp",
"xlocinfo": "cpp",
"xlocmon": "cpp",
"xlocnum": "cpp",
"xloctime": "cpp",
"xmemory": "cpp",
"xstddef": "cpp",
"xtr1common": "cpp",
"xtree": "cpp",
"xutility": "cpp",
"ratio": "cpp",
"stop_token": "cpp",
"thread": "cpp"
}
}
19 changes: 8 additions & 11 deletions apps/spaintgui/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ using namespace tvgutil;

//#################### CONSTRUCTORS ####################

Application::Application(const MultiScenePipeline_Ptr& pipeline, bool renderFiducials)
: m_activeSubwindowIndex(0),
Application::Application(const MultiScenePipeline_Ptr& pipeline, bool renderFiducials, std::string name)
: m_name(name),
m_activeSubwindowIndex(0),
m_batchModeEnabled(false),
m_commandManager(10),
m_pauseBetweenFrames(true),
Expand Down Expand Up @@ -141,7 +142,9 @@ bool Application::run()
if(m_saveMeshOnExit) save_mesh();

// If desired, save a model of each scene before the application terminates.
if(m_saveModelsOnExit) save_models();
// if(m_saveModelsOnExit) save_models();
// set save model as default to save voxel scene for relocalisation later
save_models();

return true;
}
Expand Down Expand Up @@ -1032,14 +1035,8 @@ void Application::save_mesh() const

void Application::save_models() const
{
// Find the models directory and make sure it exists.
boost::filesystem::path modelsSubdir = find_subdir_from_executable("models");
boost::filesystem::create_directories(modelsSubdir);

// Determine the directory to use for saving the models, based on either the experiment tag (if specified) or the current timestamp (otherwise).
const Settings_CPtr& settings = m_pipeline->get_model()->get_settings();
std::string modelName = settings->get_first_value<std::string>("experimentTag", TimeUtil::get_iso_timestamp());
boost::filesystem::path outputDir = modelsSubdir / modelName;
std::string modelName = m_name;
boost::filesystem::path outputDir = modelName;

// Save the models to disk.
m_pipeline->save_models(outputDir);
Expand Down
5 changes: 4 additions & 1 deletion apps/spaintgui/Application.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ class Application

//#################### PRIVATE VARIABLES ####################
private:
/** Save model and relocalisation to this file. */
std::string m_name;

/** The index of the sub-window with which the user is interacting. */
size_t m_activeSubwindowIndex;

Expand Down Expand Up @@ -113,7 +116,7 @@ class Application
* \param pipeline The multi-scene pipeline that the application should use.
* \param renderFiducials Whether or not to render the fiducials (if any) that have been detected in the 3D scene.
*/
Application(const MultiScenePipeline_Ptr& pipeline, bool renderFiducials = false);
Application(const MultiScenePipeline_Ptr& pipeline, bool renderFiducials = false, std::string name = "");

//#################### PUBLIC MEMBER FUNCTIONS ####################
public:
Expand Down
20 changes: 0 additions & 20 deletions apps/spaintgui/core/CollaborativePipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,6 @@ CollaborativePipeline::CollaborativePipeline(const Settings_Ptr& settings, const
}
}

// Finally, we add a collaborative component to handle relocalisation between the different scenes.
/* std::cout << "after SLAMComponent allocate\n";
for(int i = 0; i < 3; ++i)
{
// Set the GPU as active.
ORcudaSafeCall(cudaSetDevice(i));

// Look up its memory usage.
size_t freeMemory, totalMemory;
ORcudaSafeCall(cudaMemGetInfo(&freeMemory, &totalMemory));

// Convert the memory usage to MB.
const size_t bytesPerMb = 1024 * 1024;
const size_t freeMb = freeMemory / bytesPerMb;
const size_t usedMb = (totalMemory - freeMemory) / bytesPerMb;
const size_t totalMb = totalMemory / bytesPerMb;

// Save the memory usage to the output stream.
std::cout << i << " freeMb: " << freeMb << ";" << " usedMb: " << usedMb << ";" << " totalMb: "<< totalMb << "\n";
}*/
m_collaborativeComponent.reset(new CollaborativeComponent(m_model, collaborationMode));
}

Expand Down
2 changes: 1 addition & 1 deletion apps/spaintgui/core/MultiScenePipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void MultiScenePipeline::save_models(const bf::path& outputDir) const
// Save the models for each scene into a separate subdirectory.
for(std::map<std::string,SLAMComponent_Ptr>::const_iterator it = m_slamComponents.begin(), iend = m_slamComponents.end(); it != iend; ++it)
{
const bf::path scenePath = outputDir / it->first;
const bf::path scenePath = outputDir / "model";
std::cout << "Saving models for " << it->first << " in: " << scenePath << '\n';
it->second->save_models(scenePath.string());
}
Expand Down
Loading