stage1-bg8 <<
Previous Next >> 檔案下載
stage2-bg1
w5
20210326
討論做什麼
結論:
轉子引擎

w6
利用追蹤頂點路徑 取得不規則曲線草圖(20rpm)
20210402
繪製轉子
外型參考勒洛三角形繪製而成
齒數為52齒 模數為2

20210403
偏心軸繪製完成

20210404
擋板繪製完成
齒數為34齒 模數為2

20210405
外殼繪製完成
輪廓為不規則曲面 擷取不規則取線方法

20210406
組合圖完成

solidworks模擬影片(20rpm)
>
20210407
因為在coppeliasim中模擬屢次失敗,所以我們決定換題目。
w7
討論改什麼
結論:堆高機
20210411
前輪繪製完成

後輪繪製完成

底盤繪製完成

20210413

20210414
擋板繪製完成

堆高機組合圖完成

20210415
加入wasd控制堆高機
參考:https://mdekmol.github.io/cd2019a-task1-2019cda_t1_g2/content/Vrep-2.html
function sysCall_init()
left_front_handle= sim.getObjectHandle('left_joint')
left_back_handle= sim.getObjectHandle('left_joint')
right_back_handle= sim.getObjectHandle('right_joint')
right_front_handle= sim.getObjectHandle('right_joint')
MaxVel=2
leftvelocity=0
rightvelocity=0
dVel=100;
--sim.setJointTargetVelocity(left_front_handle,leftvelocity)
sim.setJointTargetVelocity(left_back_handle,leftvelocity)
sim.setJointTargetVelocity(right_back_handle,rightvelocity)
--sim.setJointTargetVelocity(right_front_handle,rightvelocity)
end
function sysCall_actuation()
message,auxiliaryData=sim.getSimulatorMessage()
while message~=-1 do
if (message==sim.message_keypress) then
if (auxiliaryData[1]==32) then
-- right key
leftvelocity=0
rightvelocity=0
sim.setJointForce(left_front_handle, 0)
sim.setJointForce(left_back_handle, 0)
sim.setJointForce(right_back_handle, 0)
sim.setJointForce(right_front_handle, 0)
break
else
--sim.setJointForce(left_front_handle, 10000)
sim.setJointForce(left_back_handle, 10000)
sim.setJointForce(right_back_handle, 10000)
--sim.setJointForce(right_front_handle, 10000)
end
if (auxiliaryData[1]==119) then
-- w key
leftvelocity=(leftvelocity+rightvelocity)/2
rightvelocity=leftvelocity
leftvelocity=leftvelocity+dVel
rightvelocity=rightvelocity+dVel
end
if (auxiliaryData[1]==115) then
-- s key
leftvelocity=(leftvelocity+rightvelocity)/2
rightvelocity=leftvelocity
leftvelocity=leftvelocity-dVel
rightvelocity=rightvelocity-dVel
end
if (auxiliaryData[1]==97) then
-- a key
leftvelocity=leftvelocity-dVel
rightvelocity=rightvelocity+dVel
end
if (auxiliaryData[1]==100) then
-- d key
leftvelocity=leftvelocity+dVel
rightvelocity=rightvelocity-dVel
end
end
message,auxiliaryData=sim.getSimulatorMessage()
end
if leftvelocity>MaxVel then
leftvelocity=MaxVel
end
if leftvelocity<-MaxVel then
leftvelocity=-MaxVel
end
if rightvelocity>MaxVel then
rightvelocity=MaxVel
end
if rightvelocity<-MaxVel then
rightvelocity=-MaxVel
end
--sim.setJointTargetVelocity(left_front_handle,leftvelocity)
sim.setJointTargetVelocity(left_back_handle,leftvelocity)
sim.setJointTargetVelocity(right_back_handle,rightvelocity)
--sim.setJointTargetVelocity(right_front_handle,rightvelocity)
end
程式
w8
20210417
齒輪繪製完成,齒數為51,模數為2

在插鏟上增加齒條,模數為2

