Program Listing for File robot_state_log.hpp

Return to documentation for file (include/franka/logging/robot_state_log.hpp)

// Copyright (c) 2023 Franka Robotics GmbH
// Use of this source code is governed by the Apache-2.0 license, see LICENSE
#pragma once

#include <vector>

#include <franka/control_types.h>
#include <franka/robot_state.h>

namespace franka {

struct RobotCommand {
  JointPositions joint_positions{0, 0, 0, 0, 0, 0, 0};
  JointVelocities joint_velocities{0, 0, 0, 0, 0, 0, 0};
  CartesianPose cartesian_pose{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1};
  CartesianVelocities cartesian_velocities{0, 0, 0, 0, 0, 0};
  Torques torques{0, 0, 0, 0, 0, 0, 0};
};

struct Record {
  RobotState state;
  RobotCommand command;
};

std::string logToCSV(const std::vector<Record>& log);
}  // namespace franka