Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message response problem #2

Open
Hrayo712 opened this issue Jan 22, 2020 · 0 comments
Open

Message response problem #2

Hrayo712 opened this issue Jan 22, 2020 · 0 comments

Comments

@Hrayo712
Copy link

Hello!

Hope you're doing well. I am trying to get your client to work. However, I have encountered the following problem:

It appears that I can succesfully obtain a connection response from the NTRIP caster. However, when I read the response , the "\n\r" string is never found. As a consequence, the code endlessly iterates over a seemingly infinite message.

I have set the following parameters in ROS (exactly as typed here):
ntrip_server = www.igs-ip.net:2101
ntrip_stream = DLF100NLD0
ntrip_user = ****
ntrip_pass= ****

Note: I am not using the nmea_gga sentence, as the NMEA is not supported by the caster which I am trying to access.

connection = HTTPConnection(self.ntc.ntrip_server)
connection.request('GET', '/'+self.ntc.ntrip_stream, None, headers)
response = connection.getresponse()
if response.status != 200: raise Exception("blah")
buf = ""
rmsg = Message()
while not self.stop:
data = response.read(100)
pos = data.find('\r\n')
if pos != -1:
rmsg.message = buf + data[:pos]
rmsg.header.seq += 1
rmsg.header.stamp = rospy.get_rostime()
buf = data[pos+2:]
self.ntc.pub.publish(rmsg)
else: buf += data

I have observed a couple of times that it actually finds the end and succesfully publishes the message. However, there is no periodicity. Perhaps its the NTRIP caster ? I would appreciate any pointer you may have.

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant