按照教程编程时发现这个问题:
cam=CentralCamera('default');
P=[1 1 5]';
p0=cam.project(P)
cam.project( P ,'Tcam',trotx(0.1) )
输出结果为:
p0 =
672
672
ans =
672
672
trotx函数没有正确生效。作者对此的解释:
This is better handled on the Toolbox forum at tiny.cc/rvcforum. In short, the video is made using an older version of the toolbox. For MVTB4.x please change ‘Tcam’ to ‘pose’.
新版本的roboticstoolbox工具箱调用transl时要将'Tcam'改为'pose':
cam.project( P ,'pose',trotx(0.1) )
现在可以正确生效了,结果为:
ans =
672.0561
673.4526