Comments (6)
I have looked at this and try to understand it. After some testing and research here is what I was able to get.
Looks like it is consumer/producer problem with some units. Some vendors actually acknowledge this in their documentation. Here is one Hemisphere model A101 and A222 (User Guide Revision: A2 May 7, 2018) Page 39 section "Random binary data from A222" stats:
• Verify the baud rate settings match
• Potentially, the volume of data requested to be output could be higher than the current baud rate supports. Try either using a higher baud rate for communications or decreasing the number of messages and/or baud rates
So with my tastes and running such tests overnights I was able to get consistent problems reported here. If the baud rate is too slow for message rate messages from serial do come corrupt therefore CRC check fails.
Some other units I tested have the same issue but do not mention anything like that in their documentation. One unit I tested did not have that problem. I could set baud rate 4800 or 9600 and messages were coming with proper CRC. This would point to "problematic" firmware implementation of circular buffer or whatever buffering technique is used. Increasing baud rate is one part of the problem. If your CPU is overvalued for a long time the same problem will accrue with such units. Messages are not removed fast enough from UART. I was able to reproduce this as well with high baud rate and VERY high host CPU usage. But in this case, it does not happen that often. So if your unit does not support Flow Control and it has to be disabled, that is the reason problem with low baud rate vs message rate
Tested on:
Ubuntu 18.04
ROS(melodic)
pyserial(3.4)
nmea_navsat_driver(master cloned 2 week ago)
Baud Rates:
4800 - 19200
Message rates:
GPGGA: 1 - 20 Hz
GPRMC: 1 - 20 Hz
GPGST: 1Hz
from nmea_navsat_driver.
Thanks for a TsingHua university doctor , whos first name is GUANG.
This error is solved by redefine /opt/ros/indigo/lib/python2.7/dist.../libnmea_navstat_driver/parse.py
the function of "parse_nmea_sentence" 's regex part is fault.
def parse_nmea_sentence(nmea_sentence):
# ( original code --- is invalid )Check for a valid nmea sentence
#if not re.match('^\$GP.*\*[0-9A-Fa-f]{2}$', nmea_sentence):
# logger.debug("Regex didn't match, sentence not valid NMEA? Sentence was: %s"
# % repr(nmea_sentence))
# return False
#-----ke yong ----2018.3.30
if nmea_sentence.find('GGA')<0:
logger.debug("Regex didn't match, sentence not valid NMEA? Sentence was: %s"
% repr(nmea_sentence))
return False
else:
print("GGA PAST")
fields = [field.strip(',') for field in nmea_sentence.split(',')]
from nmea_navsat_driver.
Can you post an example of a NMEA sentence that fails to parse with the previous parser but passes with the changes?
from nmea_navsat_driver.
Example of bad checksum with binary data before nmea message:
L����*$GNRMC,150541.20,A,4832.56003,N,11753.56027,W,0.058,,240320,,,F,V*07
$GNGGA,150541.20,4832.56003,N,11753.56027,W,5,12,0.58,525.0,M,-17.0,M,0.2,0000*53
L����*$GNRMC,150541.30,A,4832.56003,N,11753.56027,W,0.037,,240320,,,F,V*0F
$GNGGA,150541.30,4832.56003,N,11753.56027,W,5,12,0.58,525.0,M,-17.0,M,0.3,0000*53
L����*$GNRMC,150541.40,A,4832.56003,N,11753.56027,W,0.039,,240320,,,F,V*06
from nmea_navsat_driver.
This would probably be fixed by #55, but I think the author of that PR has abandoned it.
from nmea_navsat_driver.
how you are connect your GPS with laptop?
This error means your devices are not in same band rate.
And the best solution is to use Arduino with GPS sensor.
from nmea_navsat_driver.
Related Issues (20)
- ROS2 FOXY nmea_socket_driver timed out. HOT 3
- I want to modify part of the code to decode my own devices, which version of python should I use? 2.7 or 3.x? HOT 2
- Problems connecting nmea_topic_driver or nmea_serial_driver with Velodyne GPS HOT 3
- [Errno 111] Connection refused on docker container HOT 1
- Invalid checksum error when parsing GPRMC and GPGSV sentence HOT 1
- New to GPS HOT 1
- connect refused HOT 2
- ModuleNotFoundError: No module named 'serial' HOT 6
- Remove 'UserWarning' when building the package HOT 1
- Value error, likely due to missing fields in the NMEA message. Error was: invalid literal for int() with base 10: ''. Please report this issue at github.com/ros-drivers/nmea_navsat_driver, including a bag file with the NMEA sentences that caused it HOT 1
- ROS2 Humble - Improved Support and Documentation HOT 1
- Parse Talker IDs HOT 1
- Wrong heading from VTG message HOT 3
- Received a sentence with an invalid checksum HOT 3
- ROS 2 Humble release HOT 6
- Value error, likely due to missing fields in the NMEA message. Error was: 'utf-8' codec can't decode HOT 4
- ROS2 Humble, Missing fields in the NEMA message, 'utf-8' HOT 4
- nmea_topic_driver
- [bug] Using UDP communication, some statements fail to match because line breaks are not cleanly filtered. HOT 4
- Ros error: The 'sentence' field must be of type 'str' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nmea_navsat_driver.