libfranka  0.8.0
FCI C++ API
Classes | Functions
log.h File Reference

Contains helper types for logging sent commands and received robot states. More...

#include <vector>
#include <franka/control_types.h>
#include <franka/robot_state.h>
Include dependency graph for log.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  franka::RobotCommand
 Command sent to the robot. More...
 
struct  franka::Record
 One row of the log contains a robot command of timestamp n and a corresponding robot state of timestamp n+1. More...
 

Functions

std::string franka::logToCSV (const std::vector< Record > &log)
 Writes the log to a string in CSV format. More...
 

Detailed Description

Contains helper types for logging sent commands and received robot states.

Function Documentation

◆ logToCSV()

std::string franka::logToCSV ( const std::vector< Record > &  log)

Writes the log to a string in CSV format.

If the string is not empty, the first row contains the header with names of columns. The following lines contain rows of values separated by commas.

If the log is empty, the function returns an empty string.

Parameters
[in]logLog provided by the ControlException.
Returns
a string in CSV format, or empty string.
Examples:
motion_with_control.cpp.