• 大小: 3.56MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-08-13
  • 语言: 其他
  • 标签: LSD  SLAM  

资源简介

此版本是国外大神整理的LSD SLAM的非ROS版本,添加相应的库之后即可直接在windows或者Linux下运行。

资源截图

代码片段和文件信息

/**
* This file is part of LSD-SLAM.
*
* Copyright 2013 Jakob Engel  (Technical University of Munich)
* For more information see  
*
* LSD-SLAM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation either version 3 of the License or
* (at your option) any later version.
*
* LSD-SLAM is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LSD-SLAM. If not see .
*/

#include “DebugOutput3DWrapper.h“
#include “lsd_slam\util\sophus_util.h“
#include “lsd_slam\util\settings.h“

//#include “lsd_slam_viewer/keyframeGraphMsg.h“
//#include “lsd_slam_viewer/keyframeMsg.h“

#include “lsd_slam/model/frame.h“
#include “lsd_slam/global_mapping/key_frame_graph.h“
#include “sophus/sim3.hpp“
#include “lsd_slam/global_mapping/g2o_type_sim3_sophus.h“
#include 

namespace lsd_slam
{


DebugOutput3DWrapper::DebugOutput3DWrapper(int width int height)
{
cvNamedWindow(“Tracking_output“ 1); //Create window
this->width = width;
this->height = height;

/*liveframe_channel = nh_.resolveName(“lsd_slam/liveframes“);
liveframe_publisher = nh_.advertiseameMsg>(liveframe_channel1);

keyframe_channel = nh_.resolveName(“lsd_slam/keyframes“);
keyframe_publisher = nh_.advertiseameMsg>(keyframe_channel1);

graph_channel = nh_.resolveName(“lsd_slam/graph“);
graph_publisher = nh_.advertiseameGraphMsg>(graph_channel1);

debugInfo_channel = nh_.resolveName(“lsd_slam/debug“);
debugInfo_publisher = nh_.advertise(debugInfo_channel1);

pose_channel = nh_.resolveName(“lsd_slam/pose“);
pose_publisher = nh_.advertise(pose_channel1);*/

tracker_display = cv::Mat::ones(640 480 CV_8UC1);
cv::circle(tracker_display cv::Point(100100) 20 cv::Scalar(0 255 0));
cv::imshow(“Tracking_output“ tracker_display);
cvWaitKey(10);
publishLvl=0;
}

DebugOutput3DWrapper::~DebugOutput3DWrapper()
{
}


void DebugOutput3DWrapper::publishKeyframe(frame* f)
{
KeyframeMessage fMsg;


boost::shared_lock lock = f->getActiveLock();

fMsg.id = f->id();
fMsg.time = f->timestamp();
fMsg.isKeyframe = true;

int w = f->width(publishLvl);
int h = f->height(publishLvl);

memcpy(fMsg.camToWorld.data() f->getScaledCamToWorld().cast().data() sizeof(float)*7);
fMsg.fx = f->fx(publishLvl);
fMsg.fy = f->fy(publishLvl);
fMsg.cx = f->cx(publishLvl);
fMsg.cy = f->cy(publishLvl);
fMsg.width = w;
fMsg.height = h;



//fMsg.pointcloud.resize(w*h*sizeof(InputPointDense));

//Inp

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-01-14 08:59  lsd_slam-master\
     文件        1079  2015-01-14 08:59  lsd_slam-master\.gitignore
     文件        7931  2015-01-14 08:59  lsd_slam-master\CMakeLists.txt
     文件       35121  2015-01-14 08:59  lsd_slam-master\License.txt
     文件        1320  2015-01-14 08:59  lsd_slam-master\Readme.md
     文件        2156  2015-01-14 08:59  lsd_slam-master\WindowsBuildInstruction.md
     目录           0  2015-01-14 08:59  lsd_slam-master\apps\
     文件          85  2015-01-14 08:59  lsd_slam-master\apps\CMakeLists.txt
     目录           0  2015-01-14 08:59  lsd_slam-master\apps\slam\
     文件         952  2015-01-14 08:59  lsd_slam-master\apps\slam\CMakeLists.txt
     文件        8011  2015-01-14 08:59  lsd_slam-master\apps\slam\DebugOutput3DWrapper.cpp
     文件        3192  2015-01-14 08:59  lsd_slam-master\apps\slam\DebugOutput3DWrapper.h
     文件        2095  2015-01-14 08:59  lsd_slam-master\apps\slam\main_live_odometry.cc
     文件        8864  2015-01-14 08:59  lsd_slam-master\apps\slam\main_on_images.cc
     文件        2451  2015-01-14 08:59  lsd_slam-master\apps\slam\sample_app.cc
     目录           0  2015-01-14 08:59  lsd_slam-master\cmake\
     文件        7121  2015-01-14 08:59  lsd_slam-master\cmake\LsdSlamConfig.cmake.in
     文件        3439  2015-01-14 08:59  lsd_slam-master\cmake\LsdSlamDependencies.cmake
     文件        3619  2015-01-14 08:59  lsd_slam-master\cmake\LsdSlamDependencies_Config.cmake.in
     文件        6751  2015-01-14 08:59  lsd_slam-master\cmake\LsdSlamUtil.cmake
     文件        1025  2015-01-14 08:59  lsd_slam-master\cmake\cmake_uninstall.cmake.in
     目录           0  2015-01-14 08:59  lsd_slam-master\cmake\modules\
     文件        3413  2015-01-14 08:59  lsd_slam-master\cmake\modules\FindG2O.cmake
     文件        2787  2015-01-14 08:59  lsd_slam-master\cmake\modules\FindSuiteParse.cmake
     文件       26059  2015-01-14 08:59  lsd_slam-master\cmake\modules\FindSuiteSparse.cmake
     目录           0  2015-01-14 08:59  lsd_slam-master\data\
     文件       51768  2015-01-14 08:59  lsd_slam-master\data\out_camera_data.xml
     目录           0  2015-01-14 08:59  lsd_slam-master\doc\
     文件       83496  2015-01-14 08:59  lsd_slam-master\doc\cmake-step1-configure.png
     文件      114908  2015-01-14 08:59  lsd_slam-master\doc\cmake-step2-paths-edit.png
     文件       87012  2015-01-14 08:59  lsd_slam-master\doc\cmake-step3-reconfigure.png
............此处省略1582个文件信息

评论

共有 条评论