diff --git a/BenzObstacleDetect/BenzObstacleDetect.csproj b/BenzObstacleDetect/BenzObstacleDetect.csproj index 1745c4a..18ad269 100644 --- a/BenzObstacleDetect/BenzObstacleDetect.csproj +++ b/BenzObstacleDetect/BenzObstacleDetect.csproj @@ -20,7 +20,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/BenzObstacleDetect/Detection.cs b/BenzObstacleDetect/Detection.cs index f6da589..efd23ab 100644 --- a/BenzObstacleDetect/Detection.cs +++ b/BenzObstacleDetect/Detection.cs @@ -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 _lidarRender; - private DataRender _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("Benz","lidar",false,true); - _obstacleRender = DataRenderFactory.Make("Benz","obstacle",false,true); + // 连接到绘图 + // var lidarRender = DataRenderFactory.Make("Benz","lidar",false,true); + // var obstacleRender = DataRenderFactory.Make("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); } } } \ No newline at end of file diff --git a/Release/BenzObstacleDetect.deps.json b/Release/BenzObstacleDetect.deps.json index de5f75d..be0f7e8 100644 --- a/Release/BenzObstacleDetect.deps.json +++ b/Release/BenzObstacleDetect.deps.json @@ -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", diff --git a/Release/BenzObstacleDetect.exe b/Release/BenzObstacleDetect.exe index d7d2da1..362439e 100644 Binary files a/Release/BenzObstacleDetect.exe and b/Release/BenzObstacleDetect.exe differ diff --git a/Release/BenzObstacleDetect.pdb b/Release/BenzObstacleDetect.pdb index 07dea61..9f280bc 100644 Binary files a/Release/BenzObstacleDetect.pdb and b/Release/BenzObstacleDetect.pdb differ diff --git a/Release/componentlibrary.dll b/Release/componentlibrary.dll index fe2a551..b9353d8 100755 Binary files a/Release/componentlibrary.dll and b/Release/componentlibrary.dll differ