FPS Summary [2004/5-2004/7]

作者在FPS项目开发中遇到诸多问题,如原设想接口无法满足需求,破坏接口纯洁性;用Java Bean作BO使Process类难管理,易出现同名不同功能函数。解决方案包括前期用UML详细规划系统、隔离持久层和显示层的BO对象、先定义接口函数再编码。

FPS项目可以说是我开始的一个全新的尝试,用MVC三层架构开发,后端BO层的设计,一切听起来都是那么美好。可是一旦正真的进入项目才发现初期的想法太简单,考虑到的问题太少,开始进入挣扎期。

 

Question List:

 

1.    原来设想的接口不能完全的cover 现有的需求,就要想变通的办法去实现这个接口,其实恰恰破坏了接口的纯洁性,反而给将来的维护设置了一道障碍,不清晰,难追踪。

2.    FPS中将一个简单的Java Bean作为BO,一个数据的载体,后台的Process类中给BO赋值,然后传递到前台交给Tag显示。初期设想这样似乎不错。但当Coding的代码越来越多的时候才会发现Process类很难管理了,里面都是一个个静态的处理函数,遇到公用的BO Process类的时候,要先去看自己想要的Function是不是存在了,没有再自己添加。这样也难以避免出现相同功能不同名字的Function

 

 

Solution:

 

1.    項目初期的整體規劃顯得更加重要了,現在應該突破現在的一些開發模式,真正的用UML在前期對系統有詳細的描述,而不是想想可以實現,一旦發現問題就會打亂Schedual

2.    在一個操作的整個過程都使用BO來傳輸使系統的耦合性太強,靈活性不高,應思考將持久層和顯示層的BO對象隔離開,而其之間可以用BeanUtil的工具來完成數據的交換。

3.    在做XML數據導入的時候才發現,原來接口函數定義的重要性,想起原來有的項目,先將所有接口函數都先定義好,然後再Coding,這樣不失一個值的考量的辦法

