comma.ai实践2
来源:互联网 发布:正规矩阵奇异值 编辑:程序博客网 时间:2024/05/29 16:06
关于longcontrol的说明,acc的原理是根据前车的距离和速度计算本车的加速度,根据本车的速度和加速度通过一个三层深度学习网络算出油门和刹车量,详见如下函数:
def get_compute_gb():# see debug/dump_accel_from_fiber.py
w0 = np.array([[ 1.22056961, -0.39625418, 0.67952657],
[ 1.03691769, 0.78210306, -0.41343188]])
b0 = np.array([ 0.01536703, -0.14335321, -0.26932889])
w2 = np.array([[-0.59124422, 0.42899439, 0.38660881],
[ 0.79973811, 0.13178682, 0.08550351],
[-0.15651935, -0.44360259, 0.76910877]])
b2 = np.array([ 0.15624429, 0.02294923, -0.0341086 ])
w4 = np.array([[-0.31521443],
[-0.38626176],
[ 0.52667892]])
b4 = np.array([-0.02922216])
def compute_output(dat, w0, b0, w2, b2, w4, b4):
m0 = np.dot(dat, w0) + b0
m0 = leakyrelu(m0, 0.1)
m2 = np.dot(m0, w2) + b2
m2 = leakyrelu(m2, 0.1)
m4 = np.dot(m2, w4) + b4
return m4
def leakyrelu(x, alpha):
return np.maximum(x, alpha * x)
def _compute_gb(dat):
#linearly extrap below v1 using v1 and v2 data
v1 = 5.
v2 = 10.
vx = dat[1]
if vx > 5.:
m4 = compute_output(dat, w0, b0, w2, b2, w4, b4)
else:
dat[1] = v1
m4v1 = compute_output(dat, w0, b0, w2, b2, w4, b4)
dat[1] = v2
m4v2 = compute_output(dat, w0, b0, w2, b2, w4, b4)
m4 = (vx - v1) * (m4v2 - m4v1) / (v2 - v1) + m4v1
return m4
return _compute_gb
# takes in [desired_accel, current_speed] -> [-1.0, 1.0] where -1.0 is max brake and 1.0 is max gas
compute_gb = get_compute_gb()
而且我遇到了一个坑,刚开始我找了好几天gas命令,监视汽车can的包没有发现gas命令包,不知下一步怎么办。但后来一想可能思域这个车就不需要控制油门,有定速巡航PCM模块自己控制
阅读全文
0 0
- comma.ai实践2
- comma.ai代码及实践纪实 2
- comma.ai代码及实践纪实
- comma.ai自动驾驶代码浅析及实践
- comma.ai在crv和civic上的实践
- comma.ai源代码续
- the comma.ai driving dataset
- 可视化comma.ai的h5图片数据
- comma.ai的camera图片显示
- comma.ai的数据集下载不了
- Comma.AI 开源其首次成功无人驾驶的旅行数据
- AI 2
- 建立完整游戏AI实践之1
- fecebook移动端AI实践方案
- COMMA的小问题
- comma in shells
- Comma Separated Value(CSV)
- php echo comma dot
- C# 对List<T>取交集、差集以及并集
- 知识点--String、StringBuilder、StringBuffer
- java中tomcat重启时加载动态库XXX.dll报错“java.lang.UnsatisfiedLinkError: already loaded in another classloader”
- 并查集入门
- matplotlib学习之scatter()函数--颜色印射
- comma.ai实践2
- cordova Ionic 和cordova的区别是什么(项目总结)
- Linux下编译安装python3
- python 条件,循环
- Linux 的Apache服务之https与网页重写
- sftp上传文件
- org.springframework.dao.InvalidDataAccessApiUsageException: (错误记录,级联删除错误)
- 多目标进化算法(MOEAs)概述
- Hive2.0函数大全(中文版)