(进阶)004 - AWS DeepRacer重要资料合集

这篇具有很好参考价值的文章主要介绍了(进阶)004 - AWS DeepRacer重要资料合集。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

Deppracer 进阶必看的资料合集

1. reward_function 入口参数说明

https://docs.aws.amazon.com/deepracer/latest/developerguide/deepracer-reward-function-input.html
{
    "all_wheels_on_track": Boolean,        # flag to indicate if the agent is on the track
    "x": float,                            # agent's x-coordinate in meters
    "y": float,                            # agent's y-coordinate in meters
    "closest_objects": [int, int],         # zero-based indices of the two closest objects to the agent's current position of (x, y).
    "closest_waypoints": [int, int],       # indices of the two nearest waypoints.
    "distance_from_center": float,         # distance in meters from the track center 
    "is_crashed": Boolean,                 # Boolean flag to indicate whether the agent has crashed.
    "is_left_of_center": Boolean,          # Flag to indicate if the agent is on the left side to the track center or not. 
    "is_offtrack": Boolean,                # Boolean flag to indicate whether the agent has gone off track.
    "is_reversed": Boolean,                # flag to indicate if the agent is driving clockwise (True) or counter clockwise (False).
    "heading": float,                      # agent's yaw in degrees
    "objects_distance": [float, ],         # list of the objects' distances in meters between 0 and track_length in relation to the starting line.
    "objects_heading": [float, ],          # list of the objects' headings in degrees between -180 and 180.
    "objects_left_of_center": [Boolean, ], # list of Boolean flags indicating whether elements' objects are left of the center (True) or not (False).
    "objects_location": [(float, float),], # list of object locations [(x,y), ...].
    "objects_speed": [float, ],            # list of the objects' speeds in meters per second.
    "progress": float,                     # percentage of track completed
    "speed": float,                        # agent's speed in meters per second (m/s)
    "steering_angle": float,               # agent's steering angle in degrees
    "steps": int,                          # number steps completed
    "track_length": float,                 # track length in meters.
    "track_width": float,                  # width of the track
    "waypoints": [(float, float), ]        # list of (x,y) as milestones along the track center

}

重要参数有:

  1. all_wheels_on_track
  2. x,y
  3. distance_from_center
  4. heading
  5. progress
  6. speed
  7. steps
  8. track_width
  9. waypoints

2. 常见 reward_function 实例

1. 走中线

def reward_function(params):
    # Read input parameters
    track_width = params['track_width']
    distance_from_center = params['distance_from_center']

    # Calculate 3 markers that are increasingly further away from the center line
    marker_1 = 0.1 * track_width
    marker_2 = 0.25 * track_width
    marker_3 = 0.5 * track_width

    # Give higher reward if the car is closer to center line and vice versa
    if distance_from_center <= marker_1:
        reward = 1
    elif distance_from_center <= marker_2:
        reward = 0.5
    elif distance_from_center <= marker_3:
        reward = 0.1
    else:
        reward = 1e-3  # likely crashed/ close to off track

    return reward

2. 保持在界内

def reward_function(params):
    # Read input parameters
    all_wheels_on_track = params['all_wheels_on_track']
    distance_from_center = params['distance_from_center']
    track_width = params['track_width']
    
    # Give a very low reward by default
    reward = 1e-3

    # Give a high reward if no wheels go off the track and 
    # the car is somewhere in between the track borders 
    if all_wheels_on_track and (0.5*track_width - distance_from_center) >= 0.05:
        reward = 1.0

    # Always return a float value
    return reward

3. 防止蛇形


def reward_function(params):
    # Read input parameters
    all_wheels_on_track = params['all_wheels_on_track']
    distance_from_center = params['distance_from_center']
    track_width = params['track_width']
    
    # Give a very low reward by default
    reward = 1e-3

    # Give a high reward if no wheels go off the track and 
    # the car is somewhere in between the track borders 
    if all_wheels_on_track and (0.5*track_width - distance_from_center) >= 0.05:
        reward = 1.0
    # Always return a float value
    return reward

3. log 分析

link: lulu2002