# Ultralytics YOLO 🚀, AGPL-3.0 license # YOLO11 object detection model with P3-P5 outputs. For Usage examples see https://docs.ultralytics.com/tasks/detect # Parameters nc: 80 # number of classes scales: # model compound scaling constants, i.e. 'model=yolo11n.yaml' will call yolo11.yaml with scale 'n' # [depth, width, max_channels] n: [0.50, 0.25, 1024] # summary: 319 layers, 2624080 parameters, 2624064 gradients, 6.6 GFLOPs s: [0.50, 0.50, 1024] # summary: 319 layers, 9458752 parameters, 9458736 gradients, 21.7 GFLOPs m: [0.50, 1.00, 512] # summary: 409 layers, 20114688 parameters, 20114672 gradients, 68.5 GFLOPs l: [1.00, 1.00, 512] # summary: 631 layers, 25372160 parameters, 25372144 gradients, 87.6 GFLOPs x: [1.00, 1.50, 512] # summary: 631 layers, 56966176 parameters, 56966160 gradients, 196.0 GFLOPs # YOLO11n backbone backbone: # [from, repeats, module, args] - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 - [-1, 2, C3k2, [256, False, 0.25]] - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 - [-1, 2, C3k2, [512, False, 0.25]] - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 - [-1, 2, C3k2, [512, True]] - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 - [-1, 2, C3k2, [1024, True]] - [-1, 1, SPPF, [1024, 5]] # 9 - [-1, 2, C2PSA, [1024]] # 10 # YOLO11n head head: - [-1, 1, nn.Upsample, [None, 2, "nearest"]] - [[-1, 6], 1, Concat, [1]] # cat backbone P4 - [-1, 2, C3k2, [512, False]] # 13 - [-1, 1, nn.Upsample, [None, 2, "nearest"]] - [[-1, 4], 1, Concat, [1]] # cat backbone P3 - [-1, 2, C3k2, [256, False]] # 16 (P3/8-small) - [-1, 1, Conv, [256, 3, 2]] - [[-1, 13], 1, Concat, [1]] # cat head P4 - [-1, 2, C3k2, [512, False]] # 19 (P4/16-medium) - [-1, 1, Conv, [512, 3, 2]] - [[-1, 10], 1, Concat, [1]] # cat head P5 - [-1, 2, C3k2, [1024, True]] # 22 (P5/32-large) - [[16, 19, 22], 1, Detect, [nc]] # Detect(P3, P4, P5) 怎么在学习的时候精准引用yolo11n模型
11-01
dhm@dhm-MS-7E44:~/桌面/orb/ORB_SLAM3_ROS$ ./run_rgbd_mapping.sh ... logging to /home/dhm/.ros/log/da59dce8-57f3-11f0-93e5-b1f00ada9779/roslaunch-dhm-MS-7E44-143726.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. started roslaunch server http://dhm-MS-7E44:42625/ SUMMARY ======== PARAMETERS * /rosdistro: noetic * /rosversion: 1.17.4 NODES / orb_slam3 (orb_slam3/ros_rgbd_mapping) rviz (rviz/rviz) ROS_MASTER_URI=http://localhost:11311 process[rviz-1]: started with pid [143740] process[orb_slam3-2]: started with pid [143741] ORB-SLAM3 Copyright (C) 2017-2020 Carlos Campos, Richard Elvira, Juan J. Gómez, José M.M. Montiel and Juan D. Tardós, University of Zaragoza. ORB-SLAM2 Copyright (C) 2014-2016 Raúl Mur-Artal, José M.M. Montiel and Juan D. Tardós, University of Zaragoza. This program comes with ABSOLUTELY NO WARRANTY; This is free software, and you are welcome to redistribute it under certain conditions. See LICENSE.txt. Input sensor was set to: RGB-D Loading settings from /home/dhm/桌面/orb/ORB_SLAM3_ROS/Examples/RGB-D/TUM3.yaml Camera1.k3 optional parameter does not exist... -Loaded camera 1 Camera.newHeight optional parameter does not exist... Camera.newWidth optional parameter does not exist... -Loaded image info -Loaded RGB-D calibration -Loaded ORB settings Viewer.imageViewScale optional parameter does not exist... -Loaded viewer settings System.LoadAtlasFromFile optional parameter does not exist... System.SaveAtlasToFile optional parameter does not exist... -Loaded Atlas settings System.thFarPoints optional parameter does not exist... -Loaded misc parameters ---------------------------------- SLAM settings: -Camera 1 parameters (Pinhole): [ 535.4 539.2 320.1 247.6 ] -Camera 1 distortion parameters: [ 0 0 0 0 ] -Original image size: [ 640 , 480 ] -Current image size: [ 640 , 480 ] -Sequence FPS: 30 -RGB-D depth map factor: 5000 -Features per image: 1000 -ORB scale factor: 1.2 -ORB number of scales: 8 -Initial FAST threshold: 20 -Min FAST threshold: 7 Loading ORB Vocabulary. This could take a while... Vocabulary loaded! Initialization of Atlas from scratch Creation of new map with id: 0 Creation of new map with last KF id: 0 Seq. Name: There are 1 cameras in the atlas Camera 0 is pinhole [orb_slam3-2] process has died [pid 143741, exit code -11, cmd /home/dhm/桌面/orb/ORB_SLAM3_ROS/Examples/ROS/ros_rgbd_mapping /home/dhm/桌面/orb/ORB_SLAM3_ROS/Examples/RGB-D/TUM3.yaml /home/dhm/桌面/orb/ORB_SLAM3_ROS/Vocabulary/ORBvoc.txt /home/dhm/桌面/orb/ORB_SLAM3_ROS/dataset/rgbd_dataset_freiburg1_desk __name:=orb_slam3 __log:=/home/dhm/.ros/log/da59dce8-57f3-11f0-93e5-b1f00ada9779/orb_slam3-2.log]. log file: /home/dhm/.ros/log/da59dce8-57f3-11f0-93e5-b1f00ada9779/orb_slam3-2*.log
07-04
... logging to /home/orangepi/.ros/log/ad552cb6-9213-11f0-911c-9cb8b4f1c3ce/roslaunch-orangepi5pro-5378.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. started roslaunch server http://orangepi5pro:39017/ SUMMARY ======== PARAMETERS * /gimbal/differ_pitch: 0 * /gimbal/differ_yaw: 0 * /gimbal/i2c_address: 64 * /gimbal/i2c_bus: 1 * /gimbal/id_pitch: 1 * /gimbal/id_yaw: 0 * /gimbal/range_pitch: [-28, 28] * /gimbal/range_yaw: [-90, 90] * /rosdistro: noetic * /rosversion: 1.16.0 * /usb_cam/camera_info_path: file:///home/oran... * /usb_cam/camera_name: usb_cam * /usb_cam/exposure: 0 * /usb_cam/fps: 30 * /usb_cam/height: 480 * /usb_cam/kill_switch_topic: /task * /usb_cam/pixel_format: yuyv * /usb_cam/pub_rate: 30 * /usb_cam/video_port: 0 * /usb_cam/visualize: False * /usb_cam/width: 640 NODES / gimbal_control (gimbal/gimbal_control_node.py) gimbal_test (gimbal/gimbal_test_node.py) /usb_cam/ usb_cam (usb_cam/usb_cam) auto-starting new master process[master]: started with pid [5400] ROS_MASTER_URI=http://localhost:11311 setting /run_id to ad552cb6-9213-11f0-911c-9cb8b4f1c3ce process[rosout-1]: started with pid [5418] started core service [/rosout] process[usb_cam/usb_cam-2]: started with pid [5425] process[gimbal_control-3]: started with pid [5427] RLException: Roslaunch got a 'No such file or directory' error while attempting to run: /home/orangepi/catkin_ws/src/actuator/gimbal/scripts/gimbal_test_node.py __name:=gimbal_test __log:=/home/orangepi/.ros/log/ad552cb6-9213-11f0-911c-9cb8b4f1c3ce/gimbal_test-4.log Please make sure that all the executables in this command exist and have executable permission. This is often caused by a bad launch-prefix. The traceback for the exception was written to the log file [gimbal_test-4] killing on exit [gimbal_control-3] killing on exit Traceback (most recent call last): File "/home/orangepi/catkin_ws/src/actuator/gimbal/scripts/gimbal_control_node.py", line 6, in <module> import numpy as np File "/usr/lib/python3/dist-packages/numpy/__init__.py", line 142, in <module> from . import core File "/usr/lib/python3/dist-packages/numpy/core/__init__.py", line 17, in <module> from . import multiarray File "/usr/lib/python3/dist-packages/numpy/core/multiarray.py", line 78, in <module> def empty_like(prototype, dtype=None, order=None, subok=None, shape=None): File "/usr/lib/python3/dist-packages/numpy/core/overrides.py", line 201, in decorator return array_function_dispatch( File "/usr/lib/python3/dist-packages/numpy/core/overrides.py", line 174, in decorator source_object = compile( KeyboardInterrupt [usb_cam/usb_cam-2] killing on exit [rosout-1] killing on exit [master] killing on exit 这是什么问题
09-16
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值