实现了yaw轴的转动,mid360参数更加接近实际的参数
This commit is contained in:
1 parent
72f407c110
commit
96445bd5f1
61 files changed
+2460
-235
No files matched your search
@@ -59,7 +59,7 @@ def cylinder_clearance(row,x,y,radius):
|
||||
q=row[4:];yaw=math.atan2(2*(q[3]*q[2]+q[0]*q[1]),1-2*(q[1]*q[1]+q[2]*q[2]))
|
||||
dx,dy=x-row[1],y-row[2]
|
||||
bx=math.cos(yaw)*dx+math.sin(yaw)*dy;by=-math.sin(yaw)*dx+math.cos(yaw)*dy
|
||||
# Union of the actual SDF chassis and gimbal collision boxes.
|
||||
# Chassis box and the yaw sweep of the SDF gimbal collision box.
|
||||
chassis=math.hypot(max(0,abs(bx)-0.289),max(0,abs(by)-0.2605))
|
||||
gimbal=math.hypot(max(0,abs(bx-0.12)-0.20),max(0,abs(by)-0.15))
|
||||
gimbal=math.hypot(bx,by)-math.hypot(0.2656,0.1439)
|
||||
return min(chassis,gimbal)-radius
|
||||
Reference in new issue
Block a user