ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Parsing periodic emails and broadcasting as ROS topic?

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

Laughlin gravatar image

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

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

Comments

1

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 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

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

Laughlin gravatar image

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

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.

edit flag offensive delete link more

Comments

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 -0500 )edit

Question Tools

1 follower

Stats

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

Seen: 307 times

Last updated: Jun 06 '16