27 lines
546 B
C
27 lines
546 B
C
|
|
//
|
||
|
|
// Created by Administrator on 2026/4/28.
|
||
|
|
//
|
||
|
|
|
||
|
|
#ifndef SERVO_CONFIG_H
|
||
|
|
#define SERVO_CONFIG_H
|
||
|
|
|
||
|
|
#include <string>
|
||
|
|
#include <vector>
|
||
|
|
|
||
|
|
#include "servo_manager/include/servo_control.h"
|
||
|
|
#include "servo_manager/include/servo_driver.h"
|
||
|
|
|
||
|
|
struct ServoConfig
|
||
|
|
{
|
||
|
|
std::string id;
|
||
|
|
float limit_min_angle_rad;
|
||
|
|
float limit_max_angle_rad;
|
||
|
|
float home_angle_rad;
|
||
|
|
ServoDriver::Config driver;
|
||
|
|
ServoControl::Config control;
|
||
|
|
};
|
||
|
|
|
||
|
|
std::vector<ServoConfig> loadServoConfigsFromJsonFile(const std::string& json_file_path);
|
||
|
|
|
||
|
|
#endif // SERVO_CONFIG_H
|