You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

73 lines
2.3 KiB

#ifndef BUSBAR_PLANNER_API_H
#define BUSBAR_PLANNER_API_H
#ifdef _WIN32
#ifdef BUSBAR_PLANNER_EXPORTS
#define BUSBAR_API __declspec(dllexport)
#else
#define BUSBAR_API __declspec(dllimport)
#endif
#else
#define BUSBAR_API
#endif
extern "C" {
/**
* 巴片路径规划接口
*
* @param start_x, start_y, start_z: 起点坐标
* @param end_x, end_y, end_z: 终点坐标
* @param dir_x, dir_y, dir_z: 起始方向
* @param xsize, ysize, zsize: 地图尺寸
* @param obstacles: 障碍物数组 (xsize*ysize*zsize)
* @param available_types, 可选用的巴片类型
* @param busbar_width: 巴片宽度
* @param busbar_thickness: 巴片厚度
* @param clearance: 安全距离
* @param vertical_bend_cost: 立弯参数
* @param horizontal_bend_cost: 平弯参数
* @param twist_cost: 扭转参数
* @param total_cost: 输出总成本
* @param segment_count: 输出段数量
* @param segment_types: 输出段类型数组
* @param start_pos_x, start_pos_y, start_pos_z: 输出各段起点坐标数组
* @param start_normal_x, start_normal_y, start_normal_z: 输出各段起点法向量数组
* @param end_pos_x, end_pos_y, end_pos_z: 输出各段终点坐标数组
* @param end_normal_x, end_normal_y, end_normal_z: 输出各段终点法向量数组
*
* @return true表示规划成功,false表示失败
*/
BUSBAR_API bool planBusbarPath(
// 输入参数
int start_x, int start_y, int start_z,
int end_x, int end_y, int end_z,
float dir_x, float dir_y, float dir_z,
int xsize, int ysize, int zsize,
const bool* obstacles,
const bool* available_types,
float busbar_width,
float busbar_thickness,
float clearance,
float vertical_bend_v,
float flat_bend_f,
float twist_t,
// 输出参数
float* total_cost,
int* segment_count,
int* segment_types,
int* start_pos_x,
int* start_pos_y,
int* start_pos_z,
float* start_normal_x,
float* start_normal_y,
float* start_normal_z,
int* end_pos_x,
int* end_pos_y,
int* end_pos_z,
float* end_normal_x,
float* end_normal_y,
float* end_normal_z
);
}
#endif // BUSBAR_PLANNER_API_H