Ask Your Question

Parsing periodic emails and broadcasting as ROS topic?

asked 2016-05-16 13:44:32 -0600

Laughlin gravatar image

updated 2016-06-06 12:52:29 -0600

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.
edit retag flag offensive close merge delete



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).

gvdhoorn gravatar image gvdhoorn  ( 2016-05-16 15:58:52 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-06-06 10:44:12 -0600

Laughlin gravatar image

updated 2016-06-06 11:54:28 -0600

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

GitHub user @jexhson: has a nice example of imaplib2 + IDLE: .

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.

edit flag offensive delete link more


Nice. Good to hear you got something sorted out in the end. Nice of you to report back.

gvdhoorn gravatar image gvdhoorn  ( 2016-06-06 11:23:28 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-05-16 13:44:32 -0600

Seen: 170 times

Last updated: Jun 06 '16