用transformation.py的superimposition_matrix计算变换矩阵的问题

时间:2018-10-12 10:17:16

标签: python matrix transformation

当尝试使用库转换和函数superimposition_matrix计算两个系统之间的转换矩阵时,出现以下错误:

  

文件“ D:\ Travail \ Dev \ projet Jarvis \ collisions \ Test dans   Jarvis \ JarvisRobotics_20180717_1937 \ JarvisRobotics \ outils_matrices.py”,   set_frame_passageV000中的第839行       M = Transformations.superimposition_matrix(list_base,list_ext,scale = True,usesvd = True)ValueError:eigenvector_of_symmetric_44()   失败

条目中的数据是两个十个向量(x,y,z)的列表:

<class 'list'>: [[2443.9128, -501.7427, -630.8925], [2126.8356, -703.2691, -678.1219], [1534.3236, -757.3283, -678.0219], [1532.8918, -339.4951, -682.6528], [2103.9974, -226.6539, -472.8035], [2297.246, 47.3245, -475.6743], [2429.3814, 88.5478, -476.0224], [2353.675, 614.8282, -447.7145], [1931.7996, 651.5278, -448.4745], [1604.6555, 664.6893, -448.8943]]

<class 'list'>: [[406.93, -373.8, 2559.99], [612.81, -65.74, 2566.76], [679.68, 520.63, 2542.36], [271.24, 532.19, 2612.08], [114.43, -31.73, 2439.24], [-157.93, -220.7, 2490.9], [-200.13, -350.38, 2501.29], [-722.9, -260.64, 2556.52], [-750.43, 160.15, 2551.35], [-759.14, 488.8, 2545.55]]

有人在这里帮助我或指导我进一步发展吗?

2 个答案:

答案 0 :(得分:0)

def set_frame_passage_(list_pt_ref_base,list_pt_ref_ext):

app.module

import { HttpService } from "./http.service";

export function HttpLoaderFactory(httpClient: HttpClient) {
    return new TranslateHttpLoader(httpClient, "./assets/" + HttpService.selectedEnvironment()+"/i18n/", ".json");
}

答案 1 :(得分:0)

有关信息,我已经找到出现此错误的原因:

我得到的模块transformation.py不完整,缺少某些功能(尤其是引发错误的功能),并且由于指令“ from Transformation import *”,显然存在默认值...我只需使用import我需要的功能(superimposition_matrix),然后我就进行测试。

现在,计算已通过,但现在结果不正确。

通过我们用于机器人ABB(Robotstudio)的另一个软件,我们拥有一个专用于转换帧计算的功能,即“ DefAccFrame-定义两个系统之间的精确帧”。当我们使用它时,我们获得了正确的值(经过实际测试),目前此代码不起作用。

问题是该指令只能在ABB机器人上访问,我将找到一种在任何控制器中使用该指令的方法。

这就是我今天的位置。 真的谢谢大家的帮助。