1 Star 0 Fork 25

xjh/transforms3d_cpp

forked from 鱼香ROS/transforms3d_cpp 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.cpp 923 Bytes
一键复制 编辑 原始数据 按行查看 历史
sangxin 提交于 2021-05-31 13:51 . add transforms group
/*
* @Descripttion:
* @Author: sangxin
* @Date: 2021-05-01 21:04:19
* @LastEditTime: 2021-05-02 23:39:20
*/
#include "math.h"
#include <iostream>
#include <TransForms3d/TransForms.h>
using namespace std;
using namespace Eigen;
int main()
{
/* base@grapper */
Matrix4d Tbg = TransForms::ComposeEuler(-0.544, -0.203,-0.037, 180, 0.00000, 140);
/* camera@maker*/
Matrix4d Tcw = TransForms::ComposeEuler(0.020,-0.040,0.300,0,0,-45);
/* base@bottle */
Matrix4d Tbw = TransForms::ComposeEuler(-0.663,-0.193,-0.231,-180,0,140);
TransFormsGroup tfg;
tfg.pushTransForm("base","grapper",Tbg);
tfg.pushTransForm("camera","bottle",Tcw);
tfg.pushTransForm("base","bottle",Tbw);
cout<<tfg.toString()<<endl;
cout<<TransForms::H2EulerAngle(tfg.getTransForm("grapper","camera"));
Matrix4d Tgc = Tbg.inverse()*Tbw*Tcw.inverse();
cout<<TransForms::H2EulerAngle(Tgc);
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xu-j-h/transforms3d_cpp.git
git@gitee.com:xu-j-h/transforms3d_cpp.git
xu-j-h
transforms3d_cpp
transforms3d_cpp
master

搜索帮助