├── README.md ├── coding ├── img │ ├── readme.org │ ├── TRO_cur.png │ ├── TRO_coord.png │ ├── TRO_theta.png │ ├── num_sub_10.png │ ├── num_sub_2.png │ ├── num_sub_20.png │ ├── num_sub_5.png │ ├── num_sub_50.png │ ├── TRO_cur_12.0.png │ ├── num_sub_100.png │ ├── TRO_coord_12.0.png │ ├── TRO_theta_12.0.png │ ├── CurErr_num_sub_10.png │ ├── CurErr_num_sub_2.png │ ├── CurErr_num_sub_20.png │ ├── CurErr_num_sub_5.png │ ├── CurErr_num_sub_50.png │ ├── CurErr_num_sub_100.png │ ├── ThetaErr_num_sub_10.png │ ├── ThetaErr_num_sub_100.png │ ├── ThetaErr_num_sub_2.png │ ├── ThetaErr_num_sub_20.png │ ├── ThetaErr_num_sub_5.png │ ├── ThetaErr_num_sub_50.png │ ├── nonuniform_sigma0.5_theta0.5pi_curerr.png │ ├── nonuniform_sigma1.0_theta0.5pi_curerr.png │ ├── nonuniform_sigma2.0_theta0.5pi_curerr.png │ ├── nonuniform_sigma5.0_theta0.5pi_curerr.png │ ├── nonuniform_sigma0.1_theta0.5pi_coorderr.png │ ├── nonuniform_sigma1.0_theta0.5pi_coorderr.png │ ├── nonuniform_sigma10.0_theta0.5pi_coorderr.png │ └── nonuniform_sigma10.0_theta0.5pi_curerr.png ├── 20160826_RBC.org ├── 20160829_paper.org ├── 20160819_计算误差方式.org ├── 20160824_errTRO.org ├── 20160825_errCurT.org ├── 20160901_TRO2014分析.org ├── 20160830_errCur incorrect results.org ├── 20160823_errCurT.org └── TRO_comments.org ├── daily └── 2016_08_24.org ├── EnReading └── Articles │ └── 2016_11_12.org └── LICENSE /README.md: -------------------------------------------------------------------------------- 1 | # task 2 | All of my tasks 3 | -------------------------------------------------------------------------------- /coding/img/readme.org: -------------------------------------------------------------------------------- 1 | All the images w.r.t. the *coding* task. 2 | -------------------------------------------------------------------------------- /coding/img/TRO_cur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/TRO_cur.png -------------------------------------------------------------------------------- /coding/img/TRO_coord.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/TRO_coord.png -------------------------------------------------------------------------------- /coding/img/TRO_theta.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/TRO_theta.png -------------------------------------------------------------------------------- /coding/img/num_sub_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/num_sub_10.png -------------------------------------------------------------------------------- /coding/img/num_sub_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/num_sub_2.png -------------------------------------------------------------------------------- /coding/img/num_sub_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/num_sub_20.png -------------------------------------------------------------------------------- /coding/img/num_sub_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/num_sub_5.png -------------------------------------------------------------------------------- /coding/img/num_sub_50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/num_sub_50.png -------------------------------------------------------------------------------- /coding/img/TRO_cur_12.0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/TRO_cur_12.0.png -------------------------------------------------------------------------------- /coding/img/num_sub_100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/num_sub_100.png -------------------------------------------------------------------------------- /coding/img/TRO_coord_12.0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/TRO_coord_12.0.png -------------------------------------------------------------------------------- /coding/img/TRO_theta_12.0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/TRO_theta_12.0.png -------------------------------------------------------------------------------- /coding/img/CurErr_num_sub_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/CurErr_num_sub_10.png -------------------------------------------------------------------------------- /coding/img/CurErr_num_sub_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/CurErr_num_sub_2.png -------------------------------------------------------------------------------- /coding/img/CurErr_num_sub_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/CurErr_num_sub_20.png -------------------------------------------------------------------------------- /coding/img/CurErr_num_sub_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/CurErr_num_sub_5.png -------------------------------------------------------------------------------- /coding/img/CurErr_num_sub_50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/CurErr_num_sub_50.png -------------------------------------------------------------------------------- /coding/img/CurErr_num_sub_100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/CurErr_num_sub_100.png -------------------------------------------------------------------------------- /coding/img/ThetaErr_num_sub_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/ThetaErr_num_sub_10.png -------------------------------------------------------------------------------- /coding/img/ThetaErr_num_sub_100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/ThetaErr_num_sub_100.png -------------------------------------------------------------------------------- /coding/img/ThetaErr_num_sub_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/ThetaErr_num_sub_2.png -------------------------------------------------------------------------------- /coding/img/ThetaErr_num_sub_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/ThetaErr_num_sub_20.png -------------------------------------------------------------------------------- /coding/img/ThetaErr_num_sub_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/ThetaErr_num_sub_5.png -------------------------------------------------------------------------------- /coding/img/ThetaErr_num_sub_50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/ThetaErr_num_sub_50.png -------------------------------------------------------------------------------- /coding/img/nonuniform_sigma0.5_theta0.5pi_curerr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/nonuniform_sigma0.5_theta0.5pi_curerr.png -------------------------------------------------------------------------------- /coding/img/nonuniform_sigma1.0_theta0.5pi_curerr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/nonuniform_sigma1.0_theta0.5pi_curerr.png -------------------------------------------------------------------------------- /coding/img/nonuniform_sigma2.0_theta0.5pi_curerr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/nonuniform_sigma2.0_theta0.5pi_curerr.png -------------------------------------------------------------------------------- /coding/img/nonuniform_sigma5.0_theta0.5pi_curerr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/nonuniform_sigma5.0_theta0.5pi_curerr.png -------------------------------------------------------------------------------- /coding/img/nonuniform_sigma0.1_theta0.5pi_coorderr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/nonuniform_sigma0.1_theta0.5pi_coorderr.png -------------------------------------------------------------------------------- /coding/img/nonuniform_sigma1.0_theta0.5pi_coorderr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/nonuniform_sigma1.0_theta0.5pi_coorderr.png -------------------------------------------------------------------------------- /coding/img/nonuniform_sigma10.0_theta0.5pi_coorderr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/nonuniform_sigma10.0_theta0.5pi_coorderr.png -------------------------------------------------------------------------------- /coding/img/nonuniform_sigma10.0_theta0.5pi_curerr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cafe/tasks/master/coding/img/nonuniform_sigma10.0_theta0.5pi_curerr.png -------------------------------------------------------------------------------- /coding/20160826_RBC.org: -------------------------------------------------------------------------------- 1 | #+TITLE: RBC 2 | 3 | [1] 2007. Trajectory Generation based on Rational Bezier Curves as Clothoids 4 | [2] 2008. Real-time Clothoid approximation by Rational Bezier curves 5 | 6 | -------------------------------------------------------------------------------- /coding/20160829_paper.org: -------------------------------------------------------------------------------- 1 | - 2011. On Generating Continuous-Curvature Paths for Line Following Problem with Curvature and Sharpness Constraints 2 | - 2006. A smooth, obstacle-avoiding curve (Computer Graphics) 3 | -------------------------------------------------------------------------------- /daily/2016_08_24.org: -------------------------------------------------------------------------------- 1 | - Move all the GitHub page related stuff to another account (since I don't want to manage multiple SSH keys for different accounts). From now on, all the stuff stored on this account is mostly for online editing while another account is used for stuff handled with Git bash. 2 | 3 | - write comments on the students applying Exco. 4 | - Modify =errCurT()= function to make sure it can be used for *both* uniform length and non-uniform length evaluations. 5 | -------------------------------------------------------------------------------- /coding/20160819_计算误差方式.org: -------------------------------------------------------------------------------- 1 | - 计算误差方式: 2 | 3 | 原来的uniArcLength()函数强制对整个Bezier曲线按弧长进行均分, 而且为了不出现首/末端点从一个segment跳动另一个segment的情况, 函数里默认不跳动. 事实上在划分段数非常多时, 跳动的点更多(不止是首/末端点, 与它们接近的点都可能会滑动到其它段里). 因此误差图就会有一个怪现象, 分的段数越多反而误差越大. 因此为避免这种情况, 有两种改善方法: 4 | 5 | 1. 将每一小段(interval)对应的小段(section或segment)分成相同数目的小段(subsegment), 同一个section里的每个subsegment长度是相同的, 而不同section里的subsegment长度不同. 6 | 2. Use normalized t value directly instead of dividing the segment according to arc length. 即t从0到1对应弧长0到s, 0.2就对应0.2s. 这种方式比较粗糙, 但在段数比较小的时候可以用来粗略地近似弧长, 因为该方法不会涉及到计算每段subsegment弧长(不会引入uniArcLengthOne函数中额外的计算误差), 故也是一个可行的方法. 但相比起来, 方法1更合理些. 7 | 8 | - 方法1实现: 9 | 10 | + 改写uniArcLength()函数使其适应变化. 11 | -------------------------------------------------------------------------------- /coding/20160824_errTRO.org: -------------------------------------------------------------------------------- 1 | #+TITLE: Results and Analysis of =errTRO= 2 | 3 | Source: =berror.jl= 4 | 5 | * =errTRO()= 6 | 7 | Default parameters: 8 | 9 | #+BEGIN_SRC julia 10 | errTRO(LookupTableFile::ASCIIString="Clothoid_LT_0.2.txt", 11 | Delta_sL=0.2, sL=6.0, numPlotSeg::Int64=60000, c_L=1.0) 12 | #+END_SRC 13 | 14 | If necessary we can change "Clothoid_LT_0.2.txt" -> "Clothoid_LT_0.2_12.0.txt" and =6.0= -> =12.0= to test a longer curve. 15 | 16 | *Note*: Though it seems that for longer segments the TRO approximation can still keep the error within the bound. The truth is that the curve cannot be preserved when arc length becomes larger. Imaging a segment following the above parameters, e.g., =s= runs from =20.0= to =20.2=. In such situation, the arc length still keeps unchanged and the approximated curve, i.e., the circular arc is not an "arc" anymore. Actually it may be a complete circle. Though the coord error is within bound, the shape is quite different from the orignal curve. So we need to adopt an adaptive sampling strategy :) 17 | 18 | ** =sL= is =6.0= 19 | 20 | - Coord error: 21 | [[./img/TRO_coord.png?raw=true]] 22 | 23 | - Cur error: 24 | [[./img/TRO_cur.png?raw=true]] 25 | 26 | - Theta error: 27 | [[./img/TRO_theta.png?raw=true]] 28 | 29 | ** =sL= is =12.0= 30 | 31 | - Coord error: 32 | [[./img/TRO_coord_12.0.png?raw=true]] 33 | 34 | - Cur error: 35 | [[./img/TRO_cur_12.0.png?raw=true]] 36 | 37 | - Theta error: 38 | [[./img/TRO_theta_12.0.png?raw=true]] 39 | -------------------------------------------------------------------------------- /coding/20160825_errCurT.org: -------------------------------------------------------------------------------- 1 | * =errCurT()= for non-uniform length evaluation 2 | 3 | Source: =cloerr.jl= 4 | 5 | Previously we have modified the =errCurT()= to work with uniformly distributed arc length error evaluation (mainly for TRO2014 comparison purpose). Now we need to handle the non-uniform case. 6 | 7 | 1. Set parameters for =lookupTable()= and =generalClo()= for testing 8 | 9 | #+BEGIN_SRC julia 10 | lookupTable(num::Int64=500, theta_max=0.5*pi, sigma=1.0) 11 | generalClo(u=6.0, sigma=1.0, kappa0=0.0, theta0=0.0, x0=0.0, y0=0.0, filename="LUT.h5") 12 | errCurT(num_sub::Int64=50, u=6.0, sigma=1.0, kappa0=0.0, theta0=0.0, x0=0.0, y0=0.0) 13 | #+END_SRC 14 | 15 | Considering the max value in =utotal= array is only =39.5434= with above parameters applied to =lookupTable()=, the parameters in =generalClo()= cannot exceed this limit. Also we changed the return values of =generalClo()= to include the length information of the original curve. (Here we only consider the simplest case: the arc length changes from =0= to a positive value.) 16 | 17 | 2. Resuts 18 | 19 | - *Cur errors* with different \sigma values. Here the length =u= can be changed accordingly to view the stable results. It can be seen that the cur error becomes stable and consistent even with different \sigma values. 20 | 21 | 1. \sigma is =0.5=: 22 | [[./img/nonuniform_sigma0.5_theta0.5pi_curerr.png?raw=true]] 23 | 24 | 2. \sigma is =1.0=: 25 | [[./img/nonuniform_sigma1.0_theta0.5pi_curerr.png?raw=true]] 26 | 27 | 3. \sigma is =2.0=: 28 | [[./img/nonuniform_sigma2.0_theta0.5pi_curerr.png?raw=true]] 29 | 30 | 4. \sigma is =5.0=: 31 | [[./img/nonuniform_sigma5.0_theta0.5pi_curerr.png?raw=true]] 32 | 33 | 5. \sigma is =10.0=: 34 | [[./img/nonuniform_sigma10.0_theta0.5pi_curerr.png?raw=true]] 35 | 36 | - *Coord error* with different \sigma values. They are not stable as cur errors. 37 | 38 | 1. \sigma is =0.5=: 39 | [[./img/nonuniform_sigma0.1_theta0.5pi_coorderr.png?raw=true]] 40 | 41 | 2. \sigma is =1.0=: 42 | [[./img/nonuniform_sigma1.0_theta0.5pi_coorderr.png?raw=true]] 43 | 44 | 3. \sigma is =10.0=: 45 | [[./img/nonuniform_sigma10.0_theta0.5pi_coorderr.png?raw=true]] 46 | -------------------------------------------------------------------------------- /coding/20160901_TRO2014分析.org: -------------------------------------------------------------------------------- 1 | * 第 I 部分 (略) 2 | * 第 II 部分 3 | 4 | LUT中只能存有限个坐标点的值, 因此要决定出 5 | 1. 曲线段的个数 6 | 2. safe parameters: 7 | 1. c_{L}: sharpness of the basic curve 8 | 2. s_{L}: length of the basic curve 9 | 3. \Delta s_{L}: sampling interval 10 | 11 | 面临的问题有二: 12 | 1. basic curve仍需要数值方法计算, 因此会有误差 -- 补救方法: 可以offline computing以达到想要的精度(如机器精度). 13 | 2. 在生成basic curve的LUT时需要做离散化和采样, 会有采样误差([[https://en.wikipedia.org/wiki/Sampling_error][sampling error]]) -- 补救方法: 计算落在采样点之间的点时采用插值. 因此最终的approximation error取决于两个因素: \Delta s_{L} 和插值效果. 14 | 15 | 因此在下面的部分会先讨论插值方法, 然后是插值误差分析, 然后是决定各种合适的参数来满足给定精度. 16 | 17 | * 第 III 部分: 插值 18 | 19 | ** 关于 continuity 20 | 1. 作者提到圆弧插值导致 continuity between segments is not preserved. 但 dense sampling 可以使这个看起来不明显. 21 | 2. 作者提到 [18] 中使用了穿过两个端点的圆弧, 但这种方法一来 decrease efficiency, 二来不方便估计最大误差, 因为在一个 sampling interval 里最大的误差并不随 s 单调递减. 22 | 23 | 找寻 interpolation error 与 \Delta s_{L}, c_{L} 之间的关系, 于是先固定 c_{L} 为 =1= 不变. 然后比较误差与不同 \Delta s_{L} 之间的关系(文中取了三个值, 即图2中的 =1=, =0.5=, =0.25=). 发现如下规律: 24 | 1. 最大误差出现在第一段末尾处. 25 | 2. 最大误差随曲线长度 s_{L} 而减小, 最终会趋向于 zero (文中稍后解释说因为原曲线最终会converge to a point). 26 | 27 | 最大误差记为 e_{im}. 通过观察(图3)或者说是stastic方法, 得出 e_{im} / \Delta s_{L}^{3} 是个定值. 即, LUT 中如果有n个点, 则误差是 O(1/n^{3}). 之后又用一些推导得出这一结论. 图3(a)中固定 c_{L} 为 =1=, (b)中固定 \Delta s_{L} 为 =0.1=. 从 (b) 中得出 e_{im}/c_{L} 是定值, 因此根据图3(b), 得出一个 e_{im} 的最终估计, 即式(8). 28 | 29 | 作者还提到, 使用 nonconstant sampling interval 可能会提高精度, 但会提升计算负担. 30 | 31 | * 第 IV 部分: 决定目标曲线的各种参数 32 | 33 | ** Wingding angle 与 length 限制 34 | 限定 \Delta \theta_{max} (比如定为 \pi/2), 可得出 s 范围, 即式(9). 如果有人为指定最大长度 s_{max}, 则 s 范围为式(10). 35 | 36 | #+BEGIN_QUOTE 37 | 这里的angle和length都是指最终的曲线, 而不是LUT中的那个基本曲线. 38 | 所以作者假设要近似的曲线winding angle不会超过某个特定值, 因此长度也有限. 39 | 下面的各种参数也是指最终曲线的, 而不是LUT中曲线的参数 40 | #+END_QUOTE 41 | 42 | ** 最小 scaling, 即 C 值. 也即最大 c 值 (C^{2} = 1/c) 43 | 一来极小的C值会使估计误差超出预设值, 二来在极端情况下, C 值非常小, 这时甚至超出LUT能近似的长度范围, 使LUT无法使用. 因此需要根据规定的误差设置C值范围. 因为当 C 值足够小时, 曲线曲率特别大, 最终会成为一个 *点*. 因此当曲率特别大时(比如此时C的临界值 C_{min}), 我们直接用一个点来做近似即可. 这个临界值最终由式(13)确定. 求解它可以用普通的最优化方法得出 s_{d}/C 是个定值, 文中也没有赘述. 44 | 45 | ** 最大 Scaling 值 46 | 即sharpness很小, 因 s_{d}/C 为定值, 即误差与 C 成正比. 极端情况是 *直线* 情况, 可以通过求解最优化问题得到最大C值. 47 | 48 | ** 最大 \kappa_{0} 值 49 | 一个特殊情况: 如果初始曲率 \kappa_{0} 不为0, 且C为无穷大. 那么曲线成为一个半径 1/\kappa_{0} 的圆. 这种情况其实是考虑在圆的特殊状态下, 是否能达到预定精度要求. 50 | 51 | * 第 V 部分: 决定LUT中的各种参数 52 | 一旦第 IV 部分中将目标曲线的各种参数范围确定下来, 就可以确定LUT的范围了. 主要是参数 s_{L} 和 \Delta s_{L}. 53 | -------------------------------------------------------------------------------- /EnReading/Articles/2016_11_12.org: -------------------------------------------------------------------------------- 1 | * [[http://www.economist.com/news/china/21710001-foreign-firms-are-worried-china-adopts-tough-cyber-security-law][China adopts a tough cyber-security law]] 2 | 3 | 文章原标题 The noose tightens (绳索套紧了, noose主要指绞刑或套动物用的套索) 4 | 5 | - damning 谴责的 6 | 7 | Those damning words from James Zimmerman, chairman of the American Chamber of Commerce in China. 8 | 9 | - sweeping 影响广泛的 10 | 11 | describe his view of a sweeping new cyber-security law adopted on November 7th 12 | 13 | - dim 悲观的, 黯淡的 14 | + businesspeople 商业人士 15 | 16 | Many foreign businesspeople agree with his dim assessment. 17 | 18 | - ostensibly 表面上 19 | + malicious 恶意的 20 | 21 | Though ostensibly designed to strengthen local networks against malicious hackers, 22 | 23 | - nationalist 民族主义 24 | + Trojan horse 特洛伊木马 25 | 26 | in fact the bill looks very much like a techno-nationalist Trojan horse. 27 | 28 | - ICT 信息与通信技术 29 | 30 | The law affects both domestic and foreign firms operating on the Chinese mainland and covers a wide range of activity relating to use of the internet and information and communications technologies (ICT). 31 | 32 | - come into force 生效执行 33 | 34 | It will not come into force until June next year, so it is not yet clear how the rules will be implemented. 35 | 36 | - problematic 困难的 37 | 38 | Even so, several of them seem problematic. 39 | 40 | - multinational 跨国公司(n.), 跨国的(adj.) 41 | 42 | This is a headache for multinationals, which typically rely on cross-border flows of business data. 43 | 44 | - thorny 困难的, 麻烦的 45 | + provision 条款 46 | 47 | Another thorny provision requires companies to get security certifications for important network equipment and software. 48 | 49 | - turn over 提交 50 | 51 | Foreign firms fear this might be used to force them to turn over security keys and proprietary technologies, which could be passed on to state-owned rivals 52 | 53 | - overweening 自负的 54 | 55 | Ironically, the overweening law may end up doing the opposite of what is intended. 56 | 57 | - bunker 掩体 58 | + mentality 心态 59 | + transnational 跨国的 60 | 61 | Because threats to networks are increasingly transnational, taking a bunker mentality could make it harder for China to prevent attacks. 62 | 63 | - flawed 有缺陷的 64 | 65 | the new rules are flawed because they do not encourage cross-border co-operation. 66 | 67 | - bleat 哭诉(v. 指以弱者的姿态讲话或抱怨) 68 | 69 | If Chinese officials reject such talk as the mere bleating of foreigners, they should at least listen to Eric Xu. 70 | 71 | - eloquent 雄辩的, 有说服力的 72 | 73 | That eloquent rejection of techno-nationalism came from a man who is co-chief executive of Huawei. 74 | -------------------------------------------------------------------------------- /coding/20160830_errCur incorrect results.org: -------------------------------------------------------------------------------- 1 | #+TITLE: =errCur()= Results 2 | Source: =cloerr.jl= 3 | 4 | * Presetting 5 | 6 | Since in =errCurT()=, there are totally =30= segments. Thus here =numplotseg= should be mulplied by =30= to make sure the plot has the same points with =errCurT()=. But when the number is larger than =50=, it takes too long to calculate errors. So we just use fewer points. 7 | 8 | #+BEGIN_SRC julia 9 | generalClo(u=6.0, sigma=1.0, kappa0=0.0, theta0=0.0, x0=0.0, y0=0.0, filename="LUT_sameSeg.h5") 10 | errCur(numplotseg::Int64=10, u=6.0, sigma=1.0, kappa0=0.0, theta0=0.0, x0=0.0, y0=0.0) 11 | #+END_SRC 12 | 13 | * Result 14 | 15 | 16 | =uniArcLength()= is called by =errCur()= and the accuracy in =uniArcLengthOne()= is set to be =1.0e-12= for the following results, i.e., 17 | 18 | #+BEGIN_SRC julia 19 | while maximum(abs(s-st)) > 1.0e-12 20 | ... 21 | end 22 | #+END_SRC 23 | 24 | ** Coordinate Error (Position Error) 25 | 26 | =coordB= and =coordClo= are 330-element array, i.e., =num= x =(num_sub+1)=, and each element is a 2-elementary array for storing =(x,y)= values. 27 | 28 | - =num_sub= = =2=: 29 | [[./img/num_sub_2.png?raw=true]] 30 | 31 | - =num_sub= = =5=: 32 | [[./img/num_sub_5.png?raw=true]] 33 | 34 | - =num_sub= = =10=: 35 | [[./img/num_sub_10.png?raw=true]] 36 | 37 | - =num_sub= = =20=: 38 | [[./img/num_sub_20.png?raw=true]] 39 | 40 | - =num_sub= = =50=: 41 | [[./img/num_sub_50.png?raw=true]] 42 | 43 | - =num_sub= = =100=: 44 | [[./img/num_sub_100.png?raw=true]] 45 | 46 | It can be seen that all the coordinate errors are consistent and below =8e-7=. Also the "wavy" shape is clearer when =num_sub= becomes larger because for each segment, the coordinate error should be zero at both ends. So the type is array of arrays. 47 | 48 | ** Curvature Error 49 | 50 | =curC= and =curB= are 330-element =Float64= array, i.e., =num= x =(num_sub+1)=. 51 | 52 | - =num_sub= = =2=: 53 | [[./img/CurErr_num_sub_2.png?raw=true]] 54 | 55 | - =num_sub= = =5=: 56 | [[./img/CurErr_num_sub_5.png?raw=true]] 57 | 58 | - =num_sub= = =10=: 59 | [[./img/CurErr_num_sub_10.png?raw=true]] 60 | 61 | - =num_sub= = =20=: 62 | [[./img/CurErr_num_sub_20.png?raw=true]] 63 | 64 | - =num_sub= = =50=: 65 | [[./img/CurErr_num_sub_50.png?raw=true]] 66 | 67 | - =num_sub= = =100=: 68 | [[./img/CurErr_num_sub_100.png?raw=true]] 69 | 70 | ** Theta Error 71 | 72 | =thetaClo= and =thetaB= are 330-element =Float64= array, i.e., =num= x =(num_sub+1)=. 73 | 74 | - =num_sub= = =2=: 75 | [[./img/ThetaErr_num_sub_2.png?raw=true]] 76 | 77 | - =num_sub= = =5=: 78 | [[./img/ThetaErr_num_sub_5.png?raw=true]] 79 | 80 | - =num_sub= = =10=: 81 | [[./img/ThetaErr_num_sub_10.png?raw=true]] 82 | 83 | - =num_sub= = =20=: 84 | [[./img/ThetaErr_num_sub_20.png?raw=true]] 85 | 86 | - =num_sub= = =50=: 87 | [[./img/ThetaErr_num_sub_50.png?raw=true]] 88 | 89 | - =num_sub= = =100=: 90 | [[./img/ThetaErr_num_sub_100.png?raw=true]] 91 | -------------------------------------------------------------------------------- /coding/20160823_errCurT.org: -------------------------------------------------------------------------------- 1 | #+TITLE: =errCurT()= Code analysis 2 | Source: =cloerr.jl= 3 | 4 | * =generalClo()= 5 | Following 2014 paper, all the parameters are set to be 6 | 7 | #+BEGIN_EXAMPLE 8 | u=6.0, sigma=1.0, kappa0=0.0, theta0=0.0, x0=0.0, y0=0.0, filename="LUT_sameSeg.h5" 9 | #+END_EXAMPLE 10 | 11 | If we execute the function 12 | 13 | #+BEGIN_SRC julia 14 | generalClo(u=6.0, sigma=1.0, kappa0=0.0, theta0=0.0, x0=0.0, y0=0.0, filename="LUT_sameSeg.h5") 15 | #+END_SRC 16 | 17 | and get the intermediate results: 18 | 19 | | Varialbe | Value | 20 | |----------+-------| 21 | | s_{0} | 0.0 | 22 | | s_{u} | 6.0 | 23 | | u_{s} | 0.0 | 24 | | u_{e} | 6.0 | 25 | | l_{s} | 1 | 26 | | l_{e} | *31* | 27 | | t_{s} | 0.0 | 28 | | t_{e} | *0.0* | 29 | 30 | #+BEGIN_SRC julia 31 | utotal = [0.0, 0.2, 0.4, ..., 6.0] # 31-element array 32 | le = count((x)->x <= ue, utotal) 33 | #+END_SRC 34 | 35 | The problem is the l_{e} value shown above. Theoretically it should be =30= (=6.0= falls on the 30th segment) instead of =31=, so t_{e} should be =1.0= instead of =0.0=. Since u_{e} is =6.0=, which is accidentally the 31th element of =utotal=. 36 | 37 | Thus we change the code accordingly: 38 | 39 | #+BEGIN_SRC julia 40 | ls = count((x)->x <= us, utotal) 41 | le = count((x)->x < ue, utotal) 42 | #+END_SRC 43 | 44 | and now we get =30=. 45 | 46 | Also updated =tParaNew()= to make sure all the =s_arc= values fall on =[0.0, 1.0]=. Note that sometimes the numerical computation will give results like =0.20000000000000018= or =-0.00000000000000018=, which actually should be =0.2= or =0.0=. So we need to handle such situations in =tParaNew()= to make sure that t_{e} is =1.0=: 47 | 48 | #+BEGIN_SRC julia 49 | if s_arc<=0.0 # in case some values like -0.00000000000000018 50 | return 0.0 51 | elseif s_arc>=L # in case some values like 0.20000000000000018 52 | return 1.0 53 | end 54 | #+END_SRC 55 | 56 | * =errCurT()= 57 | =L_array= stores all the arc length values of each segment and all the values should be the /same/. According to the 2014 paper, the intermediate evaluation shows that it's a 30-element array =[0.2, 0.2, ..., 0.2]=. 58 | 59 | | Varialbe | Value | 60 | |----------+-------| 61 | | num | 30 | 62 | | num_sub | 10 | 63 | | u | 6.0 | 64 | 65 | - =num=: number of segments (=30= by default, based on the lookup table) 66 | - =num_sub=: number of subsegments (=10= by default, can be changed to a larger value and mainly for plotting purpose) 67 | - =tSample= is a 2D array. Dimension: =num= x =(sub+1)= (30x11) 68 | - =sSample= is a 1D array and needs to be modified to hold =num= x =(sub+1)= (30x11=330) elements, which is similar to =tSample=. 69 | 70 | * Result 71 | =uniArcLengthOne()= is called by =errCurT()= and the accuracy in =uniArcLengthOne()= is set to be =1.0e-12= for the following results, i.e., 72 | 73 | #+BEGIN_SRC julia 74 | while maximum(abs(s-st)) > 1.0e-12 75 | ... 76 | end 77 | #+END_SRC 78 | 79 | ** Coordinate Error (Position Error) 80 | 81 | =coordB= and =coordClo= are 330-element array, i.e., =num= x =(num_sub+1)=, and each element is a 2-elementary array for storing =(x,y)= values. 82 | 83 | - =num_sub= = =2=: 84 | [[./img/num_sub_2.png?raw=true]] 85 | 86 | - =num_sub= = =5=: 87 | [[./img/num_sub_5.png?raw=true]] 88 | 89 | - =num_sub= = =10=: 90 | [[./img/num_sub_10.png?raw=true]] 91 | 92 | - =num_sub= = =20=: 93 | [[./img/num_sub_20.png?raw=true]] 94 | 95 | - =num_sub= = =50=: 96 | [[./img/num_sub_50.png?raw=true]] 97 | 98 | - =num_sub= = =100=: 99 | [[./img/num_sub_100.png?raw=true]] 100 | 101 | It can be seen that all the coordinate errors are consistent and below =8e-7=. Also the "wavy" shape is clearer when =num_sub= becomes larger because for each segment, the coordinate error should be zero at both ends. So the type is array of arrays. 102 | 103 | ** Curvature Error 104 | 105 | =curC= and =curB= are 330-element =Float64= array, i.e., =num= x =(num_sub+1)=. 106 | 107 | - =num_sub= = =2=: 108 | [[./img/CurErr_num_sub_2.png?raw=true]] 109 | 110 | - =num_sub= = =5=: 111 | [[./img/CurErr_num_sub_5.png?raw=true]] 112 | 113 | - =num_sub= = =10=: 114 | [[./img/CurErr_num_sub_10.png?raw=true]] 115 | 116 | - =num_sub= = =20=: 117 | [[./img/CurErr_num_sub_20.png?raw=true]] 118 | 119 | - =num_sub= = =50=: 120 | [[./img/CurErr_num_sub_50.png?raw=true]] 121 | 122 | - =num_sub= = =100=: 123 | [[./img/CurErr_num_sub_100.png?raw=true]] 124 | 125 | ** Theta Error 126 | 127 | =thetaClo= and =thetaB= are 330-element =Float64= array, i.e., =num= x =(num_sub+1)=. 128 | 129 | - =num_sub= = =2=: 130 | [[./img/ThetaErr_num_sub_2.png?raw=true]] 131 | 132 | - =num_sub= = =5=: 133 | [[./img/ThetaErr_num_sub_5.png?raw=true]] 134 | 135 | - =num_sub= = =10=: 136 | [[./img/ThetaErr_num_sub_10.png?raw=true]] 137 | 138 | - =num_sub= = =20=: 139 | [[./img/ThetaErr_num_sub_20.png?raw=true]] 140 | 141 | - =num_sub= = =50=: 142 | [[./img/ThetaErr_num_sub_50.png?raw=true]] 143 | 144 | - =num_sub= = =100=: 145 | [[./img/ThetaErr_num_sub_100.png?raw=true]] 146 | -------------------------------------------------------------------------------- /coding/TRO_comments.org: -------------------------------------------------------------------------------- 1 | * One 2 | 1. Theoretical technicalities may be of major interest for other journals, while the interest of the robotics community is limited to the *applicability* of the proposed approach. Even though authors mention in the paper that the method can be used in online planning, this is not sustained by any *evidence*. Information on the computational aspects are neither reported nor sustained by diagrams from simulation results. Moreover, no comparison with other well-known online methods has been proposed. 3 | 4 | 2. As also mentioned by the reviewers, the authors should make an effort in revising the paper by focusing on the aspects that are of interest for the T-RO journal and the robotics community. In particular, the authors should carefully take care of the concerns on the *position* vs *orientation* error, the *computational costs* and *comparisons* with other online methods. 5 | 6 | 3. I fully concur with the assessment of the Associate Editor. If you decide to resubmit, please consult the T-RO website http://www.ieee-ras.org/tro for instructions on electronic resubmission. In addition to the largely revised version of your paper, you should upload also a *single pdf file containing your reply to the reviewers' comments* and the *list of changes* made in the paper. 7 | 8 | * Two 9 | 1. This article presents a method to interpolate a clothoid (or Cornu spiral), which is a non-analytic curve contained in optimal paths for several mobile robots (car-like vehicles, differential or parallel wheels robots at constant velocity, ...). Fast and precise approximation of such a curve is thus important in robotics. However, several presentation and technical choices makes it impossible for me to evaluate correctly this paper's contribution. Specific contributions (with respect to existing works) yet seems IMHO too small for a regular paper. 10 | 11 | 2. First of all, the error function considered is the relative curvature error. This error is taken from several publications [20, 18, 17] from computational and applied mathematics. I am adamant on the fact that this error function is not relevant in robotics (and quite sure it is also in other applications): what needs to be approximated is the position, not the curvature (which is a quadratic function of the arc length - no approximation needed here, on the contrary of what authors pretend in the introduction). Of course, a small curvature error will lead to a reasonable error in position, but the exact relationship is complex: curvature is integrated into orientation, whose sinus and cosinus are integrated into position. What is clear is that a bounded curvature error will leads to an increasing position error, which can surely be bounded, as the arc length is, but with probably a higher bound than the one of the curvature error. The error in position has thus to be used as it was in [11, 14, 16] (or at least added to the curvature error). 12 | 13 | 3. This article also forgets to give any information on the computation time of the presented method, which is a critical point (in both robotics and other applications [20]). Even the *number* of basic clothoids, and the number of Bézier pieces for each, needed to obtain the approximation is only given once, in Figure 4. Moreover, the experimental results presented in the article do not convince me: why is the presented method only compared to other Bézier-based methods [16, 18, 19, 20], and not to other type of approach (e.g. [11], for which an online code is available, making comparison very easy)? Instead of two comparisons (why those?), I would have preferred a *statistic study*, or even better an *evolution of the error with respect to the clothoid length*. Considering the given results, it seems strange that G2+ method [20] gives worst results than G3 method [18] (the authors of both publications pretended they were equivalent). 14 | 15 | 4. At last, the article develops several parts which are IMHO useless: e.g., *algorithm 1 & 2* are usual, and could have been only mentioned; *part II.C* is also mainly based on [20], and contains a huge useless Figure 1 (as there is no scale of colors, it has no meaning); etc Please shorten this article by focusing on the specific contributions of your work. Please, be careful with the notation you use: a length is usually called l, not u; a curve parameter should not be called t (t is time). Be also careful to define values and functions: in equation (10), *B & G* are not defined (please add a reference to appendix A which defines them); in algorithm 1, ksi_u does not seem to be defined. Appendix A needs references or explanations (any justifications for these definitions). 16 | 17 | 5. As a conclusion, please add the error in position to the curvature error in your experimental results, as well as other results with non-Bézier-based methods (Matlab implementation of [11] is available online at http://act.rasip.fer.hr/mbrezak/ClothoidComputing.html, cf [28] in [11]). Please also verify your implementation of [20], and propose a more global view of the quality (a statistic approach instead of only two examples). At last, focus your article on specific contributions to propose a short article. 18 | 19 | * Three 20 | 1. In this paper, authors propose a method to approximate general clothoids with G^3 geometric continuity. The method can be seen as a three stage approach. In the first stage, elementary clothoids with constraint on winding angle are approximated by Quintic Bezier curves and optimal shape parameters to minimize the maximum curvature error are obtained. In the second stage, by using this optimization procedure, basic clothoids defined in the first quadrant are obtained off-line and stored in a lookup table. Finally, the third stage consists in combining these basic clothoids thought appropriate geometric transformations in order to obtain a general clothoid with a desired accuracy. 21 | 22 | 2. The paper is well written and clear in general but needs some improvements in its structure and presentation of the ideas in order to make easier for a reader to follow all the steps of the presented method. Some suggestions to improve the clarity: 23 | - A brief description of the overall idea and the steps followed throughout the analysis at the top of each section would be useful to the reader; 24 | - The paper consists in three consecutive approximations: elementary clothoid approximation, basic clothoid approximation and general clothoid approximation. Please, give in advance a definition of these three type of clothoids with an overview of how elemetary clothoids are used to obtain basic ones and general clothoids from basic ones. 25 | - Section II could be split in two sections: the first one contains only the clothoid and the quintic bazier curves, while the second deals with elementary clothoid approximation that in turns can be split in subsections (definition of the optimization problem, numerical optimization procedure and divergence problem). 26 | - Some figures are too small and in the printed version is very difficult to distinguish between solid and dashed lines (e.g~Fig. 3 and 4). 27 | 28 | 3. The paper seems mathematically correct and the improvement of the proposed method w.r.t. the existing literature is supported by the comparison (section V) of the proposed methods with the ones provided in [16], [18]-[19], and [20]. In particular, authors show the improvements obtained in terms of curvature error, especially in case of non-unit length clothoid approximation. 29 | 30 | 4. Even though in robotics there are *few* applications where the clothoid curves appear as an extremal of an optimal control problem (Dubins model with inertial control law) or for path smoothing applications, as also stated by authors at the beginning of the introduction, this reviewer believes that the results of this paper are much more relevant in a different field. This is confirmed also by looking at the bibliography. Only one-thirds of the citation come from a journal/conference in robotics. Moreover, the papers authors use for comparison come from computational and applied mathematics, not from robotics. Only [11] and maybe [7] are in the same vein of this paper and come from a robotics journal/conference. I hence ask to the authors to make an effort (not limited to the first paragraph of the introduction) to argument (also with more citations coming from robotics journal/conference) the relevance of this paper in the robotics field and in particular in practical experiments: why should this paper be more relevant in the robotics field instead of in applied mathematics or graphics? 31 | 32 | 5. Minor comments: 33 | - Clothoids are extremal of the Dubins model if the vehicle is controlled by the angular acceleration instead of the angular velocity. Please, specify at the beginning of the introduction. 34 | - Last sentence of the first paragraph of the introduction: "cltohoid" -> "clothoid". 35 | - Section II.C: "...by applying (12)" maybe is (2)? 36 | - The sentence before Section III: "...with the exactly the same" -> "...with exactly the same". 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | --------------------------------------------------------------------------------