20210418
加入方向鍵控制插鏟功能
程式:
function sysCall_init()
left_front_handle= sim.getObjectHandle('left_joint')
left_back_handle= sim.getObjectHandle('left_joint')
right_back_handle= sim.getObjectHandle('right_joint')
right_front_handle= sim.getObjectHandle('right_joint')
gear_up_handle= sim.getObjectHandle('gear_joint')
gear_down_handle= sim.getObjectHandle('gear_joint')
MaxVel=10
MaxVel_gear=30
leftvelocity=0
rightvelocity=0
upvelocity=0
dVel=10;
dVel_gear=10;
--sim.setJointTargetVelocity(left_front_handle,leftvelocity)
sim.setJointTargetVelocity(left_back_handle,leftvelocity)
sim.setJointTargetVelocity(right_back_handle,rightvelocity)
sim.setJointTargetVelocity(gear_down_handle,upvelocity)
--sim.setJointTargetVelocity(right_front_handle,rightvelocity)
end
function sysCall_actuation()
message,auxiliaryData=sim.getSimulatorMessage()
while message~=-1 do
if (message==sim.message_keypress) then
if (auxiliaryData[1]==32) then
leftvelocity=0
rightvelocity=0
upvelocity=0
sim.setJointForce(left_front_handle, 0)
sim.setJointForce(left_back_handle, 0)
sim.setJointForce(right_back_handle, 0)
sim.setJointForce(right_front_handle, 0)
sim.setJointForce(gear_up_handle, 0)
sim.setJointForce(gear_down_handle, 0)
break
else
--sim.setJointForce(left_front_handle, 10000)
sim.setJointForce(left_back_handle, 10000)
sim.setJointForce(right_back_handle, 10000)
sim.setJointForce(gear_down_handle, 10000)
--sim.setJointForce(right_front_handle, 10000)
end
if (auxiliaryData[1]==119) then
-- w key
leftvelocity=(leftvelocity+rightvelocity)/2
rightvelocity=leftvelocity
leftvelocity=leftvelocity+dVel
rightvelocity=rightvelocity+dVel
end
if (auxiliaryData[1]==115) then
-- s key
leftvelocity=(leftvelocity+rightvelocity)/2
rightvelocity=leftvelocity
leftvelocity=leftvelocity-dVel
rightvelocity=rightvelocity-dVel
end
if (auxiliaryData[1]==97) then
-- a key
leftvelocity=leftvelocity-dVel
rightvelocity=rightvelocity+dVel
end
if (auxiliaryData[1]==100) then
-- d key
leftvelocity=leftvelocity+dVel
rightvelocity=rightvelocity-dVel
end
if (auxiliaryData[1]==100) then
-- d key
leftvelocity=leftvelocity+dVel
rightvelocity=rightvelocity-dVel
end
if (auxiliaryData[1]==2008) then
-- up key
upvelocity=upvelocity+dVel_gear
end
if (auxiliaryData[1]==2007) then
-- down key
upvelocity=upvelocity-dVel_gear
end
end
message,auxiliaryData=sim.getSimulatorMessage()
end
if leftvelocity>MaxVel then
leftvelocity=MaxVel
end
if leftvelocity<-MaxVel then
leftvelocity=-MaxVel
end
if rightvelocity>MaxVel then
rightvelocity=MaxVel
end
if rightvelocity<-MaxVel then
rightvelocity=-MaxVel
end
if upvelocity>MaxVel_gear then
upvelocity=MaxVel_gear
end
if upvelocity<-MaxVel_gear then
upvelocity=-MaxVel_gear
end
--sim.setJointTargetVelocity(left_front_handle,leftvelocity)
sim.setJointTargetVelocity(left_back_handle,leftvelocity)
sim.setJointTargetVelocity(right_back_handle,rightvelocity)
sim.setJointTargetVelocity(gear_down_handle,upvelocity)
--sim.setJointTargetVelocity(right_front_handle,rightvelocity)
end
20210422
修改齒輪長度,增加強度

原本中間一根尺條改成兩旁兩根尺,增加抓力,改善駕駛員視線

成品圖:

修改後成果
程式
function sysCall_init()
left_front_handle= sim.getObjectHandle('left_joint')
left_back_handle= sim.getObjectHandle('left_joint')
right_back_handle= sim.getObjectHandle('right_joint')
right_front_handle= sim.getObjectHandle('right_joint')
gear_up_handle= sim.getObjectHandle('gear_joint')
gear_down_handle= sim.getObjectHandle('gear_joint')
MaxVel=20
MaxVel_gear=30
leftvelocity=0
rightvelocity=0
upvelocity=0
dVel=10;
dVel_gear_up=30;
dVel_gear_dwon=20;
a=13;
--sim.setJointTargetVelocity(left_front_handle,leftvelocity)
sim.setJointTargetVelocity(left_back_handle,leftvelocity)
sim.setJointTargetVelocity(right_back_handle,rightvelocity)
sim.setJointTargetVelocity(gear_down_handle,upvelocity)
--sim.setJointTargetVelocity(right_front_handle,rightvelocity)
end
function sysCall_actuation()
message,auxiliaryData=sim.getSimulatorMessage()
while message~=-1 do
if (message==sim.message_keypress) then
if (auxiliaryData[1]==32) then
leftvelocity=0
rightvelocity=0
upvelocity=0
sim.setJointForce(left_front_handle, 0)
sim.setJointForce(left_back_handle, 0)
sim.setJointForce(right_back_handle, 0)
sim.setJointForce(right_front_handle, 0)
sim.setJointForce(gear_up_handle, 0)
sim.setJointForce(gear_down_handle, 0)
break
else
--sim.setJointForce(left_front_handle, 10000)
sim.setJointForce(left_back_handle, 10000)
sim.setJointForce(right_back_handle, 10000)
sim.setJointForce(gear_down_handle, 10000)
--sim.setJointForce(right_front_handle, 10000)
end
if (auxiliaryData[1]==119) then
-- w key
leftvelocity=leftvelocity+a
rightvelocity=rightvelocity+dVel
end
if (auxiliaryData[1]==115) then
-- s key
leftvelocity=(leftvelocity+rightvelocity)/2
rightvelocity=leftvelocity
leftvelocity=leftvelocity-dVel
rightvelocity=rightvelocity-dVel
end
if (auxiliaryData[1]==97) then
-- a key
leftvelocity=leftvelocity-dVel
rightvelocity=rightvelocity+dVel
end
if (auxiliaryData[1]==100) then
-- d key
leftvelocity=leftvelocity+dVel
rightvelocity=rightvelocity-dVel
end
if (auxiliaryData[1]==100) then
-- d key
leftvelocity=leftvelocity+dVel
rightvelocity=rightvelocity-dVel
end
if (auxiliaryData[1]==2008) then
-- down key
upvelocity=upvelocity+dVel_gear_dwon
end
if (auxiliaryData[1]==2007) then
-- up key
upvelocity=upvelocity-dVel_gear_up
end
end
message,auxiliaryData=sim.getSimulatorMessage()
end
if leftvelocity>MaxVel then
leftvelocity=MaxVel
end
if leftvelocity<-MaxVel then
leftvelocity=-MaxVel
end
if rightvelocity>MaxVel then
rightvelocity=MaxVel
end
if rightvelocity<-MaxVel then
rightvelocity=-MaxVel
end
if upvelocity>MaxVel_gear then
upvelocity=MaxVel_gear
end
if upvelocity<-MaxVel_gear then
upvelocity=-MaxVel_gear
end
--sim.setJointTargetVelocity(left_front_handle,leftvelocity)
sim.setJointTargetVelocity(left_back_handle,leftvelocity)
sim.setJointTargetVelocity(right_back_handle,rightvelocity)
sim.setJointTargetVelocity(gear_down_handle,upvelocity)
--sim.setJointTargetVelocity(right_front_handle,rightvelocity)
end
stage1-bg8 <<
Previous Next >> 檔案下載