Parsing periodic emails and broadcasting as ROS topic?
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:
- 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.
- 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.
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
).