feat: update Autolabor.Robobase.Component to version 0.2.1833 and clean up unused code

main
邱棚 2025-03-17 21:04:31 +08:00
parent f2351a2bb5
commit ef92c7cc1b
6 changed files with 18 additions and 25 deletions

View File

@ -20,7 +20,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Autolabor.Robobase.Component" Version="0.2.1827" />
<PackageReference Include="Autolabor.Robobase.Component" Version="0.2.1833" />
<PackageReference Include="Autolabor.SerialBase" Version="0.1.239" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.2" />
<PackageReference Include="System.Security.Permissions" Version="9.0.2" />

View File

@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using Autolabor.Benz.ObstacleDetection.DataType;
@ -9,9 +8,6 @@ using Autolabor.Robobase.Component.Algorithm.LidarDetection.DataType;
using Autolabor.Robobase.Component.Business.Benz;
using Autolabor.Robobase.Component.Driver;
using Autolabor.Robobase.Component.Driver.SerialRelay;
using Autolabor.Robobase.Component.Tools;
using Autolabor.Robobase.Geometry;
using Autolabor.Robobase.Tools.DataRender;
namespace Autolabor.Benz.ObstacleDetection
{
@ -27,10 +23,6 @@ namespace Autolabor.Benz.ObstacleDetection
private ObstacleDetector _obstacleDetector;
private BenzObstacleControl _benzObstacleController;
// 显示组件
private DataRender<Pose2D[]> _lidarRender;
private DataRender<Pose2D[]> _obstacleRender;
// 模拟器配置
private int _FrontLidarRpcPort = 50120;
private int _FrontLidarListenPort = 40120;
@ -55,9 +47,13 @@ namespace Autolabor.Benz.ObstacleDetection
_benzObstacleController = new BenzObstacleControl();
_lidarRoiFilter = new LidarRoiFilter();
// 显示组件
_lidarRender = DataRenderFactory.Make<Pose2D[]>("Benz","lidar",false,true);
_obstacleRender = DataRenderFactory.Make<Pose2D[]>("Benz","obstacle",false,true);
// 连接到绘图
// var lidarRender = DataRenderFactory.Make<Pose2D[]>("Benz","lidar",false,true);
// var obstacleRender = DataRenderFactory.Make<Pose2D[]>("Benz","obstacle",false,true);
// Add(lidarRender);
// Add(obstacleRender);
// _lidarDriver.OutputLocalLidarPose2D.Connect(lidarRender.Input);
// _obstacleDetector.OutputObstaclePoses.Connect(obstacleRender.Input);
// 3. 添加组件到容器
Add(_lidarDriver);
@ -65,9 +61,7 @@ namespace Autolabor.Benz.ObstacleDetection
Add(_lidarRoiFilter);
Add(_obstacleDetector);
Add(_benzObstacleController);
Add(_lidarRender);
Add(_obstacleRender);
// 4. 配置组件
// 激光雷达配置
_lidarDriver.SetProperty("lidar.port", "/dev/autolabor_ld19");
@ -102,17 +96,16 @@ namespace Autolabor.Benz.ObstacleDetection
_lidarDriver.OutputLocalLidarPose2D.Connect(_lidarRoiFilter.InputLidarPoints);
_lidarRoiFilter.OutputFilteredPoints.Connect(_obstacleDetector.InputLidarPoints);
// 雷达诊断信号连接到奔驰障碍物控制器
_lidarDriver.OutputLidarDiagnostic.Connect(_benzObstacleController.InputDiagnostics);
_lidarDriver.OutputLidarDiagnostic.Connect(_benzObstacleController.InputLidarDiagnostics);
// 避障检测结果流向奔驰避障控制器
_obstacleDetector.OutputObstacles.Connect(_benzObstacleController.InputObstacles);
// 奔驰避障控制器输出到继电器
_benzObstacleController.OutputRelayControl.Connect(_serialRelay.InputRelayControl);
_benzObstacleController.OutputRelayQuery.Connect(_serialRelay.InputRelayQuery);
_serialRelay.OutputRelayFeedback.Connect(_benzObstacleController.InputRelayStatus);
_serialRelay.OutputSerialConnect.Connect(_benzObstacleController.InputSerialConnect);
// 连接到绘图
_lidarDriver.OutputLocalLidarPose2D.Connect(_lidarRender.Input);
_obstacleDetector.OutputObstaclePoses.Connect(_obstacleRender.Input);
}
}
}

View File

@ -11,7 +11,7 @@
"dependencies": {
"Autolabor.Robobase": "0.3.631",
"Autolabor.Robobase.CodeGuard": "0.1.24",
"Autolabor.Robobase.Component": "0.2.1827",
"Autolabor.Robobase.Component": "0.2.1833",
"Autolabor.SerialBase": "0.1.239",
"Microsoft.Extensions.Hosting": "9.0.2",
"Microsoft.NETFramework.ReferenceAssemblies": "1.0.3",
@ -165,7 +165,7 @@
}
},
"Autolabor.Robobase.CodeGuard/0.1.24": {},
"Autolabor.Robobase.Component/0.2.1827": {
"Autolabor.Robobase.Component/0.2.1833": {
"dependencies": {
"Autolabor.Robobase": "0.3.631",
"NLog": "5.1.3",
@ -628,12 +628,12 @@
"path": "autolabor.robobase.codeguard/0.1.24",
"hashPath": "autolabor.robobase.codeguard.0.1.24.nupkg.sha512"
},
"Autolabor.Robobase.Component/0.2.1827": {
"Autolabor.Robobase.Component/0.2.1833": {
"type": "package",
"serviceable": true,
"sha512": "sha512-SkgsD2lQ45k/Aj7tWTFpH7VLoXfVLFDLWR3VkOK9EmPvULwb1tjj9RU1lpdr58E2ihFYHJKdL55yCwk2iXwvzw==",
"path": "autolabor.robobase.component/0.2.1827",
"hashPath": "autolabor.robobase.component.0.2.1827.nupkg.sha512"
"sha512": "sha512-y7LlbK0cQiOjUpW3Z1AWfOcoYuVkKHgMD5ex00WNF2xBOYHv6vL7idDlGc8rhnxf+YNq4Ewp6OnQyHR+03NLTA==",
"path": "autolabor.robobase.component/0.2.1833",
"hashPath": "autolabor.robobase.component.0.2.1833.nupkg.sha512"
},
"Autolabor.SerialBase/0.1.239": {
"type": "package",

Binary file not shown.

Binary file not shown.

Binary file not shown.