40923221 - 2021 Fall 電腦輔助設計實習 作業網站

  • Home
    • Site Map
    • reveal
    • blog
  • About
  • Task
    • hwpages
    • 倉儲連結
    • run
    • python URL
  • HW1
    • Solidworks
      • SolidWorks 安裝配置
      • Solidwork 操作流程
    • Inventor
      • Inventor 安裝配置
      • Inventor 操作流程
    • 運動場景
    • W13
      • HW13-1
      • HW13-2
      • HW13-3
      • 心得
  • HW1-1
  • W11
    • Inventor 繪圖
    • Solidworks 繪圖
    • 場景運動
  • W12
  • HW2
  • HW3
  • 學期總整理
  • Final Project
  • 期末考試
Final Project << Previous

期末考試

Solidwork 檔案下載:按這裡


Inventor 檔案下載:按這裡

40923221_final.zip


繪圖過程


meArm Robot.ttt:按這裡

UI內容(上下的移動因為頭太重,下去太多會抬不起來,所以角度有減少)

function closeEventHandler(h)
    sim.addLog(sim.verbosity_scriptinfos,'Window '..h..' is closing...')
    simUI.hide(h)
end
 
function joint1_rotate(ui,id,newVal)
    simUI.setLabelText(ui,3000,'theta1 set to '..newVal)
    sim.setJointTargetPosition(joint1, newVal*deg)
end
 
function joint2_rotate(ui,id,newVal)
    simUI.setLabelText(ui,3000,'theta2 set to '..newVal)
    sim.setJointTargetPosition(joint2, newVal*deg)
end
 
function joint3_rotate(ui,id,newVal)
    simUI.setLabelText(ui,3000,'theta3 set to '..newVal)
    sim.setJointTargetPosition(joint3, newVal*deg)
end
 
function joint16_rotate(ui,id,newVal)
    simUI.setLabelText(ui,3000,'theta16 set to '..newVal)
    sim.setJointTargetPosition(joint16, newVal*deg)
end

function sysCall_init()
    -- do some initialization here
    joint1 = sim.getObjectHandle('one')
    joint2 = sim.getObjectHandle('two')
    joint3 = sim.getObjectHandle('three')
    joint16 = sim.getObjectHandle('four')
    i = 0
    deg = math.pi/180
    print(i)
    xml = [[
<ui closeable="true" on-close="closeEventHandler" resizable="true">
    <label text="This is a demo of the CustomUI plugin. Browse through the tabs below to explore all the widgets that can be created with the plugin." wordwrap="true" />
    <tabs>
        <tab title="Numeric">a
            <label text="Sliders can be oriented horizontally or vertically, and have optional properties that can be set (in the XML) such as minimum and maximum value." wordwrap="true" />
            <label text="" id="3000" wordwrap="true" />
            <label text="roll" /> <hslider tick-position="above" tick-interval="1"
            minimum="-180" maximum="180" on-change="joint1_rotate" />
            <label text="high" /> <hslider tick-position="above" tick-interval="1"
            minimum="-30" maximum="65" on-change="joint2_rotate" />
            <label text="head" /> <hslider tick-position="above" tick-interval="1"
            minimum="-35" maximum="25" on-change="joint3_rotate" />
            <label text="Paw" /> <hslider tick-position="above" tick-interval="1"
            minimum="0" maximum="15" on-change="joint16_rotate" />
        </tab>
    </tabs>
</ui>
]]
    ui=simUI.create(xml)
     
end

心得:過程中遇到很多的問題,像是原本想使用coppeliasim直接做旋轉,但是因為孔位的問題所以沒有對正,後面選擇使用SOLIDWORK的組合圖將其完成,而UI使用先前的UI進行修改完成。


Final Project << Previous

Copyright © All rights reserved | This template is made with by Colorlib