ROS读取手机GPS数据(1)

来源:互联网 发布:java最新书籍 编辑:程序博客网 时间:2024/06/05 05:51
      昨天学习了原创文章,并得以实现《在ROS(indigo)中读取手机GPS用于机器人定位~GPS2BT在ubuntu和window系统下的使用方法~》

http://blog.csdn.net/zhangrelay/article/details/51306034

      方便以后使用,记录一下操作步骤:

一、插上USB蓝牙小模块,然后打开手机蓝颜、Ubuntu蓝牙并连接

二、开GPS2Bluetooth,并start;Ubuntu下搜索 Bluetooth Manager, 打开Bluetooth Devices,右击手机蓝牙连接GPS2BT2

三、开启后,实时发送GPS数据。想查看该数据:1、串口调试软件Cutecom ;2、ROS 系统 

        3.1 Cutecom实现

               Ubuntu对硬件设备有权限设置,先设置串口为可读可写(#rfcomm0为蓝牙串口):

                                ~$ cd /dev/

                                 /dev$ chmod +666 rfcomm0 

              然后运行串口软件,并Open device

                                 /dev$ cutecom

               

               3.2 终端查看GPS数据

                       新终端启动roscore,后连接串口并显示

                              ~$ rosrun nmea_navsat_driver nmea_serial_driver _port:=/dev/rfcomm0 _baud:=115200

                             ~$ rostopic echo /fix

                        或者:

                                ~$ rostopic echo /fix~$ rosrun nmea_navsat_driver nmea_topic_serial_reader _port:=/dev/rfcomm0 _baud:=115200

                                ~$ rostopic echo /nmea_sentence



     

     

原创粉丝点击