aws deepracer capstone,AWS Deepracer,Python3,aws,云计算
使用方法:

  1. 下载你的log(Training log 或者 Evaluation log)
  2. 点击按钮上传模型
  3. 在表格点击你要分析的episod
  4. 右边图像中可以看到本次的小车路径以及速度分布
  5. 其他一些信息也可以通过面板找到

3. 通过AWS deepracer 社区获取赛道 waypoint

link: aws-deepracer-community

aws deepracer capstone,AWS Deepracer,Python3,aws,云计算
在这里你可以得到所有赛道的waypoint 数据,以及赛道总长度和赛道宽度,以及发布时间,
这里的2022_may_pro.npy 里面 存放了该赛道 waypoint 值。

4. 获取AWS deepracer 社区信息

link: Deeprace社区
aws deepracer capstone,AWS Deepracer,Python3,aws,云计算
在Deepracer 社区你可以获取 你需要的信息,其中 deepracer-for-cloud 是一个可以部署到云上或本地的一个库,因为在AWS上直接training是需要花钱的 3.55$ / h,也就是近 24¥/ h ,平民玩家伤不起,如果你对这个有兴趣可以在本地部署一个,不过这个对电脑要求也挺高的,我的电脑 16G内存,3G GPU,勉强能带动,只能通过较小的batch size来训练,否则CPU/GPU 使用过高容易被系统kill掉。

CPU 基本上80% 以上
aws deepracer capstone,AWS Deepracer,Python3,aws,云计算
GPU 基本 95% 以上
aws deepracer capstone,AWS Deepracer,Python3,aws,云计算
时不时就挂了,内存溢出

aws deepracer capstone,AWS Deepracer,Python3,aws,云计算
建议32G 内存 + 8G GPU

5. 计算最佳路线

link: cdthompson/deepracer-k1999-race-lines

最佳线路的原理是: 将中间点的曲率用相邻两点来代替,使得曲线更加光滑平整,后面的博客中将提取他的核心代码进行计算。
aws deepracer capstone,AWS Deepracer,Python3,aws,云计算

6. Capstone

link: Capstone

  1. 计算动作空间以及数据分析和可视化
  2. 计算最佳速度以及速度分布和可视化 RaceLine_Speed_ActionSpace
  3. 计算最佳路线, 这里借鉴了K1999的算法 Race-Line-Calculation
  4. 使用selenium 实现自动提交和自动提交训练 Selenium_DeepRacer

7. 参考

  1. https://github.com/cdthompson/deepracer-k1999-race-lines
  2. https://github.com/aws-deepracer-community/deepracer-analysis
  3. https://github.com/aws-deepracer-community/deepracer-simapp/tree/master/bundle/deepracer_simulation_environment/share/deepracer_simulation_environment/routes

以上内容我将会在后面的博客通过自己的理解一一讲解用法,和使用技巧。

>>> 如果你觉得我的文章对你有用,不妨 【点赞】 加 【关注】,你的支持是我持续写作的动力,thank you! <<<文章来源地址https://www.toymoban.com/news/detail-785365.html

