自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(29)
  • 资源 (1)
  • 收藏
  • 关注

原创 ROS noetic 使用serial

import rospyfrom geometry_msgs.msg import Twistdef doMsg(data): rospy.loginfo(data.linear.x)if __name__ == "__main__": rospy.init_node("listener_p") sub = Subscriber("cmd_vel", Twist, doMsg, queue_size=1) rospy.spin()catkin_make 时没有.

2021-12-24 14:27:21 627 2

原创 MicroStrain 3DM-GX3-25 ROS 开发

MicroStrain 3DM-GX3-25 ROS 开发

2021-12-10 10:32:12 1717 1

原创 ROSRUN 报未预期的符号‘(‘附近有语法错误

import rospyfrom geometry_msgs.msg import Twistdef doMsg(data): rospy.loginfo(data.linear.x)if __name__ == "__main__": rospy.init_node("listener_p") sub = Subscriber("cmd_vel", Twist, doMsg, queue_size=1) rospy.spin()catkin_make 时没有.

2021-11-23 14:42:56 2512

原创 Nvidia TX2(Ubuntu 18.04) 安装code-oss

当前想要用Nvidia TX2来开发ROS,但是在配置环境时遇到了各种各样的问题。Nvidia TX2作为一款arm64架构的产品,虽然都使用了Ubuntu 18.04系统,但与之前使用INTEL的工控机在配置时可以说是大不相同这里先来说下code-oss(Vscode)配置目前在网上查到的资料最多的是从这个网站http://`https://packagecloud.io/headmelted/codebuilds?page=15下载1.28版本,但是这个网站已经没有这些资源,后来下载了1.3

2021-11-13 16:03:02 2187

原创 Linux中将实际环境中python安装的库转移到anaconda创建的虚拟环境中

前期由于没有使用Anaconda管理python环境,编译安装了Opencv 4.5.0。现在安装了anaconda环境,想把原来安装的环境都直接拷贝过来。

2021-06-03 18:16:57 438

原创 使用车牌识别hyperlpr库,报AttributeError: module ‘cv2.cv2‘ has no attribute ‘estimateRigidTransform‘错误问题

HyperLPR 地址安装hyperlpr库后,运行示例发现报了如下错误#导入包from hyperlpr import *#导入OpenCV库import cv2#读入图片image = cv2.imread("demo.jpg")#识别结果print(HyperLPR_plate_recognition(image))Traceback (most recent call last): File "readlicensePlate.py", line 7, in &lt

2020-10-20 14:09:18 2476 7

原创 使用Opencv为视频每一帧加入水印

#include "opencv2/core/utility.hpp"//#include "opencv2/imgproc.hpp"//#include "opencv2/imgcodecs.hpp"#include "opencv2/highgui.hpp"#include <stdio.h>using namespace cv;using namespace std;int main(){ VideoCapture capture; capture.open.

2020-08-26 15:46:38 718

原创 模板方法模式

#define _CRT_SECURE_NO_WARNINGS#include <iostream>#include <vector>#include <algorithm>using namespace std;//抽象模板class DrinkTemplate {public: virtual void BoilWater() = 0;...

2019-11-13 22:00:47 111

原创 适配器模式

#define _CRT_SECURE_NO_WARNINGS#include <iostream>#include <vector>#include <algorithm>using namespace std;//适配器模式就是将已经写好的接口,但是这个接口不符合要求struct MyPrint { void operator()(int ...

2019-11-13 21:17:18 142

原创 代理模式

#define _CRT_SECURE_NO_WARNINGS#include <iostream>using namespace std;//提供一种方式来控制对其他对象的访问class AbstractCommomInterface {public: virtual void run() = 0;};//我已经写好的系统class MySystem {pu...

2019-11-12 00:13:52 164

原创 单例模式

#define _CRT_SECURE_NO_WARNINGS#include <iostream>using namespace std;/*实现单利的步骤:1.构造函数私有化2.增加静态私有的当前类的指针变量3.提供静态的对外接口,可以让用户获得单例对象*/class A{private: A() { a = new A; }public: s...

2019-11-07 23:25:30 150

原创 抽象模式

#define _CRT_SECURE_NO_WARNINGS#include <iostream>using namespace std;class AbstractApple{public: virtual void showName() = 0;};class ChinaApple:public AbstractApple{public: virtual ...

2019-11-07 22:42:10 144

原创 工厂方法模式

#define _CRT_SECURE_NO_WARNINGS#include <iostream>#include <string>#include <vector>using namespace std;//工厂方法模式://===简单工厂模式 + 开闭原则//实现了对象创建和使用的分离class AbstractFruit{pub...

2019-11-04 22:36:10 137

原创 依赖倒转原则

#define _CRT_SECURE_NO_WARNINGS#include <iostream>#include <string>#include <vector>using namespace std;//类的单一性原则//改进class AbstractWorker{public: virtual void doBusines...

2019-10-30 21:56:28 148

原创 C 设计模式-迪米特法则

#define _CRT_SECURE_NO_WARNINGS#include <iostream>#include <string>#include <vector>using namespace std;//迪米特法则:最少知识原则class AbstractBuilding{public: virtual void sale() ...

2019-10-24 21:18:38 163

原创 c++设计模式-开闭原则

#define _CRT_SECURE_NO_WARNINGS#include <iostream>#include <string>using namespace std;//开闭原则:增加功能是通过增加代码来实现的,而不是去修改源代码来实现的class Caculator{public: Caculator(int a, int b, string...

2019-10-23 21:30:47 213

原创 Leetcode 1002 c++ python

题目描述给定仅有小写字母组成的字符串数组A,返回列表中的每个字符串中都显示的全部字符(包括重复字符)组成的列表。例如,如果一个字符在每个字符串中出现 3 次,但不是 4 次,则需要在最终答案中包含该字符 3 次。你可以按任意顺序返回答案。示例 1:输入:["bella","label","roller"]输出:["e","l","l"]示例 2:输入:["cool...

2019-04-03 17:00:29 196

原创 c++11 防止死锁的一种方式

struct BankAccount { BankAccount(int b) : Balance(b) {} int Balance; mutex Mutex;};void transferMoney(BankAccount&a, BankAccount& b, int money){ lock(a.Mutex, b.Mutex); //将锁需要锁住的临界体全部...

2019-03-23 16:28:24 657

原创 linux 简单命令学习

(注意Linux大小写敏感)文件1:s1 文件2:s2cat 查看文件的具体内容cp s1 s2 将s1复制一份变成s2mv 改名字 mv s1 s2 将s1的名字改成s2mv 将一个文件移动到另一个文件夹中 mv s1 example/cd s1 打开s1 cd ./打开上级目录 cd .. 回到原始目录ls 文件内列表 ls -l 文件夹内具体的文件信息mkd...

2019-03-10 21:09:59 128

原创 python 多线程编程实现的两种方式

import timeimport threadingdef get_detail_html(url): print("get detail html started") time.sleep(2) print("get detail html end")def get_detail_url(url): print('get detail url start...

2019-01-21 21:23:29 199

原创 python3 requests + 正则表达式抓取猫眼电影

import requestsfrom requests.exceptions import RequestExceptionimport reimport jsonfrom multiprocessing import Pooldef get_one_page(url): try: response = requests.get(url...

2019-01-18 19:53:42 254

原创 leetcode976. 三角形的最大周长(c++)

class Solution {public: int largestPerimeter(vector&lt;int&gt;&amp; A) { int len = A.size(); int res = 0; if(len &lt; 3) return 0; sort(A.begin(), A.end()); ...

2019-01-13 19:18:46 959

原创 Python中使用dict来模拟C++中switch case

当dict中key值不包含一些值时, 调用的时候应该使用dict.get()方法dict.get(self, k, default)def get_Sunday(): return 'Sunday'def get_monday(): return 'Monday'def get_tuesday(): return 'Tuesday'def get_defa...

2019-01-09 16:01:43 214

原创 python 中 with 使用

打开文件with open('abc.txt', 'r') as f: content = f.read()print(content)在上下文管理协议中class Agree: def __enter__(self): print('enter') return self def __exit__(self, exc_ty...

2019-01-03 11:26:46 140

原创 使用for语句来迭代多个可迭代对象

并行zip函数将多个可迭代对象合并,每次迭代返回一个元祖from random import randinttotal = []chinese = [randint(60, 100) for _ in range(40)]math = [randint(60, 100) for _ in range(40)]english = [randint(60, 100) for _ in...

2018-12-31 19:53:49 477

原创 Python 列表、字典、集合操作

列表中筛选元素data = [1,5, -3, -2, 6, 0, 9]res = []for x in data: if x &gt;= 0: res.append(x)print(res)from random import randintdata = [randint(-10, 10) for _ in range(10)]print(data)...

2018-12-30 21:58:24 147

原创 onecoreuap\inetcore\urlmon\zones\zoneidentifier.cxx(359)\urlmon.dll!6AF8FA50: (caller: 6AF8F768) Ret

使用qq输入法,会使得QT编译过程中出现这个问题,换个输入法就好了

2018-12-05 10:47:04 937

原创 求二进制数中1的个数

方法一 //0msint f(uint32_t n){ int res = 0; while (n) { res += n % 2; n /= 2; } return res;} 方法二// 4msint f(uint32_t n){ int res = 0; for (int i = 0; i&lt;32; i++) { res += (...

2018-10-14 20:25:09 191

原创 Python连接MySQL(融合多篇文章)详细讲解

最近开始学习Python,想要连接数据库MySQL,发现网上很多文章写的不够详细,遂在这里讲讲,希望你们能够少走一点弯路一、安装MySQL、Python、PycharmMySQL下载地址:https://www.mysql.com/downloads/,推荐使用安装版 ,免安装版配置特别容易出现问题。Python下载地址:https://www.python.org/,直接官网下载安装

2017-11-21 17:24:07 320

dlib.cp37-win_amd64.pyd

使用boost、vs2017编译的dlib.cp37-win_amd64.pyd库,直接放入到Anaconda/Dlls中就可以使用

2020-07-07

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除