TOPP.py 文件源码

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

项目:toppra 作者: hungpham2511 项目源码 文件源码
def set_goal_interval(self, IN):
        """Set the goal squared velocity interval.

        Parameters
        ----------
        IN: array or float
            A single float, or a (2, ) array setting the goal
            `(x_lower, x_higher)` squared path velocities.

        Raises
        ------
        AssertionError
            If `IN` is a single, negative float. Or if `IN[0] > IN[1]`.

        """
        IN = np.r_[IN].astype(float)
        if IN.shape[0] == 1:
            IN = np.array([IN[0], IN[0]])
        elif IN.shape[0] > 2:
            raise ValueError('Input IN has wrong dimension: {}'.format(IN.shape))
        assert IN[1] >= IN[0], "Illegal input: non-increase end-points."
        assert IN[0] >= 0, "Illegal input: negative lower end-point."

        self.IN = IN
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号