- 博客(66)
- 资源 (1)
- 收藏
- 关注
原创 pycocotools报错 if type(resFile) == str or type(resFile) == unicode: NameError: name ‘unicode‘ is
pycocotools报错 if type(resFile) == str or type(resFile) == unicode: NameError: name 'unicode' is not defined
2022-10-15 11:39:51 493
原创 Q: /usr/include/c++/7/bits/basic_string.tcc:1067:16: error: cannot call member function ‘void std::b
【代码】Q: /usr/include/c++/7/bits/basic_string.tcc:1067:16: error: cannot call member function ‘void std::b。
2022-10-01 20:36:30 403 1
原创 Pytorch学习之猫狗大战
import torchimport torchvision.models as models #储存里常用的一些模型import torch.nn as nnimport torch.optim as optimimport torch.optim.lr_scheduler as lr_schedulerimport timeimport torchvision.transforms as transforms # 常用的图片变换,例如裁剪、旋转等;from torchvision impo
2022-04-13 15:31:24 1662
原创 pytorch学习之线性拟合
import torchfrom torch.autograd import Variableimport numpy as npimport timeuse_cuda = Truedef get_data(): # 生成拟合数据 train_x = np.asarray([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) #[10] train_y = np.asarray([1, 2
2022-04-13 15:29:00 1235
原创 编译库文件时报错move_base: symbol lookup error: undefined symbol:
Q:编译库文件时报错/opt/ros/kinetic/lib/move_base/move_base: symbol lookup error: /home/xjl/deepDisk/ubuntu/fangzhen/AstarPlugin/devel/lib//libglobal_planner_lib.so: undefined symbol: _ZN5Astar7getPathER5PointS1_A:CMakeLists中编译库时未完全添加所需的可执行文件文件结构:--fun----inclu
2022-04-12 18:42:12 526
原创 github推送Please make sure you have the correct access rights and the repository exists.
A: github推送和拉取报错:kex_exchange_identification: read: Connection reset by peerfatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.Q: 我选择重新生成SSH key,具体步骤如下:本地生成SSH keyssh-keygen
2022-03-17 16:40:20 919
原创 python使用Axes3D画三维图加入legend图例时报错AttributeError: ‘Poly3DCollection‘ object has no attribute ‘_edgecolo
Q:python使用Axes3D画三维图加入legend图例时报错AttributeError: 'Poly3DCollection' object has no attribute '_edgecolors2d'报错源代码fig = plt.figure()ax = Axes3D(fig)X, Y = np.meshgrid(3, 3)ax.plot_surface(X, Y, np.zeros([3,3], label="surf")ax.legend()plt.show()A:在ax
2021-12-06 22:25:25 4407 1
原创 anaconda中的python3环境与ros公用时的问题
Q1:ImportError: /opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so: undefined symbol: PyCObject_Type使用https://blog.csdn.net/Jolen_xie/article/details/121634091?spm=1001.2014.3001.5501Q2:但是出现ModuleNotFoundError: No module named ‘rospy’把import syssys.p
2021-12-02 15:25:58 338
原创 ubuntu先anaconda中python3与ros共存时opencv报错
Q: ubuntu使用python调用opencv报错ImportError: /opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so: undefined symbol: PyCObject_TypeA:主要是掉用来ros总python2中的cv2,因此在代码前如下代码:import syssys.path.remove('/opt/ros/kinetic/lib/python2.7/dist-packages')...
2021-11-30 15:30:31 2235
原创 把pdf转为高清jpg图片,其dpi为300以上
把pdf转为高清jpg图片,其dpi为300以上在用latex写好伪代码后生成的pdf,想生成jpg格式,可以用如下方法工具:Adobe Acrobat Pro DC如果是:文件>导出到>图像这样的图像dpi较小,有很重的锯齿感1. 点击窗口右侧“导出PDF”2. 选择图像3. 电机JPEG右侧的齿轮,然后根据需求设置即可...
2021-11-05 19:41:21 5473
原创 latex伪代码
latex伪代码需要包括的包\usepackage[ruled]{algorithm2e}案例代码\begin{algorithm}[H]\caption{algorithm caption}%算法名字\LinesNumbered %要求显示行号\KwIn{input parameters A, B, C}%输入参数\KwOut{output result}%输出some description\; %\;用于换行\For{condition}{ only if\; \If{c
2021-11-05 12:23:59 872
原创 conda虚拟环境下使用pip安装包报错Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)
Q1: conda虚拟环境下使用pip安装软件报错:WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection obj
2021-10-21 11:05:13 3439
原创 随机名字获取,杜绝取名烦恼
随机名字获取from urllib.request import Request, urlopenreq = Request("https://frightanic.com/goodies_content/docker-names.php", headers={'User-Agent': 'Mozilla/5.0'})webpage = str(urlopen(req).read())word = webpage.split("b\'")[1]word = word.split("\\")[0]
2021-10-21 10:49:32 990
原创 gazebo打开仿真环境报错gzserver: /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreRenderSystem
Q:gazebo仿真报错gzserver: /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreRenderSystem.cpp:546: virtual void Ogre::RenderSystem::setDepthBufferFor(Ogre::RenderTarget*): Assertion bAttached && "A new DepthBuffer for a RenderTarget was crea
2021-10-11 13:44:02 1855
转载 用latexdiff输出论文修改痕迹
转载: https://zhuanlan.zhihu.com/p/267887565仅做学习使用第一步我们先在overleaf上创建一个示例项目,文件名为main.tex,pdf渲染效果如下第二步,我们随便在main.tex上做点修改,把修改后的文件取个名字叫做revise.tex,修改后的效果如下乍一看不太容易看出来哪里作出了修改,我们现在用latexdiff处理一下,latexdiff在tex套装里默认安装了,可以在本地执行,网上也有在线版的,但是可能不安全。现在在本地终端里执行一下命令:
2021-10-09 09:36:54 2959
原创 马尔可夫决策过程(Markov Decision Process)学习笔记
记录一些自己的问题和理解基本的概率定义在给定前继状态和动作的值时,s′,s∈S,r∈Rs^{\prime}, s \in \mathcal{S}, r \in \mathcal{R}s′,s∈S,r∈R,在t时刻发生这些值的概率,这定义了MDP环境的动态特性。p(s′,r∣s,a)≐Pr{St=s′,Rt=r∣St−1=s,At−1=a}p\left(s^{\prime}, r \mid s, a\right) \doteq \operatorname{Pr}\left\{S_{t}=s^{\
2021-08-31 15:50:34 489
原创 CMakeLists.txt链接库的基本套路
CMakeLists.txt链接库的基本套路在使用CMake组织工程时,如果我们需要依赖某个库文件,需要完成以下步骤:查找库文件(find_package命令)判断是否找到库文件(XXX_FOUND标记),并包含头文件(include_directories命令)链接库文件到目标(target_link_libraries命令)因此,库文件、头文件的名字(大小写)我们就要清楚的写明,不要混淆。我常用的库如OpenCV, catkin, Boost, Eigen等,其用法如下。常用的变量有:nam
2021-08-26 15:47:31 1011
原创 Markov决策过程学习笔记和一些Markov代码实现的记录
Study notes of Markov desicion process马尔可夫性质(Markov properity)马尔可夫的性质如下图所示马尔可夫的性质表示下一刻的状态至于当前时刻有关,其他的历史信息可以丢弃不用。对于马尔可夫状态SSS和下一个状态s′s^{\prime}s′,两者之间的状态概率转移矩阵定义为:Pss′=P[St+1=s′∣St=s]\mathcal{P}_{s s^{\prime}}=\mathbb{P}\left[S_{t+1}=s^{\prime} \mid
2021-08-24 16:15:06 426
原创 David Silver强化算法学习地址和PPT
Bilibili:https://www.bilibili.com/video/BV1kb411i7KG?share_source=copy_web 有中文字幕Youtube:https://www.youtube.com/watch?v=2pWv7GOvuf0&list=PLqYmG7hTraZDM-OYHWgPebj2MfCFzFObQPPT:https://www.davidsilver.uk/teaching/
2021-08-20 15:23:44 132
原创 双目三维定位
双目三维定位一、基本原理1. 几何关系与数学模型假设有一个点p,沿着垂直于相机中心连线方向上下移动,则其在左右相机上的成像点的位置会不断变化,即d=x1-x2的大小不断变化,并且点p和相机之间的距离Z跟视差d存在着反比关系。上式中视差d可以通过两个相机中心距T减去p点分别在左右图像上的投影点偏离中心点的值获得,所以只要获取到了两个相机的中心距T,就可以评估出p点距离相机的距离,这个中心距T也是双目标定中需要确立的参数之一。2. 双目定位的基本流程:需要分别获取左右相机的内外参数(标定)通过立
2021-08-07 13:11:09 4211
原创 C++读取txt文件里每行的数据
#include <iostream>#include <stdio.h>#include <stdlib.h>#include <string.h>using namespace std;const char *board_list = "./example_list.txt";int main(int argc, char **argv){ FILE *f = fopen(board_list, "rt");
2021-08-06 22:11:00 4751
原创 boost::bind(&mynteye::imageCallback,this, _1, _2)报错error: no match for call to ‘(boost::_mfi::mf2<vo
在使用message_filters做传感器融合时,在sync->registerCallback中的boost::bind出现报错 image_sub_left = new message_filters::Subscriber<sensor_msgs::Image>(nh_, "/mynteye/left/image_color",1,ros::TransportHints().tcpNoDelay()); image_sub_right = new message_f
2021-08-06 14:31:00 1693
原创 realsense中IMU的简单使用与学习
IMU的基本原理上图中,红色为x轴,绿色是y轴,蓝色是z轴; 一般相机正视方向为z轴。相当于左上角为原点的像素矩阵。相机在围绕x轴旋转产生pitch俯仰角θ\thetaθ再旋转z轴产生roll翻滚角α\alphaα根据几何关系:θ=atan2(zx2+y2)\theta= atan2 (\frac{z}{\sqrt{x^2+y^2}})θ=atan2(x2+y2z)α=atan2(xy)\alpha=atan2(\frac{x}{y})α=atan2(yx)简单的位姿解
2021-08-05 10:20:43 2292 8
转载 RGB-D、TOF深度相机的原理
RGB-D、TOF相机的原理一、原理RGB-D 图像中的rgb图片提供了像素坐标系下的x,y坐标,而深度图直接提供了相机坐标系下的????坐标,也就是相机与点的距离。根据 RGB-D 图像的信息和相机的内参,可以计算出任何一个像素点在相机坐标系下的坐标。根据 RGB-D 图像的信息和相机的内参与外参,可以计算出任何一个像素点在世界坐标系下的坐标。相机视野范围内,相机坐标系下的障碍物点的坐标,就是点云传感器数据,也就是相机坐标系下的点云数据。点云传感器数据可以根据 RGB-D 图像提
2021-08-03 15:09:33 5163
原创 CmakeList中加入OpenCV编译项
find_package(OpenCV REQUIRED)include_directories( include ${catkin_INCLUDE_DIRS}${OpenCV_INCLUDE_DIRS})target_link_libraries(excutable_file_name ${catkin_LIBRARIES} ${OpenCV_LIBS})
2021-08-03 14:43:04 782
原创 安装ROS使用sudo rosdep init 报错ERROR: cannot download default sources list from:
Q:安装ROS使用rosdep init报错sudo apt install python-rosdepsudo rosdep initrosdep update报错:ERROR: cannot download default sources list from: https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list Website may be down.A:解
2021-07-03 10:46:24 911
原创 Ubuntu拔掉挂载硬盘后一直卡在ubuntu的logo处以及windows强制关机会出现ubuntu出现系统恢复模式
Q:Ubuntu拔掉挂载硬盘后一直卡在ubuntu的logo处A: 这可能是ubuntu硬盘检测出现问题,需要把先前设置的硬盘挂载删除掉按ctrl+alt+F2进入终端,看有的博主说按Mvim /etc/fstab把以前挂载的那行命令注释或删除...
2021-06-09 21:41:57 673 1
原创 Tensorflow和anaconda的历史版本镜像,清华源镜像下载地址
清华源镜像下载地址https://pypi.tuna.tsinghua.edu.cn/simple/tensorflow-gpu/
2021-05-18 20:26:52 473
原创 conda创建环境报错conda.core.subdir_data.Response304ContentUnchanged
该情况可能是源出现了问题1.换回默认源conda config --remove-key channels2.再尝试创建环境3.如果想再重现添加清华镜像源conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/con
2021-05-18 16:28:26 678
原创 Tensorflow报错UnknownError (see above for traceback): Failed to get convolution algorithm. This is pro
环境配置为Ubuntu16.04、tensorflow 1.13.1、cuda10、cudnn7.6.4。在运行tensorflow代码时报错UnknownError (see above for traceback): Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was pr
2021-05-04 19:19:19 277 1
原创 Latex的图片、文献、引用跳转链接
使用链接跳转需要使用宏包hyperref\usepackage[colorlinks,linkcolor=blue,anchorcolor=blue,citecolor=red]{hyperref}clolorlink的意思是将超链接以颜色来标识,而并非使用默认的方框来标识。linkcolor, anchorcolor, citecolor分别表示标识link, anchor, cite等各种链接的颜色。若不想使用彩色,就使用black即可...
2021-04-04 16:21:11 2523 1
原创 Latex多图并列,绘制子图
记录一下latex怎么使用子图,使多个图并列\usepackage{subfigure} %%最前面要引入该包\begin{figure}[htb] \centering \subfigure[\scriptsize 子标题1 ]{ \label{Fig:2(a)} %% label for first subfigure \includegraphics[width=1.5in]{figs/Fig2(a).jpg}} %%width调整图片大小 \hspace{20pt} %% 间隙
2021-04-02 13:26:54 2285
原创 使用tensorflow的slim中的batch_norm不好使,使用tf.layers.batch_normalization保存模型必写部分
with tf.Graph().as_default(): ....model().... update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS) with tf.control_dependencies(update_ops): optimizer = tf.train.AdamOptimizer(learning_rate).minimize(loss, global_step=global_step) var_list = tf
2021-01-08 22:00:49 335
原创 一台主机下Ubuntu 和Windows双系统共用一个硬盘,也可用新硬盘给ubuntu进行扩容,Ubuntu和Window硬盘数据共享
一台主机下Ubuntu 和Windows双系统共用一个硬盘,可作为新硬盘给ubuntu的home文件夹扩容杭州电子科技大学-自动化学院-智能机器人实验室-Jolen_Xie温馨提示:数据无价,谨慎操作基本流程如下在windows下安装并初始化好硬盘进入ubuntu对改硬盘进行挂载挂载操作如下:1. 在ubuntu下以你的特殊喜好建立一个文件夹,作为挂载硬盘的“虫洞”入口;2. 查看硬盘信息sudo fdisk -l上面是我要挂载的硬盘信息,设备为分的区,由于windows需要一定
2020-11-25 22:44:53 2268 1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人