 |
Flexiv AIDK APIs
1.2
|
Go to the documentation of this file.
28 AIDKClient(
const std::string ip,
float request_timeout);
64 bool detect(
const std::string obj_name,
const std::string camera_id,
65 const int coordinate_id = 1,
66 const std::vector<double> &camera_pose = {0.0, 0.0, 0.0, 1.0,
68 const std::vector<double> &tcp_pose = {0.0, 0.0, 0.0, 1.0, 0.0,
70 const std::vector<double> &tcp_force = {0.0, 0.0, 0.0, 0.0, 0.0,
72 const std::string command =
"CUSTOM",
73 const std::string custom =
"");
94 const std::string obj_name,
const std::string camera_id,
95 const int coordinate_id = 1,
96 const std::vector<double> &camera_pose = {0.0, 0.0, 0.0, 1.0, 0.0, 0.0,
98 const std::vector<double> &camera_intrinsic = {0.0, 0.0, 0.0, 0.0, 0.0,
100 const std::vector<double> &tcp_pose = {0.0, 0.0, 0.0, 1.0, 0.0, 0.0,
102 const std::vector<double> &tcp_force = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
103 const std::vector<u_char> &rgb_input = std::vector<u_char>(),
104 const std::vector<u_char> &depth_input = std::vector<u_char>(),
105 const std::string custom =
"");
118 const std::vector<double> &camera_pose = {0.0, 0.0, 0.0,
121 const std::vector<double> &tcp_pose = {0.0, 0.0, 0.0, 1.0,
123 const std::vector<double> &tcp_force = {0.0, 0.0, 0.0, 0.0,
152 bool warmup()
const noexcept;
192 bool parse_result(
const std::string &obj_name,
const std::string &key,
193 int index, std::vector<Result> &result) noexcept;
208 std::tuple<std::string, std::string, std::vector<std::string>>
218 std::tuple<std::vector<std::string>, std::vector<std::string>>
227 std::tuple<uint64_t, uint32_t>
238 bool send_file(
const std::string local_file_path,
239 const std::string remote_file_path)
const;
249 const std::string local_file_path)
const noexcept;
258 const std::string remote_dir)
const;
267 const std::string local_dir)
const noexcept;
275 bool remove_path(
const std::string remote_file_path)
const noexcept;
290 std::unordered_map<std::string, value_variant>
300 std::unordered_map<std::string, value_variant> &vars);
303 std::unique_ptr<AIDKImpl> pimpl;
std::vector< int > get_detected_obj_nums() const noexcept
Function to get all current detect object nums.
bool reload_configs(const std::string name) const noexcept
Reload project config.
std::vector< std::string > all_direct_command() const noexcept
All direct commands.
AIDKClient(const std::string ip, float request_timeout)
Constructor of client.
std::tuple< std::vector< std::string >, std::vector< std::string > > list_remote_files(const std::string remote_dir) const noexcept
List file and dir list under remote directory.
bool detect_with_image(const std::string obj_name, const std::string camera_id, const int coordinate_id=1, const std::vector< double > &camera_pose={0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0}, const std::vector< double > &camera_intrinsic={0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, const std::vector< double > &tcp_pose={0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0}, const std::vector< double > &tcp_force={0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, const std::vector< u_char > &rgb_input=std::vector< u_char >(), const std::vector< u_char > &depth_input=std::vector< u_char >(), const std::string custom="")
Detect request with image input.
bool make_remote_directory(const std::string remote_dir) const noexcept
Make directory in remote.
std::tuple< uint64_t, uint32_t > get_file_info(const std::string remote_file_path) const
Function to get remote file info.
void send_folder(const std::string local_dir, const std::string remote_dir) const
Copy local folder to remote folder.
std::vector< float > get_camera_intrinsic() const noexcept
Function to get camera intrinsic.
bool parse_result(const std::string &obj_name, const std::string &key, int index, std::vector< Result > &result) noexcept
Function to parse detection result.
Response set_direct_setting_variables(std::unordered_map< std::string, value_variant > &vars)
Set variable.
bool remove_path(const std::string remote_file_path) const noexcept
Remove remote files or folders.
bool detect_v1x(const std::string command, const std::vector< double > &camera_pose={0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0}, const std::vector< double > &tcp_pose={0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0}, const std::vector< double > &tcp_force={0.0, 0.0, 0.0, 0.0, 0.0, 0.0})
Detect request V1x.
std::tuple< std::string, std::string, std::vector< std::string > > get_runtime_info() const noexcept
Function to get runtime info.
bool receive_file(const std::string remote_file_path, const std::string local_file_path) const noexcept
Receive remote file to local file path.
void receive_folder(const std::string remote_dir, const std::string local_dir) const noexcept
Copy remote folder to local folder.
int get_detected_obj_num(const std::string &obj_name) const noexcept
Function to get detected object number based of object name.
AIStatus get_current_state() const noexcept
Get current AI edge state code.
~AIDKClient()
Destructor of client.
bool warmup() const noexcept
Warmup current project, if configured on NoemaEdge.
uint64_t get_detected_time() const noexcept
Get timestamp of detect request.
bool detect(const std::string obj_name, const std::string camera_id, const int coordinate_id=1, const std::vector< double > &camera_pose={0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0}, const std::vector< double > &tcp_pose={0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0}, const std::vector< double > &tcp_force={0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, const std::string command="CUSTOM", const std::string custom="")
Detect request.
bool is_ready() const noexcept
Check if AI edge is ready.
std::unordered_map< std::string, value_variant > get_direct_setting_variables()
Get settable variables.
declaration of common constants and function
bool save_configs() const noexcept
Save current project config.
bool send_file(const std::string local_file_path, const std::string remote_file_path) const
Function to send local file to remote file path.
std::vector< std::string > get_detected_obj_names() const noexcept
Function to get all current detect object names.