在ROS(indigo)中读取手机GPS用于机器人定位~GPS2BT在ubuntu和window系统下的使用方法~
在ROS(indigo)中读取手机GPS用于机器人定位~GPS2BT在ubuntu和window系统下的使用方法~
不需要额外购买GPS设备。
将手机GPS数据通过蓝牙传输给计算机使用,当然通过类似方法也可以使用手机的三轴陀螺和加速度计。
Android Phone:
1.
2.
3.
Ubuntu 14.04 LTS:
1. 安装蓝牙软件。bluez
安装好后,就可以将通过蓝牙将计算机和手机配对。
也可以让计算机通过手机蓝牙上网。
言归正传,添加GPS。
2. 添加蓝牙GPS。
~$ hcitool scan
Scanning ...
00:9A:CD:CF:7D:38ALE-UL00
~$ sdptool browse 00:9A:CD:CF:7D:38
Service Name: GPS2BT2
Service RecHandle: 0x1000c
Service Class ID List:
"Serial Port" (0x1101)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 5
~$ sudo gedit /etc/bluetooth/rfcomm.conf
# RFCOMM configuration file.
#
#rfcomm0 {
# # Automatically bind the device at startup
# bind yes;
#
# # Bluetooth address of the device
# device 00:9A:CD:CF:7D:38;
#
# # RFCOMM channel for the connection
# channel 5;
#
# # Description of the connection
# comment "Example Bluetooth GPS device";
#}
重启,就可以在蓝牙配置里启动GPS2BT2了。
3. 用串口调试工具查看GPS数据。
4. ROS中查看GPS数据。
需要安装如下功能包:
~$ sudo apt-get install ros-indigo-nmea-*
安装完成后,启动roscore,需要用到下面命令:
~$ rosrun nmea_navsat_driver nmea_serial_driver _port:=/dev/rfcomm0 _baud:=115200
~$ rostopic echo /fix
~$ rosrun nmea_navsat_driver nmea_topic_serial_reader _port:=/dev/rfcomm0 _baud:=115200
~$ rostopic echo /nmea_sentence
Windows:
1. 在蓝牙配置中启用SPP。
2. 测试GPS,选用google earth。
由于连接出错,重新连接,端口更新为COM43(原来为COM42)。
~END~
最新文章
- new 与 malloc 的区别
- innodb insert buffer 插入缓冲区的理解
- Implement Stack using Queues
- lua 基本
- android JB2连拍降速原理介绍
- 自定义AXI总线形式SPI接口IP核,点亮OLED
- SSL/TLS抓包出现提示Ignored Unknown Record
- mariadb安装
- python数据结构与算法之算法和算法分析
- Flutter windows环境安装 + 模拟设备 + 项目运行
- laravel 路由模型绑定
- Web系统页面打印技术实现与分析
- Identity Server4学习系列一
- Javascript Jquery 中的数组定义与操作
- 雷林鹏分享:Ruby CGI方法
- mysql常用日期、时间查询
- CodeForces Round #527 (Div3) B. Teams Forming
- linux下解压 tar.bz2
- SEA 教程
- 【原创】移动端获取用户公网ip,获取用户ip
热门文章
- centos 7 x64 搭建 elasticsearch 服务
- 解读Raft(二 选举和日志复制)
- SpringMVC格式转化错误之HTTP Status [400] – [Bad Request]
- Python3 OS 文件/目录方法
- Python3 元组
- Android自定义异常类
- 【SSH系列】hibernate映射 -- 一对一双向关联映射
- Swift中如何化简标准库中冗长的类实例初始化代码
- J2EE进阶(十六)Hibernate 中getHibernateTemplate()方法使用
- Findbug在项目中的运用--提高代码质量