摘要: 1.'gbk' codec can't encode character '\xXX' in position XX f=open(file,'w',encoding='utf-8')#要加encoding='utf-8'这个参数 f.write(ss.text)#就不会报错 2.爬虫request 阅读全文
posted @ 2020-05-27 14:01 九里九里 阅读(281) 评论(0) 推荐(0)
摘要: 1. import urllib.request from bs4 import BeautifulSoup import re import os url='http://cpc.people.com.cn/n1/2018/0318/c64094-29873799-8.html' #GB2312 阅读全文
posted @ 2020-05-26 21:07 九里九里 阅读(356) 评论(0) 推荐(0)
摘要: 1.AttributeError: module 'urllib.response' has no attribute 'read' 代码: res=urllib.response.read().decode('UTF-8')#读取网页内容,用utf-8解码成字节 1) python3中应该 imp 阅读全文
posted @ 2020-05-25 18:39 九里九里 阅读(8923) 评论(0) 推荐(1)
摘要: 把txt字典改为二进制文件 https://github.com/raulmur/ORB_SLAM2/pull/21/commits/4122702ced85b20bd458d0e74624b9610c19f8cc 阅读全文
posted @ 2020-05-24 23:35 九里九里 阅读(296) 评论(0) 推荐(0)
摘要: 建立msg文件夹,添加msg文件:Person.msg(首字母大写) 定义话题信息 string name uint8 age uint8 sex uint8 unknown = 0 uint8 male = 1 uint8 female = 2 View Code 1.package.xml加入: 阅读全文
posted @ 2020-05-24 13:28 九里九里 阅读(231) 评论(0) 推荐(0)
摘要: 代码: /*********************************************************************** Copyright 2020 GuYueHome (www.guyuehome.com). *************************** 阅读全文
posted @ 2020-05-23 22:52 九里九里 阅读(546) 评论(0) 推荐(0)
摘要: ROS基础学习 工作空间:debel src build 创建: mkdir -p ~/workspace/catkin_ws/src cd ~/workspace/catkin_ws/src/ catkin_init_workspace #######在src文件夹里面产生了一个cmakelist 阅读全文
posted @ 2020-05-23 22:36 九里九里 阅读(184) 评论(0) 推荐(0)
摘要: topic发布 创建功能包 cd /home/jo/workspace/catkin_ws/src catkin_create_pkg learning_topic roscpp rospy std_msgs geometry_msgs turtlesim 代码:velocity_publisher 阅读全文
posted @ 2020-05-23 22:33 九里九里 阅读(282) 评论(0) 推荐(0)
摘要: 代码: #include<iostream> #include<algorithm> #include<fstream> #include<chrono> #include<opencv2/core/core.hpp> #include <unistd.h> #include<System.h> u 阅读全文
posted @ 2020-05-20 20:59 九里九里 阅读(471) 评论(0) 推荐(0)
摘要: 参考:https://docs.qgroundcontrol.com/en/getting_started/download_and_install.html 首次安装QGroundControl之前: 在命令提示符下输入: sudo usermod -a -G dialout $USER sudo 阅读全文
posted @ 2020-05-17 20:14 九里九里 阅读(815) 评论(0) 推荐(0)