// wheelchair_types.hpp
#ifndef WHEELCHAIR_TYPES_HPP
#define WHEELCHAIR_TYPES_HPP

#include <vector>
#include <string>
#include <Eigen/Dense>

// 轮椅状态枚举
enum class WheelchairState
{
    READY,     // 就绪中
    WALKING,   // 行走中
    ROTATING,  // 旋转中
    SEARCHING, // 搜索中
    CHARGING   // 充电中
};

// 充电状态枚举
enum class ChargingState
{
    IDLE,
    NAVIGATING,
    CHARGING,
    UNAVAILABLE,
    COMPLETED
};

// 电池状态枚举
enum class BatteryState
{
    NORMAL,   // 正常
    LOW,      // 低电量
    CRITICAL, // 严重低电量
    CHARGING, // 充电中
    FULL      // 充满
};

// ==================== 数据结构 ====================
struct IndexPoint
{
    double x;
    double y;
    int index;

    IndexPoint(double x = 0.0, double y = 0.0, int index = 0)
        : x(x), y(y), index(index) {}
};

struct StraightLine
{
    double k;
    double b;

    StraightLine(double k = 0.0, double b = 0.0) : k(k), b(b) {}
};

struct ScanFilterParam
{
    int min_index = 292;
    int max_index = 382;
    double min_intensities = 120.0;
    double max_intensities = 220.0;
    double min_distance = 0.28;
    double max_distance = 3.5;
    int min_count = 4;
    double dock_length = 0.42;
    int baselink_back_index = 337;
};

struct RechargeResult
{
    int frameid;
    std::vector<IndexPoint> points;
    std::vector<IndexPoint> left_points;
    std::vector<IndexPoint> right_points;
    IndexPoint middle_point;
    StraightLine middle_line;
    StraightLine left_line;
    StraightLine right_line;
};

#endif // WHEELCHAIR_TYPES_HPP