User Tools

Site Tools


software:datalogger

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
software:datalogger [2013/06/13 21:13] bokalsoftware:datalogger [2016/05/19 09:19] (current) – external edit 127.0.0.1
Line 1: Line 1:
-=== Data logging with mongodb ===+===== 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**. 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 == +==== Installing the logger ==== 
-Using a properly set up ros environment, get the patched sources using instructions below;+Using a properly set up ros environment (rosws set command working), get the patched sources using instructions below;
  
 * Install **roslua** as shown below * Install **roslua** as shown below
Line 23: Line 23:
      
 * Install the mongodb logger package; * Install the mongodb logger package;
-  rosws set ros_mongodb_log --git https://github.com/makokal/ros-mongodb_log.git+  rosws set mongodb_log --git https://github.com/makokal/ros-mongodb_log.git
   rosws update   rosws update
   # source bashrc/zshrc   # source bashrc/zshrc
-  rosmake ros_mongodb_log +  # Install the logger system dependencies (given for ubuntu) 
- +  sudo apt-get install python-pymongo python-pyrrd mongodb 
-== Logging with mongodb_log ==+  rosmake mongodb_log 
 +==== Logging with mongodb_log ====
 Run the logger node Run the logger node
-  rosrun ros_mongodb_log mongodb_log -a # record all topics or specify required ones+  rosrun mongodb_log mongodb_log -a # record all topics or specify required ones
   # use the tool mongodb_rdd to check   # use the tool mongodb_rdd to check
  
-== Querying the log database ==+==== 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|http://ros.org/wiki/pymongo]] and we have wrapped the common lisp version as well. It can be installed using; 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|http://ros.org/wiki/pymongo]] and we have wrapped the common lisp version as well. It can be installed using;
  
Line 39: Line 40:
   rosws update ros_cl_mongo   rosws update ros_cl_mongo
   # source bashrc   # source bashrc
 +  rosmake ros_cl_mongo # may take some time
 +  
 +The use it from the standard emacs REPL environment as follows;
 +  rosrun roslisp_repl repl
 +  # Now load the ros-cl-mongo package and interact with the database using it
 +  
 +Further usage instructions on cl-mongo are available at [[https://github.com/fons/cl-mongo|https://github.com/fons/cl-mongo]]
 +==== Locating the Database ====
 +The database is by default located in ''/var/lib/mongodb/'' where you are able to notice the databases named ``roslog.1`` etc. The mongo client knows about this path so starting mongo from any resonable location will still access this databases. Of course this path can be changed using the ''--dbpath'' flag on mongo to change where to read or write. In summary the database features of importance are;
 +  * Hostname : localhost (by default)
 +  * Port: 27017 (default)
 +  * Locatation: ''/var/lib/mongodb/''
 +
 +
 +==== Examples of usage ====
 +We have compiled simple example of logging with this tool and querying the data using either lisp or python. The examples are in the links below:
 +
 +* [[:logging_tutlesim|Logging turtlesim data]]
 +
 +
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