资源简介
利用深度学习优化PID控制算法,实现自动匹配参数;python代码
代码片段和文件信息
#!/usr/bin/env python
# title: meta-Cluster Location Publisher
# Description: Clusters the clusters into metaclusters
# Engineer: Jonathan Lwowski
# Email: jonathan.lwowski@gmail.com
# Lab: Autonomous Controls Lab The University of Texas at San Antonio
######### Libraries ###################
import sys
from std_msgs.msg import String
from std_msgs.msg import Header
import rospy
import math
import numpy as np
import time
from gazebo_msgs.msg import ModelStates
from geometry_msgs.msg import PoseArray
from geometry_msgs.msg import Pose
from geometry_msgs.msg import Point
from geometry_msgs.msg import Quaternion
from sklearn import cluster
from gazebo_msgs.srv import SpawnModel
from gazebo_msgs.srv import DeleteModel
from cooperative_mav_asv.msg import *
from cooperative_mav_asv.srv import *
### Functions to Find Smalled Bounding Circle ###
def make_circle(points):
# Convert to float and randomize order
shuffled = [(float(p[0]) float(p[1])) for p in points]
# Progressively add points to circle or recompute circle
c = None
for (i p) in enumerate(shuffled):
if c is None or not _is_in_circle(c p):
c = _make_circle_one_point(shuffled[0 : i + 1] p)
return c
# One boundary point known
def _make_circle_one_point(points p):
c = (p[0] p[1] 0.0)
for (i q) in enumerate(points):
if not _is_in_circle(c q):
if c[2] == 0.0:
c = _make_diameter(p q)
else:
c = _make_circle_two_points(points[0 : i + 1] p q)
return c
# Two boundary points known
def _make_circle_two_points(points p q):
diameter = _make_diameter(p q)
if all(_is_in_circle(diameter r) for r in points):
return diameter
left = None
right = None
for r in points:
cross = _cross_product(p[0] p[1] q[0] q[1] r[0] r[1])
c = _make_circumcircle(p q r)
if c is None:
continue
elif cross > 0.0 and (left is None or _cross_product(p[0] p[1] q[0] q[1] c[0] c[1]) > _cross_product(p[0] p[1] q[0] q[1] left[0] left[1])):
left = c
elif cross < 0.0 and (right is None or _cross_product(p[0] p[1] q[0] q[1] c[0] c[1]) < _cross_product(p[0] p[1] q[0] q[1] right[0] right[1])):
right = c
return left if (right is None or (left is not None and left[2] <= right[2])) else right
def _make_circumcircle(p0 p1 p2):
# Mathematical algorithm from Wikipedia: Circumscribed circle
ax = p0[0]; ay = p0[1]
bx = p1[0]; by = p1[1]
cx = p2[0]; cy = p2[1]
d = (ax * (by - cy) + bx * (cy - ay) + cx * (ay - by)) * 2.0
if d == 0.0:
return None
x = ((ax * ax + ay * ay) * (by - cy) + (bx * bx + by * by) * (cy - ay) + (cx * cx + cy * cy) * (ay - by)) / d
y = ((ax * ax + ay * ay) * (cx - bx) + (bx * bx + by * by) * (ax - cx) + (cx * cx + cy * cy) * (bx - ax)) / d
return (x y math.hypot(x - ax y - ay))
d
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-10-21 16:34 DeepLearningPID-master\
文件 6217 2016-10-21 16:34 DeepLearningPID-master\CMakeLists.txt
文件 35141 2016-10-21 16:34 DeepLearningPID-master\LICENSE
文件 320 2016-10-21 16:34 DeepLearningPID-master\README.md
文件 536 2016-10-21 16:34 DeepLearningPID-master\README.md~
目录 0 2016-10-21 16:34 DeepLearningPID-master\launch\
文件 1302 2016-10-21 16:34 DeepLearningPID-master\launch\deep_learning_pid.launch
文件 1166 2016-10-21 16:34 DeepLearningPID-master\launch\deep_learning_pid.launch~
文件 976 2016-10-21 16:34 DeepLearningPID-master\launch\empty_world.launch~
文件 1331 2016-10-21 16:34 DeepLearningPID-master\launch\p3dx.gazebo.launch
文件 1327 2016-10-21 16:34 DeepLearningPID-master\launch\p3dx.gazebo.launch~
文件 1223 2016-10-21 16:34 DeepLearningPID-master\launch\spawn_quadrotor_with_downward_cam.launch
文件 1223 2016-10-21 16:34 DeepLearningPID-master\launch\spawn_quadrotor_with_downward_stereo_cam.launch
文件 5199 2016-10-21 16:34 DeepLearningPID-master\launch\universal_boat_world_multiple_mav_local_cloud.launch~
文件 5207 2016-10-21 16:34 DeepLearningPID-master\launch\universal_boat_world_multiple_mav_server_cloud.launch~
目录 0 2016-10-21 16:34 DeepLearningPID-master\msg\
文件 28 2016-10-21 16:34 DeepLearningPID-master\msg\AuctionAssignments.msg
文件 70 2016-10-21 16:34 DeepLearningPID-master\msg\BoatAuctionInfo.msg
文件 65 2016-10-21 16:34 DeepLearningPID-master\msg\ClusterCenter.msg
文件 26 2016-10-21 16:34 DeepLearningPID-master\msg\ClusterCenters.msg
文件 87 2016-10-21 16:34 DeepLearningPID-master\msg\me
文件 28 2016-10-21 16:34 DeepLearningPID-master\msg\me
文件 2141 2016-10-21 16:34 DeepLearningPID-master\package.xm
目录 0 2016-10-21 16:34 DeepLearningPID-master\rviz\
文件 4973 2016-10-21 16:34 DeepLearningPID-master\rviz\rviz_config.rviz
目录 0 2016-10-21 16:34 DeepLearningPID-master\sc
目录 0 2016-10-21 16:34 DeepLearningPID-master\sc
文件 4733 2016-10-21 16:34 DeepLearningPID-master\sc
文件 7564 2016-10-21 16:34 DeepLearningPID-master\sc
文件 4320 2016-10-21 16:34 DeepLearningPID-master\sc
文件 12301 2016-10-21 16:34 DeepLearningPID-master\sc
............此处省略77个文件信息
相关资源
- Python编程快速上手 让繁琐工作自动化
- 深度学习入门 基于python理论与实现
- Python-PyGradle使用Gradle来构建Python项目
- dlib-19.18.0-cp37-cp37m-linux_armv7l.whl
- dlib18.17 编译好的python-dlib库 不需要
- dlib-19.8.1-cp36-cp36m-win_amd64.whl 支持w
- SDL2-2.0.10.zip
- 流畅的Python (Fluent Python) Kindle英文
- 《Rapid GUI Programming with Python and Qt》
- IronPython In Action
- python3 大华IP摄像头使用 SDK DLL 添加动
- dlib-19.19.0-cp38-cp38-win_amd64.zip
- dlib-19.17.0-py3.7-win-amd64.egg.zip免去复杂
- Deep_Learning_for_Computer_Vision_with_Python_
- dlib.cp37-win_amd64
- Python-WenshuSpiderScrapy框架爬取中国裁判
- dlib-19.17.99-cp37-cp37m-win_amd64.rar
- dlib-19.4.0-cp35-cp35m-win_amd64.whl
- python27_d.dll
- dlib-19.19.0-cp37-cp37-win_amd64.whl
- CherryPy Essentials - Rapid Python Web Applica
- 《Python Cookbook》第三版中文v1.0.2.mob
- 亚马逊电子书-Keras快速上手:基于P
- python调用dlib库实现简单的人脸识别
- Win10X64 下 VS2017 编译的X64位 Caffe 静态
- 笨办法学Python 3 (Learn Python 3 the har
- python dlib 训练人脸特征点检测器
- gtk+-bundle_3.10.4-201412_win64.zip
- python使用dlib对人脸识别的范例程序
- dlib-19.17.zip
评论
共有 条评论