Measurement data types

List:

  • time - at each point of measurement save ros time in seconds
  • links - save pose of r1_tip_link with respect to base_link frame
    ~/links/link_names [r1_tip_link, r2_tip_link]
    
  • forces - save forces (geometry_msgs/WrenchStamped) from specified topics
    ~/forces/topics [/r1_force_data, /r2_force_data]
    ~/forces/save_all [false, false] --whether save all incoming data or just at measurement position
    
  • joints - save position of all joints in radians
  • chameleon_camera - at each point of measurement turn on calibration target, wait for 5s, save picture and turn off calibration target
    Addition parameters of chameleon_camera measurement type with their default values:
    ~/chameleon_camera/calib_io_number [10030]
    ~/chameleon_camera/pause_sec [5]
    ~/chameleon_camera/write_io_service [/write_io]
    ~/chameleon_camera/save_img_service ["/image_saver/save"]
    
  • ilc - save position of ILC in meters
  • note - save notes readed from keyboard

Properties

Each datatype have matlab script in clopema_measurement/matlab folder for loading dataset into matlab.
The name of the loading function is derived from the name as follow:

var = read_{DATA_TYPE}(folder); %folder is same folder which was used in data measurement script
read_ilc(folder); read_r1_tip_link(folder); ...

To save data specify ros parameter using following pattern:
<parma name="save_{DATA_TYPE}" value="true" />

Add new measurement type

To specify new data type you have to create C++ class which will be derived from SaveDataBase class.
Example of such class can be found in C++ class SaveDataTime.h and SaveDataTime.cpp files in clopema_measurements package.
The following pure virtual function have to be implemented in your class:

   /** \brief Get Name of the measurement module. */
    virtual std::string getName() = 0;

    /** \brief Initialize measurement. For example write header to the file, load parameters, etc. */
    virtual void init(ros::NodeHandle& node, bool init_headers = true) = 0;

    /** \brief Measure data and save them to the file. */
    virtual void measure(const robot_state::RobotStatePtr& rs) = 0;

After you create new class you have follow this steps:

- include your header file in SaveDataSaver.h file
- push instance of your class into saver_modules c++ vector in SaveDataSaver constructor (SaveDataSaver.cpp file)
- append name of your .cpp file to the clopema_measurements library definition in CMakeList.txt 
- create loading matlab function in matlab folder
- document your class in this page