mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-01-13 16:47:55 -05:00
Merge pull request #92 from jwdinius/conda_env
add environment.yml to setup conda environment
This commit is contained in:
@@ -13,6 +13,7 @@ Ref:
|
||||
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
from scipy.integrate import quad
|
||||
|
||||
# NOTE: *_pose is a 3-array: 0 - x coord, 1 - y coord, 2 - orientation angle \theta
|
||||
|
||||
@@ -151,6 +152,10 @@ class eta3_path_segment(object):
|
||||
+ (10. * eta[1] - 2. * eta[3] + 1. / 6 * eta[5]) * sb \
|
||||
- (2. * eta[1]**2 * kappa[2] - 1. / 6 * eta[1]**3 *
|
||||
kappa[3] - 1. / 2 * eta[1] * eta[3] * kappa[2]) * cb
|
||||
|
||||
s_dot = lambda u : np.linalg.norm(self.coeffs[:, 1:].dot(np.array([1, 2.*u, 3.*u**2, 4.*u**3, 5.*u**4, 6.*u**5, 7.*u**6])))
|
||||
self.segment_length = quad(lambda u: s_dot(u), 0, 1)[0]
|
||||
|
||||
"""
|
||||
eta3_path_segment::calc_point
|
||||
|
||||
@@ -159,7 +164,6 @@ class eta3_path_segment(object):
|
||||
returns
|
||||
(x,y) of point along the segment
|
||||
"""
|
||||
|
||||
def calc_point(self, u):
|
||||
assert(u >= 0 and u <= 1)
|
||||
return self.coeffs.dot(np.array([1, u, u**2, u**3, u**4, u**5, u**6, u**7]))
|
||||
|
||||
9
environment.yml
Normal file
9
environment.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
name: python_robotics
|
||||
dependencies:
|
||||
- python==3.6
|
||||
- matplotlib
|
||||
- scipy
|
||||
- numpy
|
||||
- pandas
|
||||
- pip:
|
||||
- cvxpy
|
||||
Reference in New Issue
Block a user