试了一下 是真的
发表于 : 2022年 12月 21日 06:30
小臂转90度好理解 本来就是两根骨头 设计出来要扭转的 至于上臂 我摸了一会 好像是肩膀那个关节在转 以前没意识到上臂还有这个轴的运动能力
算了一下,没毛病
代码: 全选
syms t
Rx = [1 0 0;0 cos(t) -sin(t);0 sin(t) cos(t)]
Ry = [cos(t) 0 sin(t);0 1 0; -sin(t) 0 cos(t)]
Rz = [cos(t) -sin(t) 0;sin(t) cos(t) 0; 0 0 1]
rotation = Rz * Rx * Ry
t = -pi / 2 % clockwise rotation at each step
action = subs(rotation)
total_actions = action * action
action_target = [1 0 0; 0 0 1;0 -1 0]
action_target == action
最开始写的是theta,写着写着heta就忘掉了
from scipy.Rotation import rotation(ヅ) 写了: 2022年 12月 21日 12:25 算了一下,没毛病
代码: 全选
syms t Rx = [1 0 0;0 cos(t) -sin(t);0 sin(t) cos(t)] Ry = [cos(t) 0 sin(t);0 1 0; -sin(t) 0 cos(t)] Rz = [cos(t) -sin(t) 0;sin(t) cos(t) 0; 0 0 1] rotation = Rz * Rx * Ry t = -pi / 2 % clockwise rotation at each step action = subs(rotation) total_actions = action * action action_target = [1 0 0; 0 0 1;0 -1 0] action_target == action
这三个动作组合就是等价于绕x轴顺时针旋转90°,两次就是转180°了
octave语法是不是跟matlab差不多? Matlab要钱 我从来没学过
这个实验 即有生理学 又有数学(ヅ) 写了: 2022年 12月 21日 12:25 算了一下,没毛病
代码: 全选
syms t Rx = [1 0 0;0 cos(t) -sin(t);0 sin(t) cos(t)] Ry = [cos(t) 0 sin(t);0 1 0; -sin(t) 0 cos(t)] Rz = [cos(t) -sin(t) 0;sin(t) cos(t) 0; 0 0 1] rotation = Rz * Rx * Ry t = -pi / 2 % clockwise rotation at each step action = subs(rotation) total_actions = action * action action_target = [1 0 0; 0 0 1;0 -1 0] action_target == action
相当于开源克隆吧,很多时候可以直接跑同样code