2021-協同產品設計實習-stage3-bg6

  • Home
    • Site Map
    • reveal
    • blog
  • About
  • 機械手臂
    • 繪圖成果
    • 計算角度
  • 程式模擬
    • W10
    • W11
  • CoppliaSim程式模擬
    • CoppeliaSim 教學
      • 軸的旋轉教學
      • 直線運動教學
      • 1-單軸直線運動
      • 2-可變速之旋轉運動
      • 3-遙控攝影小汽車
      • CODE 指令解說
      • remoteApi python 指令對照
      • 機械手臂設定範例
      • 按鍵控制代碼
    • 架設場景
      • 對軸進行旋轉控制
      • 對方快進行XYZ軸控制
      • 物件螺旋運動
      • 3D列印機_控制噴嘴
      • 3D列印機_自動繪製
      • 3D列印機_控制高度
      • 衝擊試驗機
      • 架設機械手臂場景
      • 機械手臂場景微調
      • 機械手臂場景路徑控制
    • W13 Pick and Place
      • remoteApi
      • 0526更新
      • 舊版本
    • 尋找控制代碼
    • 控制解說
    • 0513 機械手臂新增夾爪控制
    • 0511 Programming in C++
    • 參考資料
    • 舊資料
      • 0511 Programming in Lua on multiple program
      • 0511 Programming in Lua in One program
  • task2-remoteAPI
    • 機械手臂多人對戰
    • 自動吹笛子機
    • 3D列印機
    • W13 Pick and Place remoteApi
      • 0601
      • 0524
    • remoteAPI in C++
      • 0511
      • 0512
      • 0512-2
    • remoteAPI in python
      • 0513-1
      • 0517
    • remoteApi in Lua
      • 0513-2
  • stage3
    • task
      • task1
    • 每週進度影片
      • 第九週
      • 第十週
      • 第十一週
      • 第十二週
      • 第十三週
    • 討論
      • discord
      • 第一次討論
      • 第二次討論
      • 第三次討論
      • 第四次討論
      • 第五次討論
    • 遇到的問題
      • 更新出錯
      • 倉儲帳號被鎖
    • 小組直播影片
      • 第11週
      • 第12週
      • 第13週
  • W15
    • 影片字幕整理
物件螺旋運動 << Previous Next >> 3D列印機_自動繪製

3D列印機_控制噴嘴

控制:

上下左右控制噴頭的上下左右

空白鍵往上

C鍵往下

圖檔下載

3D print.ttt

程式參考

function sysCall_init()
    joint01=sim.getObjectHandle('X')
    joint02=sim.getObjectHandle('Y')
    joint03=sim.getObjectHandle('Z')
    set=0
    set1=0
    set2=0
    s=0.005
end

function sysCall_actuation()
    -- put your actuation code here
    message,auxiliaryData=sim.getSimulatorMessage()
    while message~=-1 do
        if (message==sim.message_keypress) then
            if (auxiliaryData[1]==2009) then
                set=set+s
                sim.setJointTargetPosition(joint01,set)
                print(sim.getJointPosition(joint01))
            end
            if (auxiliaryData[1]==2010) then
                set=set-s
                sim.setJointTargetPosition(joint01,set)
            end
            if (auxiliaryData[1]==2007) then
               set1=set1+s
               sim.setJointTargetPosition(joint02,set1)
            end
           if (auxiliaryData[1]==2008) then
              set1=set1-s
              sim.setJointTargetPosition(joint02,set1)
            end
            if (auxiliaryData[1]==32) then
               set2=set2+s
               sim.setJointTargetPosition(joint03,set2)
            end
           if (auxiliaryData[1]==99) then
              set2=set2-s
              sim.setJointTargetPosition(joint03,set2)
            end
        end
    message,auxiliaryData=sim.getSimulatorMessage()
    end
end


物件螺旋運動 << Previous Next >> 3D列印機_自動繪製

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