Coder Social home page Coder Social logo

data_recorder's Introduction

CNS Flight Stack: Data Recorder ROS1 Package (data_recorder)

License Paper Release

Maintainer: Martin Scheiber

A ROS wrapper to communicate via ROS services to start execution of data recording scripts and data storing scripts.

Credit

This code was written by the Control of Networked System (CNS), University of Klagenfurt, Klagenfurt, Austria.

License

This software is made available to the public to use (source-available), licensed under the terms of the BSD-2-Clause-License with no commercial use allowed, the full terms of which are made available in the LICENSE file. No license in patents is granted.

Usage for academic purposes

If you use this software in an academic research setting, please cite the corresponding paper and consult the LICENSE file for a detailed explanation.

@article{cns_flightstack22,
    title        = {CNS Flight Stack for Reproducible, Customizable, and Fully Autonomous Applications},
    author       = {Scheiber, Martin and Fornasier, Alessandro and Jung, Roland and Böhm, Christoph and Dhakate, Rohit and Stewart, Christian and Steinbrener, Jan and Weiss, Stephan and Brommer, Christian},
    journal      = {IEEE Robotics and Automation Letters},
    volume       = {7},
    number       = {4},
    year         = {2022},
    doi          = {10.1109/LRA.2022.3196117},
    url          = {https://ieeexplore.ieee.org/document/9849131},
    pages        = {11283--11290}
}

Getting Started

Prerequesites

This package is part of the CNS Flight Stack and thus depends on the other packages of the flight stack:

Further the following libraries are required

  • Eigen
  • ROS noetic

Build

As this is a ROS package, please build it within the catkin environment with

catkin build data_recorder

Usage

The intended usage is together with the CNS Flight Stack: Autonomy Engine, which will interact with the data recorder. Use the provided launchfile to start the ROS1 node

roslaunch data_recorder recorder.launch

Recording scripts

The main goal of this node is to execute several scripts, i) to start data recording, ii) to stop data recording, and iii) to store the recorded data.

  • i) is executed when a recording start request is received and is most likely to call the CNS Flight Stack: Nodelet Rosbag, the arguments given in record_cmd are passed to this script
  • ii) is executed when a recording stop is received, typically killing all nodes starting with /record_
  • iii) is executed after (ii) and can be used to move the recorded data (assuming several storage locations) to a final (external) device; the arguments given in store_cmd are passed to this script

For a sample configuration of these scripts please take a look at the scripts provided in CNS Flight Stack Scripts.

ROS Parameters

This node uses the following parameters that can be set in any launch file.

ROS parameter description default value
record_script path to the record script which is executed to start the recording
record_cmd arguments passed to the record script
record_stop path to the record stop script which is executed to stop the recording
store_script path to the record script which is executed to store the data afterwards
store_cmd arguments passed to the store script
verbose flag to display debug output False

Default Launchfile Parameters

These are the same as the ROS parameters, so only their default value is given.

Launch parameter default value
record_script <path_to_data_recorder>/scripts/record.sh (dummy script)
record_cmd dev1_full
record_stop <path_to_data_recorder>/scripts/record_stop.sh (generic script to stop all nodes starting with /record_)
store_script <path_to_data_recorder>/scripts/store.sh (dummy script)
store_cmd
verbose false

Usage without Autonomy Engine

If required the detector can be used without the [CNS FlightStack: Autonomy Engine]. You can interact with the detector using the provided ROS service ROS Service /data_recorder/record using the std_srvs/SetBool. The request is interpreted as follows

  • data=true: start recording (or do nothing if already recording)
  • data=false: stop recording (or do nothing if already stopped)

The response is success is set to true if the operation was successful (or mode was already selected). If any failure occured (script not found, process could not be started, ...) the response is set to false. Further, the message filed contains a minor debug information on the recording status.

An example execution looks like

rosservice call /data_recorder/record "data: false"
# Feedback:
success: true|false
message: "START: ..."|"STOP: ..."

Architecture

Please refer to the academic paper for further insights of the Data Recorder.

Package Layout

/path/to/data_recorder$ tree -L 3 --noreport --charset unicode
.
|-- CMakeLists.txt
|-- launch
|   `-- recorder.launch
|-- LICENSE
|-- nodes
|   `-- DataRecorderNode.py
|-- package.xml
|-- README.md
|-- scripts
|   |-- record.sh
|   |-- stop_record.sh
|   `-- store.sh
|-- setup.py
`-- src
    `-- data_recorder
        |-- data_recorder.py
        `-- __init__.py

Copyright (C) 2021-2022 Martin Scheiber and Christian Brommer, Control of Networked Systems, University of Klagenfurt, Austria. You can contact the authors at [email protected], [email protected].

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.