1
0
Fork 0
A suite of software useful in experimenting with small robotic arms. Use as a teaching framework with a low barrier to entry for robotics and programming.
Go to file
Kevin Matz a2c58dcb51 include an python activity example 2019-07-31 08:54:03 -04:00
firmware/armCtl reset index on message begin 2019-07-30 13:49:51 -04:00
.gitignore initial commit 2019-07-29 23:43:48 -04:00
ArmControl.g4 lower case commands 2019-07-30 10:26:05 -04:00
ArmControlLexer.py lower case commands 2019-07-30 10:26:05 -04:00
ArmControlListener.py scripting language 2019-07-29 23:45:16 -04:00
ArmControlParser.py lower case commands 2019-07-30 10:26:05 -04:00
ArmCtlListener.py let movements accumulate before initiating a move 2019-07-31 08:25:11 -04:00
LICENSE.md initial commit 2019-07-29 23:43:48 -04:00
README.md include an python activity example 2019-07-31 08:54:03 -04:00
activity_2.txt activity 2 example script 2019-07-31 08:41:59 -04:00
activity_3.py include an python activity example 2019-07-31 08:54:03 -04:00
armCtl.py parse files line-at-a-time 2019-07-31 08:41:34 -04:00
robot.cfg slow down the serial port 2019-07-30 10:12:26 -04:00
robot.py catch serial port disconnects in read worker 2019-07-30 15:01:33 -04:00

README.md

armCtl

Summary

A suite of software useful in experimenting with small robotic arms. Use as a teaching framework with a low barrier to entry for robotics and programming.

History

Whilst an expansive scope, the principal development and implementation happened over 3 days in the summer of 2019.

Software Components

  1. An Arduino firmware to recieve commands and position the robot arm.
  • firmware/armCtl/armCtl.ino
  1. A streaming serial command & control protocol to communicate with the Arduino from a computer.
  2. A Python3 module that is a threaded serial reader/writer, and state machine for the arm.
  • robot.py
  1. An Antlr4 domain-specific scripting language for maneuvering the robot.
  • ArmControl.g4
  1. A Python3 implementation of that language for the Robot module.
  • ArmCtlListener.py
  1. A Python3 module to interface the scripting language to the robot module. When called directly, this module also provides an interactive shell for the scripting language.
  • armCtl.py

Hardware Components

This BOM is one possible configuration. Substitute parts are available, and any servo controlled arm is acceptable.

Part Cost
Arduino Uno $22
Arduino Sensor Shield V5 $7.19
Power Supply 25W 5V 5A $9.50
6-Axis Desktop Robotic Arm $170

Activities

  • Control the arm interactively.
> ./armCtl.py
command# go jib 90
command# wait
command# go home
  • Script a simple sequence of moves.
# my_script.txt
go jib 90
wait
go home

> ./armCtl.py my_script.txt
  • Write a Python3 script for complex movements.
#!/usr/bin/env python3
import armCtl as arm

command("go home")

arm.r.target = [90, 120, 10, 95, 90, 90]
arm.r.move()
while arm.r.isMoving():
    pass
print(arm.r.angle)