timn/ros-mongodb_log — pull request #2 by marc-hanheide (2013-07-10 20:15:54+00:00)
Title: changes for groovy and catkinized

Tim,

I made some modifications to make it all compile within our catkin workspace in ROS groovy. However, this doesn't work yet correctly, So feel free to disregard this pull request.
We talked in Stuttgart at ROSCon about our use case: We want to use MongoDB for logging ROS topics in the [STRANDS FP7 project](http://www.strands-project.eu/)
The problem is as follows: I can start `rosrun mongodb_log mongodb_log /odom`, but then no data is actually inserted into the DB and I get trillions of exceptions as below:
```
marc@marcs-pc:~/ros_ws/src/mongodb_log$ rosrun mongodb_log mongodb_log /odom
Adding topic /odom
GENERIC Python logger used for topic /odom
Updated graphs, total queue size 0, dropped 0, took 0:00:00.000831
ACTIVE: WorkerProcess- 0-/odom
/usr/lib/python2.7/dist-packages/pymongo/collection.py:310: RuntimeWarning: couldn't encode - reloading python modules and trying again. if you see this without getting an InvalidDocument exception please see http://api.mongodb.org/python/current/faq.html#does-pymongo-work-with-mod-wsgi
continue_on_error, self.__uuid_subtype), safe)
InvalidDocument WorkerProcess- 0-/odom@/odom:

Cannot encode object: genpy.Time[1373487256959625959]
InvalidDocument WorkerProcess- 0-/odom@/odom:

Cannot encode object: genpy.Time[1373487256972947120]
InvalidDocument WorkerProcess- 0-/odom@/odom:

Cannot encode object: genpy.Time[1373487256992713451]
InvalidDocument WorkerProcess- 0-/odom@/odom:
```

Any idea what I'm doing wrong?

Thanks,

Marc