0

Rosanswers logo

Does anybody have experience or thoughts about how one might go about parsing periodic (sent in 30/60 second or longer interval) emails and then broadcasting their clear text contents (or .txt attachment) as a ROS topic? I'm more interested in the mechanics behind the ROS<-->email server bit as parsing clear text and building my ROS msgs won't be difficult.

For the curious, I have a set of GPS trackers that transmit GPS messages/sentences via the Iridium SBD system. The SBD (Short Burst Data) messages arrive to me in the form of clear text emails containing what ever GPS data I want (NMEA sentences, or custom messages).

My initial thoughts:

  1. The VMime library for C++ appears to provide full IMAP/POP/SMTP and TLS/SSL support. A ROS node could be written that periodically checks a given IMAP inbox, and then publishes the GPS data upon receipt of a new message.
  2. Write standalone C++/Python program to query email server and save email body contents containing GPS strings as time stamped text files, which could then be parsed and broadcast by a ROS node.

Originally posted by Laughlin on ROS Answers with karma: 66 on 2016-05-16

Post score: 0


Original comments

Comment by gvdhoorn on 2016-05-16:
Personally I would go for a small Python node that connects to an IMAP server and uses IMAPs IDLE mechanism to get notified of incoming emails. Parsing should be trivial then. Publishing too (just use rospy).

1 Answers1

0

Rosanswers logo

Following @gvdhoorn's direction, I implemented Python + imaplib2.

GitHub user @jexhson: has a nice example of imaplib2 + IDLE: https://gist.github.com/jexhson/3496039.

Haven't yet tested IDLE timeouts (I read a few places this could happen), but works very nicely so far in my short term testing.


Originally posted by Laughlin with karma: 66 on 2016-06-06

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by gvdhoorn on 2016-06-06:
Nice. Good to hear you got something sorted out in the end. Nice of you to report back.