software:datalogger
                Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| software:datalogger [2013/05/31 10:41] – bokal | software: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 | + | ==== Installing | 
| - | Using a properly set up ros environment, | + | Using a properly set up ros environment | 
| - | rosws set ros_mongodb_log --git https:// | + | |
| - | rosws update | + | |
| - | # source bash | + | |
| - | rosmake ros_mongodb_log | + | |
| - | # install any missing deps | + | |
| - | == Logging with mongodb_log == | + | * Install **roslua** as shown below | 
| + | rosws set roslua --git https:// | ||
| + | rosws update roslua | ||
| + | # source bashrc/ | ||
| + | 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:// | ||
| + | rosws update warehouse-hg | ||
| + | # source bashrc/ | ||
| + | # 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 mongodb_log --git https:// | ||
| + | rosws update | ||
| + | # source bashrc/ | ||
| + | # Install the logger system dependencies (given for ubuntu) | ||
| + | sudo apt-get install python-pymongo python-pyrrd mongodb | ||
| + | rosmake mongodb_log | ||
| + | ==== Logging with mongodb_log | ||
| Run the logger node | Run the logger node | ||
| - | rosrun | + | rosrun | 
| # use the tool mongodb_rdd to check | # 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:// | ||
| + | |||
| + | rosws set ros_cl_mongo --git https:// | ||
| + | rosws update ros_cl_mongo | ||
| + | # 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:// | ||
| + | ==== Locating the Database ==== | ||
| + | The database is by default located in ''/ | ||
| + | * Hostname : localhost (by default) | ||
| + | * Port: 27017 (default) | ||
| + | * Locatation: ''/ | ||
| + | |||
| + | |||
| + | ==== 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: | ||
| + | |||
| + | * [[: | ||
| + | |||
| + | |||
software/datalogger.1369996864.txt.gz · Last modified:  (external edit)
                
                