点开文字进入网站是怎么做的,北京代理记账服务公司,有源代码怎么制作网站,网页设计教程入门文章目录 1.环境问题2.遇到的问题2.1编译问题1 monotonic_clock2.2 associate.py2.3 associate.py问题 3.运行问题 1.环境问题
首先环境大家就按照github上的指定环境安装即可 环境怎么安装网上大把的资源#xff0c;自己去找。
2.遇到的问题
2.1编译问题1 monotonic_cloc… 文章目录 1.环境问题2.遇到的问题2.1编译问题1 monotonic_clock2.2 associate.py2.3 associate.py问题 3.运行问题 1.环境问题
首先环境大家就按照github上的指定环境安装即可 环境怎么安装网上大把的资源自己去找。
2.遇到的问题
2.1编译问题1 monotonic_clock 这是因为C版本不同导致的系统计时函数编译报错 解决方案是 搜索COMPILEDWITHC11 然后把monotonic_clock 换成 steady_clock 例如
/*
#ifdef COMPILEDWITHC11std::chrono::steady_clock::time_point t1 std::chrono::steady_clock::now();
#elsestd::chrono::monotonic_clock::time_point t1 std::chrono::monotonic_clock::now();
#endif
*/
// 替换成下面的std::chrono::steady_clock::time_point t1 std::chrono::steady_clock::now();//修改替换的代码部分这个问题会报很多次至少十几次吧因为很多文件都有这个东西他报错了我们根据报错位置去改就可以了就是比较麻烦。
当然我看到有人说只需要把COMPILEDWITHC11改为COMPILEDWITHC14就可以了这个我没有尝试我只用了上面的方法大家可以自己尝试。
2.2 associate.py
数据集的下载地址https://cvg.cit.tum.de/data/datasets/rgbd-dataset/download
associate.py是个啥这个东西怎么用 这个就是把数据集转化成一个文件的东西 链接: 怎么用看这个
按照要求下载数据集我下载的是rgbd_dataset_freiburg3_walking_xyz将其解压到你喜欢的目录我个人放在了evalution下
下载 associate.py放在evalution目录下面
打开终端进入到associate.py所在目录
python associate.py rgb.txt depth.txt associations.txt4.命令解说
./Examples/RGB-D/rgbd_tum Vocabulary/ORBvoc.txt Examples/RGB-D/TUMX.yaml PATH_TO_SEQUENCE_FOLDER ASSOCIATIONS_FILEPATH_TO_SEQUENCE_FOLDER文件夹即为数据库所在文件夹我的是在orbslam2工程下面 ASSOCIATIONS_FILE即为第步中生成的associations.txt给出他的制定目录位置 例子大家可以参考我的目录自行更改
./Examples/RGB-D/rgbd_tum Vocabulary/ORBvoc.txt Examples/RGB-D/TUMX.yaml /home/lvslam/YOLO_ORB_SLAM3_with_pointcloud_map/evaluation/rgbd_dataset_freiburg3_walking_xyz /home/lvslam/YOLO_ORB_SLAM3_with_pointcloud_map/evaluation/rgbd_dataset_freiburg3_walking_xyz/associations.txt
2.3 associate.py问题
问题1报错AttributeError: ‘dict_keys’ object has no attribute ‘remove’ 由于Python2和python3语法的差别需要将associate.py中第86行87行的 first_keys first_list.keys()second_keys second_list.keys()改为 first_keys list(first_list.keys())second_keys list(second_list.keys())问题2TypeError: read_file_list() takes exactly 2 arguments (1 given) 所遇到的问题是因为read_file_list()函数需要两个参数而你在调用时只传递了一个参数。我们需要向read_file_list()传递两个参数即args.first_file和remove_bounds。从代码来看remove_bounds应该是一个布尔值具体是True还是False可以根据需求来设定。 我们需要修改associate.py 改为
import argparse
import sys
import os
import numpydef read_file_list(filename, remove_bounds):Reads a trajectory from a text file. File format:The file format is stamp d1 d2 d3 ..., where stamp denotes the time stamp (to be matched)and d1 d2 d3.. is arbitary data (e.g., a 3D position and 3D orientation) associated to this timestamp. Input:filename -- File nameOutput:dict -- dictionary of (stamp,data) tuplesfile open(filename)data file.read()lines data.replace(,, ).replace(\t, ).split(\n)if remove_bounds:lines lines[100:-100]list [[v.strip() for v in line.split( ) if v.strip() ! ] for line in lines if len(line) 0 and line[0] ! #]list [(float(l[0]), l[1:]) for l in list if len(l) 1]return dict(list)def associate(first_list, second_list, offset, max_difference):Associate two dictionaries of (stamp,data). As the time stamps never match exactly, we aim to find the closest match for every input tuple.Input:first_list -- first dictionary of (stamp,data) tuplessecond_list -- second dictionary of (stamp,data) tuplesoffset -- time offset between both dictionaries (e.g., to model the delay between the sensors)max_difference -- search radius for candidate generationOutput:matches -- list of matched tuples ((stamp1,data1),(stamp2,data2))first_keys list(first_list.keys())second_keys list(second_list.keys())potential_matches [(abs(a - (b offset)), a, b)for a in first_keysfor b in second_keysif abs(a - (b offset)) max_difference]potential_matches.sort()matches []for diff, a, b in potential_matches:if a in first_keys and b in second_keys:first_keys.remove(a)second_keys.remove(b)matches.append((a, b))matches.sort()return matchesif __name__ __main__:# parse command lineparser argparse.ArgumentParser(descriptionThis script takes two data files with timestamps and associates them )parser.add_argument(first_file, helpfirst text file (format: timestamp data))parser.add_argument(second_file, helpsecond text file (format: timestamp data))parser.add_argument(--first_only, helponly output associated lines from first file, actionstore_true)parser.add_argument(--offset, helptime offset added to the timestamps of the second file (default: 0.0), default0.0)parser.add_argument(--max_difference, helpmaximally allowed time difference for matching entries (default: 0.02), default0.02)parser.add_argument(--remove_bounds, helpremove first and last 100 entries, actionstore_true)args parser.parse_args()first_list read_file_list(args.first_file, args.remove_bounds)second_list read_file_list(args.second_file, args.remove_bounds)matches associate(first_list, second_list, float(args.offset), float(args.max_difference))if args.first_only:for a, b in matches:print(%f %s % (a, .join(first_list[a])))else:for a, b in matches:print(%f %s %f %s % (a, .join(first_list[a]), b - float(args.offset), .join(second_list[b])))3.运行问题
rgbd_tum: /tmp/llvm/lib/Support/BranchProbability.cpp:41llvm::BranchProbability::BranchProbability(uint32_t, uint32_t): 假设 ‘Numerator Denominator “Probability cannot be bigger than 1!”’ 失败。 已放弃 (核心已转储) 运行出来两秒就闪退的问题 切换刚开始的libtorch版本 https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.3.1%2Bcpu.zip 这个时2.3.1版本的我们只需要将上面的数字换掉然后直接浏览器粘贴就可以下对对应的版本
经过测试使用1.7.1版本的libtorch可以解决这个问题 也就是 https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.7.1%2Bcpu.zip 重新安装号新的1.7.1版本的libtorch后重新编译./build.sh 又会遇到下面的问题 version GOMP_4.5’ not found (required by /lib/x86_64-linux-gnu/libpcl_common.so.1.10) 我们需要链接动态库解决这个问题
ln -sf /usr/lib/x86_64-linux-gnu/libgomp.so.1 /YOLO_ORB_SLAM3_with_pointcloud_map/Thirdparty/libtorch/lib/libgomp-75eea7e8.so.1之后应该就是可以运行了不过有可能有人会碰到别的问题 之后如果报错libORB_SLAM3.so: undefined symbol: _ZN5DBoW24FORB1LE查看下面的博客就可以 https://blog.csdn.net/qq_41035283/article/details/128301376
然后我们就成功复现这个项目了 文章转载自: http://www.morning.fcwb.cn.gov.cn.fcwb.cn http://www.morning.guangda11.cn.gov.cn.guangda11.cn http://www.morning.bykqg.cn.gov.cn.bykqg.cn http://www.morning.cknrs.cn.gov.cn.cknrs.cn http://www.morning.xlwpz.cn.gov.cn.xlwpz.cn http://www.morning.rfyff.cn.gov.cn.rfyff.cn http://www.morning.mftdq.cn.gov.cn.mftdq.cn http://www.morning.tzkrh.cn.gov.cn.tzkrh.cn http://www.morning.kwpnx.cn.gov.cn.kwpnx.cn http://www.morning.yskhj.cn.gov.cn.yskhj.cn http://www.morning.hxgly.cn.gov.cn.hxgly.cn http://www.morning.lpgw.cn.gov.cn.lpgw.cn http://www.morning.pccqr.cn.gov.cn.pccqr.cn http://www.morning.pwksz.cn.gov.cn.pwksz.cn http://www.morning.kgxrq.cn.gov.cn.kgxrq.cn http://www.morning.nlrp.cn.gov.cn.nlrp.cn http://www.morning.kzdgz.cn.gov.cn.kzdgz.cn http://www.morning.rwbx.cn.gov.cn.rwbx.cn http://www.morning.jxzfg.cn.gov.cn.jxzfg.cn http://www.morning.hwnqg.cn.gov.cn.hwnqg.cn http://www.morning.tsxg.cn.gov.cn.tsxg.cn http://www.morning.jxpwr.cn.gov.cn.jxpwr.cn http://www.morning.gydsg.cn.gov.cn.gydsg.cn http://www.morning.tlnkz.cn.gov.cn.tlnkz.cn http://www.morning.jqwpw.cn.gov.cn.jqwpw.cn http://www.morning.hbywj.cn.gov.cn.hbywj.cn http://www.morning.lwtfr.cn.gov.cn.lwtfr.cn http://www.morning.tllhz.cn.gov.cn.tllhz.cn http://www.morning.zhqfn.cn.gov.cn.zhqfn.cn http://www.morning.qsbcg.cn.gov.cn.qsbcg.cn http://www.morning.bhqlj.cn.gov.cn.bhqlj.cn http://www.morning.cgthq.cn.gov.cn.cgthq.cn http://www.morning.jbtlf.cn.gov.cn.jbtlf.cn http://www.morning.wfyzs.cn.gov.cn.wfyzs.cn http://www.morning.xinxianzhi005.com.gov.cn.xinxianzhi005.com http://www.morning.brsgw.cn.gov.cn.brsgw.cn http://www.morning.ykrkb.cn.gov.cn.ykrkb.cn http://www.morning.cwrpd.cn.gov.cn.cwrpd.cn http://www.morning.sqmbb.cn.gov.cn.sqmbb.cn http://www.morning.pqfbk.cn.gov.cn.pqfbk.cn http://www.morning.gwtgt.cn.gov.cn.gwtgt.cn http://www.morning.zycll.cn.gov.cn.zycll.cn http://www.morning.jbxfm.cn.gov.cn.jbxfm.cn http://www.morning.tqpds.cn.gov.cn.tqpds.cn http://www.morning.lcdtb.cn.gov.cn.lcdtb.cn http://www.morning.rjznm.cn.gov.cn.rjznm.cn http://www.morning.qmbtn.cn.gov.cn.qmbtn.cn http://www.morning.rxlck.cn.gov.cn.rxlck.cn http://www.morning.rbkdg.cn.gov.cn.rbkdg.cn http://www.morning.pxdgy.cn.gov.cn.pxdgy.cn http://www.morning.drbwh.cn.gov.cn.drbwh.cn http://www.morning.xhxsr.cn.gov.cn.xhxsr.cn http://www.morning.tntbs.cn.gov.cn.tntbs.cn http://www.morning.zqcgt.cn.gov.cn.zqcgt.cn http://www.morning.wztnh.cn.gov.cn.wztnh.cn http://www.morning.sbkb.cn.gov.cn.sbkb.cn http://www.morning.zczkm.cn.gov.cn.zczkm.cn http://www.morning.gcdzp.cn.gov.cn.gcdzp.cn http://www.morning.pwggd.cn.gov.cn.pwggd.cn http://www.morning.lndongguan.com.gov.cn.lndongguan.com http://www.morning.mqdr.cn.gov.cn.mqdr.cn http://www.morning.aowuu.com.gov.cn.aowuu.com http://www.morning.wtcd.cn.gov.cn.wtcd.cn http://www.morning.zcmpk.cn.gov.cn.zcmpk.cn http://www.morning.ryxdf.cn.gov.cn.ryxdf.cn http://www.morning.yrjhr.cn.gov.cn.yrjhr.cn http://www.morning.snnkt.cn.gov.cn.snnkt.cn http://www.morning.lwwnq.cn.gov.cn.lwwnq.cn http://www.morning.fmrwl.cn.gov.cn.fmrwl.cn http://www.morning.nzkc.cn.gov.cn.nzkc.cn http://www.morning.nktgj.cn.gov.cn.nktgj.cn http://www.morning.tpxgm.cn.gov.cn.tpxgm.cn http://www.morning.dlurfdo.cn.gov.cn.dlurfdo.cn http://www.morning.rmjxp.cn.gov.cn.rmjxp.cn http://www.morning.tjjkn.cn.gov.cn.tjjkn.cn http://www.morning.fmdvbsa.cn.gov.cn.fmdvbsa.cn http://www.morning.xnlj.cn.gov.cn.xnlj.cn http://www.morning.gxtfk.cn.gov.cn.gxtfk.cn http://www.morning.tstwx.cn.gov.cn.tstwx.cn http://www.morning.ftntr.cn.gov.cn.ftntr.cn