- 博客(24)
- 收藏
- 关注
原创 python串口
因为每次运行都是串口已经打开了,不知道是不是树莓派的串口自动打开,于是把ser.open()注释了#!/usr/bin/env pythonimport serialimport timedef main(): ser = serial.Serial("/dev/ttyACM0",9600,timeout=0.5) #树莓派连接arduino的串口 print(ser.name) ...
2019-02-19 15:43:48
825
1
原创 树莓派ubuntu系统ROS下使用bcm2835库的方法(静态库的连接方法)
参考链接:(一) 关于RPi.GPIO、BCM2835 c library、WiringPi、Gertboard(二) ROS中添加第三方库(三) ROS rosrun 调用 sudo 命令(1)将下载下来的bcm2835库进行安装:# 解压缩 $ tar xvzf bcm2835-1.35.tar.gz # 进入解压之后的目录 $ cd bcm2835-1.35 # ...
2019-02-12 21:11:11
1315
原创 ubuntu 16.04下使用百度语音识别库
参考链接:【ROS总结】ROS下的百度语音识别应用ROS下百度语音识别[ROS总结]ROS下的百度语音识别应用注意问题:(1)vlc可以直接安装,也可以按 1. 中下载源码sudo pip install python-vlc(2)遇到没有安装requests模块的问题,见 2.sudo pip install requests(3)运行simple_speaker.la...
2019-02-11 11:19:01
1469
原创 ROS学习之自定义消息(.msg)需要注意的地方
参考链接:ROS学习之路04:编写基于自定义消息(.msg)进行通信的节点(1)创建包包含message_generation message_runtime```bashcatkin_create_pkg custom_msg_topic roscpp std_msgs message_generation message_runtime(2)需要在CMakeList.txt修改如下...
2019-02-10 21:34:30
2271
原创 ROS学习之编写动态重配置(dynamic_reconfigure)需要注意的地方
参考链接地址:ROS学习之路07:编写动态重配置(dynamic_reconfigure)参数的节点ROS探索总结(四十)——dynamic reconfigure注意的地方: 1.编写好 cfg/Turtorials.cfg 文件后,应当增加它的权限chmod 777 Tutorials.cfg2.Tutorials.cfg需要改变使用UTF-8编码#!/usr/bin/env ...
2019-02-09 21:49:25
1544
2
原创 ROS引用头文件及动态链接库的方法
文章目录(1)引用自定义头文件(2)引用同一工作空间的头文件(3)引用动态链接库(1)引用自定义头文件自定义一个头文件:add_count.h,预定义 INIT_COUNT = 89 ;函数 add_num()#ifndef _add_count_#define _add_count_#define INIT_COUNT 89int add_num(int a , int b);...
2019-02-09 12:38:26
9581
3
原创 ubuntu 16.04下人脸识别库face_recognition的使用及顺序控制节点启动
ubuntu 16.04下人脸识别库face_recognition的使用(1)安装dlib(2)安装 face_recognition(1)安装dlibsudo pip install dlib结果出现了问题:ImportError: cannot import name main解决方法:pip地址改变解决方法(2)安装 face_recognition...
2019-02-08 20:35:37
1948
原创 arduino使用ros串口通讯
rosserial_arduino安装sudo apt-get install ros-kinetic-rosserial-arduinosudo apt-get install ros-kinetic-rosserial
2019-02-07 17:48:25
2317
原创 USB摄像头在ubuntu16.04 ROS下的使用
USB摄像头在ubuntu16.04 ROS下的使用在GitHub下载usb_cam运行roslaunch打开摄像头查看消息信息在GitHub下载usb_cam下载链接:https://github.com/ros-drivers/usb_cam下载后放入ros工作空间中,使用catkin_make编译运行roslaunch打开摄像头$ roslaunch usb_cam usb_cam...
2019-02-06 22:11:37
2757
转载 Matplotlib学习(四)多图合并显示 && 动画Animation
原文地址 https://morvanzhou.github.io/tutorials/data-manipulation/plt/5-1-animation/(一)Subplot多合一显示example 1: 简单的均匀图 example 2: 不均匀图中图example 1 代码:import matplotlib.pyplot as pltplt.figure(figsize...
2019-01-28 22:28:48
3751
转载 Matplotlib学习(三)绘制图形
原文地址 https://morvanzhou.github.io/tutorials/data-manipulation/plt/3-1-scatter/(一)散点图生成具有均值0,方差1的高斯分布(标准正态分布)的数据,绘制大小size=75,颜色为T,透明度50%的散点图import matplotlib.pyplot as pltimport numpy as npn = 1...
2019-01-28 16:42:29
359
转载 Matplotlib学习(二)Annotation标注 && tick标注
原文地址 https://morvanzhou.github.io/tutorials/data-manipulation/plt/2-6-annotation/(一)Annotation标准(1)添加注释 annotate其中参数xycoords=‘data’ 是说基于数据的值来选位置, xytext=(+30, -30)textcoords=‘offset points’ 对于标注位置...
2019-01-27 12:56:43
458
转载 Matplotlib学习(一)基本用法
原文地址 https://morvanzhou.github.io/tutorials/data-manipulation/plt/2-2-figure/(1)基本用法#使用import导入模块matplotlib.pyplot,并简写成plt 使用import导入模块numpy,并简写成npimport matplotlib.pyplot as pltimport numpy as np...
2019-01-27 12:23:29
471
原创 树莓派 Ubuntu mate 开机自动启动登陆(不需要输入密码)的方法
修改/etc/lightdm 下的lightdm.conf文件,如果没有就创建这个文件sudo gedit /etc/lightdm/lightdm.conf添加如下内容:(robot是你的用户名)[SeatDefaults]autologin-user=robot...
2019-01-26 20:34:48
6538
8
转载 Pandas学习(八)Pandas plot 出图
原文地址 https://morvanzhou.github.io/tutorials/data-manipulation/np-pd/3-8-pd-plot/这次我们讲如何将数据可视化. 首先import我们需要用到的模块,除了 pandas,我们也需要使用 numpy 生成一些数据,这节里使用的 matplotlib 仅仅是用来 show 图片的, 即 plt.show()。import ...
2019-01-26 16:10:32
298
转载 Pandas学习(七)Pandas合并 merge
原文地址 https://morvanzhou.github.io/tutorials/data-manipulation/np-pd/3-7-pd-merge/要点pandas中的merge和concat类似,但主要是用于两组有key column的数据,统一索引的数据. 通常也被用在Database的处理当中.依据一组key合并import pandas as pd#定义资料集并打...
2019-01-26 15:53:07
205
转载 Pandas学习(六)Pandas合并 concat
[转载] (https://morvanzhou.github.io/tutorials/data-manipulation/np-pd/3-6-pd-concat/)要点pandas处理多组数据的时候往往会要用到数据的合并处理,使用 concat是一种基本的合并方式.而且concat中有很多参数可以调整,合并成你想要的数据形式.axis (合并方向)axis=0是预设值,因此未设定任何参...
2019-01-26 15:19:51
190
转载 Pandas学习(五)Pandas导入导出
[转载] (https://morvanzhou.github.io/tutorials/data-manipulation/np-pd/3-5-pd-to/)要点pandas可以读取与存取的资料格式有很多种,像csv、excel、json、html与pickle等…, 详细请看官方说明文件读取csvimport pandas as pd #加载模块#读取csvdata = pd....
2019-01-26 14:53:36
632
转载 Pandas学习(四)Pandas处理丢失数据
[转载] (https://morvanzhou.github.io/tutorials/data-manipulation/np-pd/3-4-pd-nan/)创建含 NaN 的矩阵有时候我们导入或处理数据, 会产生一些空的或者是 NaN 数据,如何删除或者是填补这些 NaN 数据就是我们今天所要提到的内容.建立了一个6X4的矩阵数据并且把两个位置置为空.dates = pd.date_...
2019-01-26 14:39:36
287
转载 Pandas学习(三)Pandas设置值
[转载] (https://morvanzhou.github.io/tutorials/data-manipulation/np-pd/3-3-pd-assign/)创建数据我们可以根据自己的需求, 用 pandas 进行更改数据里面的值, 或者加上一些空的,或者有数值的列.首先建立了一个 6X4 的矩阵数据。dates = pd.date_range('20130101', perio...
2019-01-26 14:22:20
380
转载 Pandas学习(二)Pandas 选择数据
[转载] (https://morvanzhou.github.io/tutorials/data-manipulation/np-pd/3-2-pd-indexing/)我们建立了一个 6X4 的矩阵数据。dates = pd.date_range('20130101', periods=6)df = pd.DataFrame(np.arange(24).reshape((6,4)),in...
2019-01-26 11:42:19
182
转载 Pandas学习(一)Pandas 基本介绍
[转载] (https://morvanzhou.github.io/tutorials/data-manipulation/np-pd/3-1-pd-intro/)Numpy 和 Pandas 有什么不同如果用 python 的列表和字典来作比较, 那么可以说 Numpy 是列表形式的,没有数值标签,而 Pandas 就是字典形式。Pandas是基于Numpy构建的,让Numpy为中心的应用...
2019-01-26 11:08:36
143
转载 树莓派 Ubuntu mate远程连接方法
(一)SSH方法:windows安装PuTTY1、给 Linux 安装 OpenSSH$ sudo apt-get install openssh-server2、查看openssh-server是否启动ps -e | grep ssh进程ssh-agent是客户端,sshd为服务器端,如果结果中有sshd的进程说明openssh-server已经启动,如果没有则需运行命令启动。3...
2019-01-25 18:24:24
4101
转载 Python中的*使用
Python中的*使用Python中的*使用 在为函数传递参数和函数定义时使用参数的时候,时常会看到有和 和*,下面分别讲解其作用。调用函数时使用*和 **假设有函数def test(a, b, c)test(args): 的作用其实就是把序列 args 中的每个元素,当作位置参数传进去。比如上面这个代码,如果 args 等于 (1,2,3) ,那么这个代码就等价于 test(1, ...
2019-01-23 22:31:22
128
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人