THE ANNIN ROBOTICS FORUM HAS MOVED TO A NEW COMMUNITY. 👉
AR4 (MK2) External ...
 
Notifications
Clear all

AR4 (MK2) External Control through python

9 Posts
5 Users
0 Reactions
112 Views
Avatar of Mrgladeines
(@mrgladeines)
Active Member
Joined: 2 months ago
Posts: 5
Topic starter  

@Chris, first of all I would like to thank you for all the hard work that already went into this magnificent project. I love to play around with this robot.

 

I have no remarks to the provided software whatsoever. It works beautifully, is easy-to-use and provides sufficient functionality for most applications. Yet I am looking for a way to control the robot through Python. Since the provided software is written in Python, I was wondering if someone already took the time to write a Python API (so without GUI) for the robot. I searched the internet, yet could not locate such an API.

 

I seems that RoboDK has created such an API, yet it is not usable apart from their software. Also, ROS2 seems to be an option for external control, yet my current knowledge of ROS2 is very limited, so at this point I would like to stay away from that.

 

The options for external control I am looking for to use are:

  1. Calibrate the robot

  2. Move the robot manually (based on joint angles and or Cartesian coordinates)

  3. Load and execute programs with splines

  4. Optionally, create new programs

 

The reason I would like to externally control the robot is that I wish to control the robot using a PLC which provides an interface to many programming languages like c, c#, Python,...

 

Thanks,

 

Jona



   
Quote
Chris Annin
(@chris-annin)
Member Admin
Joined: 2 months ago
Posts: 535
 

The robot can be controlled through simple serial commands. This video at 4:35 covers that topic

Let me know if that helps.



   
ReplyQuote
Avatar of Mrgladeines
(@mrgladeines)
Active Member
Joined: 2 months ago
Posts: 5
Topic starter  

Thanks Chris,

 

I was already aware of that by looking at your source code and the software. I was hoping someone already did the work of extracting an api out of the source code, which would save me quite a bit of time.

 

I will give it a shot myself. I will keep you posted when I have something that works.

 

Thanks again.



   
ReplyQuote
Avatar of Devinda Dharmawardene
(@devinda-dharmawardene)
Active Member
Joined: 2 months ago
Posts: 8
 

@mrgladeines Hey. That sounds like an awesome idea! I want to do RoboDK style stuff going from 3d model path creation to robot motion for instance. So I am rooting for you! (maybe this already exists in Chris's HMI capabilities. Forgive my ignorance. I'm new! D: )



   
ReplyQuote
Avatar of Mrgladeines
(@mrgladeines)
Active Member
Joined: 2 months ago
Posts: 5
Topic starter  

Hi Chris,

It took me a while to get a first version working. I still call it version 0.1 because the arc anc circle moves are not tested. The joint and linear moves work. It is derived from your application source.

If you have any remarks or suggestions, feel free to respond.

 

You can find the API here:

When Trying, Be sure to include the robot calibration file, called "ARbot.cal" into the project directory, as the API loads the same file.

https://github.com/Jones1403/AR4_PyAPI

Thanks again @chris for all the hard work that went into this project already.

 

This code was only tested on an AR4 MK2, however, I suspect none or only minor issues with other versions.



   
ReplyQuote
Johann Voigtlander
(@johann-voigtlander)
Estimable Member
Joined: 2 months ago
Posts: 87
 

@mrgladeines This looks very interesting. Do you have any videos showing how it works?



   
ReplyQuote
Avatar of ya
 ya
(@ya)
Eminent Member
Joined: 2 months ago
Posts: 22
 

@mrgladeines can you please change license to be more permissive? would be happy to contribute if so. MIT License for example?



   
ReplyQuote
Avatar of Mrgladeines
(@mrgladeines)
Active Member
Joined: 2 months ago
Posts: 5
Topic starter  

@johann-voigtlander

Hello Johann,

 

I'm currently on holiday, away from the robot. I will try and make a video about it when I get back.

 

regards,

 

Jona



   
ReplyQuote
Avatar of Mrgladeines
(@mrgladeines)
Active Member
Joined: 2 months ago
Posts: 5
Topic starter  

@ya

Hello Ya,

 

I asked Chris for his opinion to change the license to an MIT license , as I chose the GPL V3.0 license to be the most closely matched license to the license requests in his source code, without being more permissive.



   
ReplyQuote
Share:
Upload your Photo