♻️ refactor(compat): 替换 MoveJoint 时间律为解析式 7 阶平滑函数并添加离散限位校验
* 将预捕获 alpha 数据表替换为解析式 7 阶平滑点到点时间律 s(u)=35u⁴-84u⁵+70u⁶-20u⁷,形状系数按 1~3 阶导数最大值重算 * 新增离散限位校验:按真实 8ms 采样点反算速度/加速度/jerk, 不满足时自动拉长总时长后重采样,最多迭代 10000 次 * 实发轨迹落盘:ActualSendJointTraj.txt(角度制)、 ActualSendJerkStats.txt(点间跃度统计),按时间目录归档 * J519 AcceptsCommand 门控:只有机器人就绪时才发送下一帧, 减少无效下发;状态日志附带最近发送目标关节轴 * FanucControllerRuntime 构造函数改为必选 ILogger 注入, 确保 DI 解析时稳定拿到日志实例 * LegacyHttpApiController 移除已废弃的 ConnectServer 调用, EnableRobot 参数从 2 改为 4 * 新增跃度报警分析文档和六轴限值表,补充反馈远离拒绝测试 Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using Flyshot.Runtime.Common;
|
||||
using Flyshot.Runtime.Fanuc;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Flyshot.Core.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// 验证 FANUC 运行时通过依赖注入解析时,能够稳定拿到日志依赖。
|
||||
/// </summary>
|
||||
public sealed class FanucControllerRuntimeLoggingRegistrationTests
|
||||
{
|
||||
/// <summary>
|
||||
/// 验证宿主按 IControllerRuntime 解析 FANUC 运行时时,不会因为可选日志参数而退回到无日志实例。
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ServiceProvider_Resolves_FanucControllerRuntime_WithLogger()
|
||||
{
|
||||
var services = new ServiceCollection();
|
||||
services.AddLogging();
|
||||
services.AddSingleton<IControllerRuntime, FanucControllerRuntime>();
|
||||
|
||||
using var serviceProvider = services.BuildServiceProvider();
|
||||
|
||||
var runtime = serviceProvider.GetRequiredService<IControllerRuntime>();
|
||||
var concreteRuntime = Assert.IsType<FanucControllerRuntime>(runtime);
|
||||
var loggerField = typeof(FanucControllerRuntime).GetField("_logger", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
|
||||
Assert.NotNull(loggerField);
|
||||
Assert.NotNull(loggerField!.GetValue(concreteRuntime));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user