规范模块目录和第三方依赖结构
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// BaseClass.cpp - 修复type_error::create错误
|
||||
#include "BaseClass.h"
|
||||
#include "QuadrupedRobotSimulation/BaseClass.h"
|
||||
|
||||
// 为nlohmann/json添加std::optional支持
|
||||
namespace nlohmann
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// CompleteJsonExporter.cpp
|
||||
#include "CompleteJsonExporter.h"
|
||||
#include "BaseClass.h"
|
||||
#include "KinematicsSimulation.h"
|
||||
#include "QuadrupedRobotSimulation/CompleteJsonExporter.h"
|
||||
#include "QuadrupedRobotSimulation/BaseClass.h"
|
||||
#include "QuadrupedRobotSimulation/KinematicsSimulation.h"
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <functional>
|
||||
@@ -711,4 +711,4 @@ std::string CompleteJsonExporter::DoubleToString(double value, int precision)
|
||||
std::ostringstream oss;
|
||||
oss << std::fixed << std::setprecision(precision) << value;
|
||||
return oss.str();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// KinematicsHelper.cpp
|
||||
#include "KinematicsHelper.h"
|
||||
#include "RobotConfig.hpp"
|
||||
#include "QuadrupedRobotSimulation/KinematicsHelper.h"
|
||||
#include "QuadrupedRobotSimulation/RobotConfig.hpp"
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
@@ -317,4 +317,4 @@ RobotGaitRequest KinematicsHelper::LoadAndValidateJson(const std::string &jsonIn
|
||||
std::cerr << "Error parsing JSON: " << e.what() << std::endl;
|
||||
return CreateDefaultRequest();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// KinematicsReverse.cpp
|
||||
#include "KinematicsReverse.h"
|
||||
#include "graph_utils.hpp"
|
||||
#include "RobotConfig.hpp"
|
||||
#include "QuadrupedRobotSimulation/KinematicsReverse.h"
|
||||
#include "QuadrupedRobotSimulation/graph_utils.hpp"
|
||||
#include "QuadrupedRobotSimulation/RobotConfig.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
@@ -1285,4 +1285,4 @@ void ReverseKinematicsCalculator::debugPrintFinalJson(const std::vector<C_ObjSta
|
||||
std::cout << " 四元数: [" << obj.qx << ", " << obj.qy << ", "
|
||||
<< obj.qz << ", " << obj.qw << "]\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// KinematicsSimulation.cpp
|
||||
#include "CompleteJsonExporter.h"
|
||||
#include "KinematicsSimulation.h"
|
||||
#include "QuadrupedRobotSimulation/CompleteJsonExporter.h"
|
||||
#include "QuadrupedRobotSimulation/KinematicsSimulation.h"
|
||||
#include <functional>
|
||||
#include <numeric>
|
||||
#include <iomanip>
|
||||
@@ -1356,4 +1356,4 @@ std::vector<double> QuadrupedRobotSimulation::ShiftArray(const std::vector<doubl
|
||||
result[(i + shiftFrames) % array.size()] = array[i];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "RobotConfig.hpp"
|
||||
#include "QuadrupedRobotSimulation/RobotConfig.hpp"
|
||||
// 统一的更新函数:手动从JSON更新现有对象
|
||||
RequestParameters &RequestParameters::updateFromJson(const nlohmann::json &j, RequestParameters &req_param)
|
||||
{
|
||||
@@ -843,4 +843,4 @@ bool RequestParameters::saveToFile(const std::string &filename) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// SharedGeometry.cpp
|
||||
#include "SharedGeometry.h"
|
||||
#include "SharedGeometry/SharedGeometry.h"
|
||||
#include <stdexcept>
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
@@ -208,4 +208,4 @@ C_ObjStates PoseCalculator::CalculatePoseAndQuaternion_C_ObjStates(const std::st
|
||||
c_ObjStates.qw = ToString(qw);
|
||||
|
||||
return c_ObjStates;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user