![]() |
Endorob
1.4
A C++ Robotics library by P. Berthet-Rayne
|
Motion recorder Class. More...
#include <endorob.h>
Public Member Functions | |
Motion_RW () | |
Motion_RW (Endorob *robot) | |
~Motion_RW () | |
void | set_endorob_pointer (Endorob *robot) |
void | set_virt_snake_pointer (Virtual_Snake *virt_snake) |
void | set_write_frequency (const double &freq) |
void | set_read_frequency (const double &freq) |
void | start_recording () |
void | stop_recording () |
void | set_file_name_write (const std::string &file) |
void | set_file_name_read (const std::string &file) |
void | load_file (const std::string &file) |
void | load_virtual_snake_file (const std::string &file) |
void | benchmark_virtual_snake_file (const std::string &file) |
void | benchmark_virtual_snake_vec (const std::vector< Vec > &virtual_vec, const std::vector< Mat4d > &Td_vec) |
void | write_once (const Virtual_Snake &curv, const Mat4d &Ttip) |
void | write_once (const char &key) |
bool | is_reading_finished () |
bool | is_running () |
Protected Types | |
enum | File_type { File_type::Joint, File_type::Virtual_robot, File_type::Master } |
Protected Member Functions | |
void | motion_RW_loop (int a, int b) |
void | output_header () |
void | output_data () |
Protected Attributes | |
std::thread * | pthread |
volatile bool | m_run |
bool | m_header_written |
volatile bool | m_start_loop |
double | m_period_write |
double | m_period_read |
Endorob * | probot |
Virtual_Snake * | pvirt_snake |
std::ofstream | m_file_write |
std::ifstream | m_file_read |
Time_point | m_t0_write |
Time_point | m_t0_read |
Time_point | m_start_time |
std::string | m_file_name_write |
std::string | m_file_name_read |
Motion_mode | m_mode |
std::vector< Mat, Eigen::aligned_allocator< Mat > > | m_q_data |
std::vector< Mat, Eigen::aligned_allocator< Mat > > | m_T_data |
std::vector< double > | m_error_data |
std::vector< double > | m_input_timing |
std::vector< Vec > | m_virtual_snake_data |
std::vector< Mat4d > | m_tip_data |
bool | m_overwrite_file_period |
File_type | m_file_type |
bool | m_runonce |
std::ofstream | m_benchmark_file |
std::ofstream | m_benchmark_check_file |
Snake_Path | m_robot_path_for_plot |
Static Protected Attributes | |
static uint | m_file_counter = 0 |
Motion recorder Class.
This class is only used internally to EndoRob, but you can still use it... It is a threaded motion and data recorder that can save motion data to file at a desired frequency, but also read and replay at a desired frequency.
|
strongprotected |
Motion_RW::Motion_RW | ( | ) |
Definition at line 3569 of file endorob.cpp.
Motion_RW::Motion_RW | ( | Endorob * | robot | ) |
Definition at line 3594 of file endorob.cpp.
Motion_RW::~Motion_RW | ( | ) |
Definition at line 3620 of file endorob.cpp.
void Motion_RW::benchmark_virtual_snake_file | ( | const std::string & | file | ) |
Definition at line 3961 of file endorob.cpp.
void Motion_RW::benchmark_virtual_snake_vec | ( | const std::vector< Vec > & | virtual_vec, |
const std::vector< Mat4d > & | Td_vec | ||
) |
Definition at line 4055 of file endorob.cpp.
bool Motion_RW::is_reading_finished | ( | ) |
Definition at line 4161 of file endorob.cpp.
bool Motion_RW::is_running | ( | ) |
Definition at line 4181 of file endorob.cpp.
void Motion_RW::load_file | ( | const std::string & | file | ) |
Definition at line 3719 of file endorob.cpp.
void Motion_RW::load_virtual_snake_file | ( | const std::string & | file | ) |
Definition at line 3867 of file endorob.cpp.
|
protected |
Definition at line 4188 of file endorob.cpp.
|
protected |
Definition at line 4591 of file endorob.cpp.
|
protected |
Definition at line 4568 of file endorob.cpp.
void Motion_RW::set_endorob_pointer | ( | Endorob * | robot | ) |
Definition at line 3645 of file endorob.cpp.
void Motion_RW::set_file_name_read | ( | const std::string & | file | ) |
Definition at line 3714 of file endorob.cpp.
void Motion_RW::set_file_name_write | ( | const std::string & | file | ) |
Definition at line 3709 of file endorob.cpp.
void Motion_RW::set_read_frequency | ( | const double & | freq | ) |
Definition at line 3660 of file endorob.cpp.
void Motion_RW::set_virt_snake_pointer | ( | Virtual_Snake * | virt_snake | ) |
Definition at line 3650 of file endorob.cpp.
void Motion_RW::set_write_frequency | ( | const double & | freq | ) |
Definition at line 3655 of file endorob.cpp.
void Motion_RW::start_recording | ( | ) |
Definition at line 3666 of file endorob.cpp.
void Motion_RW::stop_recording | ( | ) |
Definition at line 3699 of file endorob.cpp.
void Motion_RW::write_once | ( | const char & | key | ) |
Definition at line 4137 of file endorob.cpp.
void Motion_RW::write_once | ( | const Virtual_Snake & | curv, |
const Mat4d & | Ttip | ||
) |
Definition at line 4073 of file endorob.cpp.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |