Skip to content

hoang-danny05/mecademic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Easy Mecademic Programming for Hyrel

The Process of Robot Programming

  1. Make the robot code with the Mecademic Portal (self explanatory)
    • make a final version that can run the correct part nicely
  2. Convert robot script into python code (see below)
  3. Send it to Danny for review :)

Setup

install mecademicpy (might already be installed)

pip install mecademicpy

Programming the mecademic robot

Any program that's written in the browser or mecademic portal can easily be converted into it's python equivalent
Robot Script (192.168.0.100)

MoveJoints(90,0,0,0,0,0)

This is the equivalent code in the correct location:
EDITTHIS.py

class TemplateClass:
...
    def pressButton(self):
        ##########################################################################################
        # FIRST BLOCK EXECTUED BY main.py
        ##########################################################################################
        self.rbt.MoveJoints(90,0,0,0,0,0)
...

Notes:

  • each method is there only for organization purposes.
  • the __init__(...) method should not have any instructions
  • Yes, all you need to do add "self.rbt." to make it into valid python code

Using the Vacuum Sensor

The vacuum sensor is meant to confirm that a part is either on or off the robot at a specific stage. The two most useful commands are: Python

# Assert that the robot should have a part ON at the moment. Otherwise, the robot will stop movement. 
self.switch.assert_on()
# Asserts that there should be no part on. Same effect as the other method.
self.switch.assert_off()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published