trajectory.py 文件源码

python
阅读 35 收藏 0 点赞 0 评论 0

项目:pyinduct 作者: pyinduct 项目源码 文件源码
def __init__(self, y0, y1, z0, z1, t0, dt, params):
        SimulationInput.__init__(self)

        # store params
        self._tA = t0
        self._dt = dt
        self._dz = z1 - z0
        self._m = params.m             # []=kg mass at z=0
        self._tau = params.tau             # []=m/s speed of wave translation in string
        self._sigma = params.sigma     # []=kgm/s**2 pretension of string

        # construct trajectory generator for yd
        ts = max(t0, self._dz * self._tau)  # never too early
        self.trajectory_gen = SmoothTransition((y0, y1), (ts, ts + dt), method="poly", differential_order=2)

        # create vectorized functions
        self.control_input = np.vectorize(self._control_input, otypes=[np.float])
        self.system_state = np.vectorize(self._system_sate, otypes=[np.float])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号