Flexiv RDK APIs  2.1
file_io.hpp
Go to the documentation of this file.
1 
6 #ifndef FLEXIV_RDK_FILE_IO_HPP_
7 #define FLEXIV_RDK_FILE_IO_HPP_
8 
9 #include "robot.hpp"
10 
11 namespace flexiv::rdk {
12 
17 class FileIO
18 {
19 public:
25  FileIO(const Robot& robot);
26  virtual ~FileIO();
27 
34  std::vector<std::string> traj_files_list() const;
35 
42  std::vector<std::string> projects_list() const;
43 
54  void UploadTrajFile(const std::string& file_dir, const std::string& file_name);
55 
65  std::string DownloadTrajFile(const std::string& file_name);
66 
80  void DownloadTrajFile(const std::string& file_name, const std::string& save_dir);
81 
96  void UploadProject(const std::string& project_dir);
97 
108  void DownloadProject(const std::string& project_name, const std::string& save_dir);
109 
119  void DownloadCollisionMesh(const std::string& save_dir);
120 
121 private:
122  class Impl;
123  std::unique_ptr<Impl> pimpl_;
124 };
125 
126 } /* namespace flexiv::rdk */
127 
128 #endif /* FLEXIV_RDK_FILE_IO_HPP_ */
Interface to exchange files with the robot. Only certain types of file can be transferred.
Definition: file_io.hpp:18
std::string DownloadTrajFile(const std::string &file_name)
[Blocking] Download a trajectory file (.traj) from the robot.
std::vector< std::string > projects_list() const
[Blocking] A list of all user projects currently stored in the connected robot.
void DownloadProject(const std::string &project_name, const std::string &save_dir)
[Blocking] Download a project from the robot and save to the specified directory.
void UploadTrajFile(const std::string &file_dir, const std::string &file_name)
[Blocking] Upload a local trajectory file (.traj) to the robot.
std::vector< std::string > traj_files_list() const
[Blocking] A list of all trajectory files currently stored in the connected robot.
FileIO(const Robot &robot)
[Non-blocking] Instantiate the file exchange interface.
void DownloadCollisionMesh(const std::string &save_dir)
[Blocking] Download all collision mesh files of the connected robot and save to the specified directo...
void UploadProject(const std::string &project_dir)
[Blocking] Upload a local project to the robot.
void DownloadTrajFile(const std::string &file_name, const std::string &save_dir)
[Blocking] Download a trajectory file (.traj) from the robot and save to the specified directory.
Main interface to control the robot, containing several function categories and background services.
Definition: robot.hpp:24