Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修改概述: 引入
argparse库,使系统支持通过命令行参数动态配置连接信息和运行模式。修改的详细描述
参数解析集成 (
main.py):parse_arguments()函数。--host和--port: 允许在不修改代码的情况下连接远程 CARLA 服务器。--no-render: 新增 "Headless Mode"(无头模式),允许在没有显示器的服务器上运行检测算法,仅记录日志而不弹出 OpenCV 窗口。客户端增强 (
utils/carla_client.py):__init__方法,使其接受可变参数host和port,提高了类的通用性。经过了什么样的测试?
python main.py-> 正常弹出窗口。python main.py --no-render。运行效果