Skip to content

ainhoaarnaiz/personable_robotics

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Personable Robotics

Breathing Life Into Machines

Prerequisites

  • ABB robot with Externally Guided Motion [3124-1] option installed.
  • See abb_egm_hello_world for detailed guidance on how to set up real-time control of ABB robots from an external PC.

EGM Server API

Message Address Arg Format Description
/enable bool Toggle follow motion target on/off for all robots.
/motion/reset int Motion target reset for Robot {index}. Reset defaults to a normalized coordinate of (0.5, 0.8, 0,5) within the safety bounds.
/motion/pos int, float, float, float Motion target position {x, y} for Robot {index} (normalized coordinate). World target position is calculated based on the safety bounds.
/motion/rot int, float, float, float Motion target orientation {rx, ry, rz} for Robot {index} (in degrees).
/motion/rot/rx int, float Motion target x-axis rotation {rx} for Robot {index} (normalized range from [0, 1] to [-180, 180] degrees). Other rotation axes set to 0.
/motion/rot/ry int, float Motion target y-axis rotation {ry} for Robot {index} (normalized range from [0, 1] to [-180, 180] degrees). Other rotation axes set to 0.
/motion/rot/rz int, float Motion target z-axis rotation {rz} for Robot {index} (normalized range from [0, 1] to [-180, 180] degrees). Other rotation axes set to 0.
/bounds/pos int, float, float, float Safety bounds position {x, y} of the center of the safety boundary (in meters), relative to the base of Robot {index}. bounds.pos.z value is auto-calculated based on bounds.height to maintain minimum distance from the ground.
/bounds/width int, float Safety bounds width of Robot {index} safety boundary (in meters).
/bounds/height int, float Safety bounds height of Robot {index} safety boundary (in meters).
/bounds/depth int, float Safety bounds depth of Robot {index} safety boundary (in meters).

Templates

The templates folder has basic templates for communicating over OSC to the EGM Server, including Processing, Grasshopper, and TouchOSC.

TouchOSC

TouchOSC is an easy-to-use interface builder that can send and receive OSC messages from multiple sources. It's the quickest way to build your own interactive touch interface on your desktop, phone, or tablet — plus it's supported on nearly every operating system: Windows / macOS / Linux / iOS / Android / RasPi.

We can use TouchOSC to talk to the EGM Sever:

Setup

  1. Download TouchOSC for your platform here.

The desktop version is free.

  1. Open TouchOSC and configure your network settings.

  1. Open a template file in TouchOSC and press the play button to start running the file.
  2. Press the dot in the upper right corner to close the file.

Notes

Processing

Processing is a creative coding platform for sketching with code.

We can use Processing and the third-party library oscP5 to talk to the EGM Sever:

Setup

  1. Download and install Processing.
  2. Download and install oscP5 following these instructions.
  3. Copy controller_template.pde into your Processing Sketchbook.
  4. Configure your network settings:

  1. Press play and run.

Python

Python is a powerful and flexible programming language. We can use Python and the third-party library python-osc to talk to the EGM Server:

Setup

  1. Download and install Python.
  2. Install the python-osc library using pip:
pip install python-osc
  1. Run the controller_template.py script from command line with the following arguments:
python controller_template <ip_address> <port>

Example:

python controller_template "192.168.1.138" 55556

Grasshopper

See example of 2D normalization.

Examples

egm_example_mouse2D

This example updates the position of one robot's motion target when hovering, and enables/disables motion on mousePressed.

egm_example_physics2D

This example updates the position of one robot's motion target based on the position of a physics-enabled box that you can throw around the canvas.

Notes

  • Tested on Processing 4.3, oscP5 0.9.8, and controlP5 2.2.5

About

Breathing Life into Machines

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Processing 71.9%
  • Python 28.1%