Robotic arm
In the last two years or so, I started learning about 3D printing and coding various microcontrollers. The ultimate purpose is to bring these into STEM education and promote maker culture in schools. Last year in 2019, I started a MakerClubQUT and began documenting various maker projects. End of 2019, I started building my first simple robotic arm and thought about the 3D rotations for the robotic arm to reach any particular location in space. I thought that I might try coding a virtual robotic arm in VRMath2, and here it is.
This virtual robotic arm is in a continuous animation, and could be easily modified with some sliders to control the 4 rotations in it. To achieve the movement, I used cascading TRANSFORMs and apply simple SPIN or ORIENT for the arm to move. Below are the codes to create this virtual robotic arm in VRMath2 Editor.
; Robotic arm ; By Andy (2020) CS RESET TRANSFORM MAKE "roboarm OBJECT SETPARENT :roboarm SETSCALE 1 .5 1 CYLINDER SELECT OBJECT SETIT 3 26 DESELECT UP 0.3 ; upper arm SETMAT 0 25 SETSCALE 1 1 1 TRANSFORM MAKE "upperarm OBJECT SETPARENT :upperarm ; preparing upperarm movement COLLECTORI "upperarm_movement RD 60 RU 60 RU 60 RD 60 ENDCOLLECT "upperarm_movement SETSCALE .5 .5 .5 BALL UP 0.5 EAST .15 SETSCALE .1 1 .2 BOX WEST .3 BOX EAST .15 UP 0.5 ; lower arm SETMAT 0 21 SETSCALE 1 1 1 TRANSFORM MAKE "lowerarm OBJECT SETPARENT :lowerarm ; preparing lowerarm movement COLLECTORI "lowerarm_movement RD 120 RU 120 RU 120 RD 120 ENDCOLLECT "lowerarm_movement SETSCALE .5 .5 .5 BALL UP 0.5 EAST .15 SETSCALE .1 1 .2 BOX WEST .3 BOX EAST .15 UP 0.5 ; wrist SETMAT 0 8 SETSCALE 1 1 1 TRANSFORM MAKE "wrist OBJECT SETPARENT :wrist SETSCALE .5 .5 .5 BALL SELECT OBJECT SETIT 2 31 DESELECT UP .3 CONE SELECT OBJECT SETIT 2 31 DESELECT ; make it move SPIN :roboarm "lt 20 ORIENT :upperarm :upperarm_movement 10 ORIENT :lowerarm :lowerarm_movement 15 SPIN :wrist "lt 8
I am still wondering how a robotic arm is controlled and commanded to perform tasks. Certainly some robotic arms have sensors to tell distance, colours, and even visual imagery processing. In this virtual robotic arm, I am interested in pointing to a particular point with its tip in its reach. The mathematics seems complex so I will leave to future work when I got time to work it out. (Note: I have made another virtual robotic arm with controls. Click on this link to play.)
Please leave a comment if you have any tips for robotic arm movment. :-)
Files: robotic_arm.x3d | robotic_arm.logo
- Andy's blog
- Login or register to post comments
- 6654 reads