到了这里,关于(进阶)004 - AWS DeepRacer重要资料合集的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • AWS 中文入门开发教学 39- AWS CLI - AWS认证 必须会的命令行工具

    AWS Command Line Interface (AWS CLI) 是一种开源工具, 让您 能够在命令行 Shell 中使用命令与 AWS 服务进行交互 。 仅需最少的配置,即可使用 AWS CLI 开始运行命令,以便从终端 程序中的命令提示符实现与基于浏览器的 AWS 管理控制台所提供的 功能等同的功能。 https://aws.amazon.com/cn/

    2024年02月17日
    浏览(44)
  • centos安装aws,aws: 未找到命令...

    #yum install -y python3-pip 查看是否安装成功 #pip3 -V ① # pip3 install awscli --upgrade --user 如果 报错“Retrying (Retry(total=4 *”**,请往下翻 查看是否安装成功 #aws --version ② 配置aws cli #aws configure AWS Access Key ID 和 Secret Access Key 是敏感信息 我已经配置过了,显示如下: 3.测试 #aws s3 sync s3

    2024年01月25日
    浏览(27)
  • 【AWS系列】第四讲:什么是 AWS Serverless

    目录 序言:  1 概念介绍 AWS Serverless  2 组成介绍 2.1 计算 2.1.1  AWS Lambda 2.1.2 AWS Fargate 2.2 应用程序集成 2.2.1  Amazon EventBridge  2.2.2 AWS Step Functions 2.2.3 Amazon Simple Queue Service 2.3.4 Amazon API Gateway 2.3 数据存储 2.3.1 Amazon S3  2.3.2 Amazon DynamoDB 最近需要学习使用到AWS一些内容,整

    2023年04月09日
    浏览(27)
  • aws认证,aws有哪些认证,有什么用

    亚马逊云服务是全球市场份额最大的云计算厂商,由光环新网和西云数据运营,可以在中国监管环境下运营公有云。从全球数据中心提供超过 200 项功能齐全的服务。数百万客户(包括增长最快速的初创公司、最大型企业和主要的政府机构)都在使用 AWS 来降低成本、提高敏捷性

    2024年02月02日
    浏览(34)
  • AWS SSM中切换AWS不同的profile

    在自己的开发笔记本上面,通过AWS SSM方式访问EC2服务,只需要通过简单的命令就可以访问EC2了,如下: 这个命令就是利用aws命令行工具中ssm提供的会话管理能力访问ec2服务,这个会话管理的能力,相当于跳板机了。 我如果只有一个aws开发账号还好,如果我有多个aws开发账号

    2024年02月03日
    浏览(17)
  • 【AWS系列】第八讲:AWS Serverless之S3

    目录 序言 1.基础介绍 1.1 概念介绍 1.2 原理介绍 1.3 应用场景 1.3.1 构建数据湖 1.3.2 备份和还原关键数据 1.3.3 以最低成本存档数据 1.3.4 运行云原生应用程序 1.4 S3 的功能 1.4.1 存储类 1.4.2 存储管理 1.4.3 访问管理 2 使用方法 2.1 创建存储桶 ​2.2 配置 CORS 规则 3 投票 三言两

    2024年02月03日
    浏览(30)
  • 使用AWS迁移工具MGN迁移腾讯云到AWS

    环境准备: OS: Centos 7.9 x64 源端和目标端安全组都需要开通TCP 443、1500端口 1、创建设置模板 2、安装Agent(源服务器) 下载地址: https://aws-application-migration-service-region.s3.region.amazonaws.com/latest/linux/aws-replication-installer-init.py 替换region为您要复制到的 AWS 区域。 下载py文件 wget h

    2024年02月09日
    浏览(45)
  • 【aws】| 04 | AWS EC2 实例磁盘空间扩容

    进入控制台,选择 EBS - Volumes -Action - Modify Volume 首先使用lsblk可以查看附加到实例上的所有存储卷的真实size以及分区情况 注: 挂载在根目录上的是EBS存储卷上的分区而不是这个卷,而且卷被扩容但是分区大小不变依旧不能扩容。 xvda是一个存储卷,xvda1是存储卷上的一个分区

    2024年02月11日
    浏览(50)
  • AWS 架构(AWS Academy Cloud Architecting)知识测验

    1、AWS架构完善的框架的五个支柱? 答: 卓越运营、安全性、可靠性、性能效率和成本优化。 2、符合AWS架构完善的框架的卓越运营支柱: 答: 在一个连续的周期内审查和改进流程和程序;将软件设计原则和方法论作为代码应用于基础设施。 3、一个应用程序需要一个由多台

    2024年02月06日
    浏览(28)
  • 【AWS】安装配置适用于 Eclipse 的 AWS 工具包

    目录 0.环境  1.步骤 1)安装Eclipse 2)安装AWS工具包 ① 在这个路径下点开安装软件的界面 ② 点击【Add】打开添加窗口  ③ 输入aws的工具包地址  ④ 勾选需要的工具,点击【Next】  ⑤ 将要安装的工具,点击【Next】  ⑥ 选择接受条款,点击【Finish】 windows 11,64位 eclipse配置

    2024年02月12日
    浏览(25)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包