User Tools

Site Tools


software:datalogger

This is an old revision of the document!


Data logging with mongodb

There is a tool for loggin data into mongodb for later processing. The data is fetched from selected topics or all topics when running a ROS process. The logging tool is from the package mongodb_log.

Installing mongodb_log

Using a properly set up ros environment, get the patched sources using instructions below;

* Install roslua as shown below

rosws set roslua --git https://github.com/timn/roslua.git
rosws update roslua
# source bashrc/zshrc
roscd roslua
# install the ubuntu dependencies specified on the rosdep.yaml file in the roslua package
rosmake roslua

* Install mongodb package from ROS as shown below

rosws set warehouse-hg --hg http://kforge.ros.org/warehousewg/warehouse-hg
rosws update warehouse-hg
# source bashrc/zshrc
# install dependencies (scons and v8) as given below
sudo apt-get install scons
sudo apt-get install libv8-dev
rosmake mongodb

* Install the mongodb logger package;

rosws set ros_mongodb_log --git https://github.com/makokal/ros-mongodb_log.git
rosws update
# source bashrc/zshrc
rosmake ros_mongodb_log
Logging with mongodb_log

Run the logger node

rosrun ros_mongodb_log mongodb_log -a # record all topics or specify required ones
# use the tool mongodb_rdd to check
Querying the log database

The data from the database can be retrieved using any of the mongo clients APIs. For cram, the cl-mongo client is recommended but there are clients for any popular language around like Python, C++ etc. For mython, the pymongo client has already been wrapped in ROS here http://ros.org/wiki/pymongo and we have wrapped the common lisp version as well. It can be installed using;

rosws set ros_cl_mongo --git https://github.com/makokal/ros_cl_mongo
rosws update ros_cl_mongo
# source bashrc
software/datalogger.1371158008.txt.gz · Last modified: 2016/05/19 09:18 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki