armctl

Agnostic Robotic Manipulator Controller (armctl)

https://github.com/mgross21/armctl

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.3%) to scientific vocabulary

Keywords

agnostic context-manager dobot elephant-robotics fanuc jaka plc robot-controller serial socket templete universal-robotics vention
Last synced: 6 months ago · JSON representation ·

Repository

Agnostic Robotic Manipulator Controller (armctl)

Basic Info
Statistics
  • Stars: 6
  • Watchers: 1
  • Forks: 0
  • Open Issues: 5
  • Releases: 6
Topics
agnostic context-manager dobot elephant-robotics fanuc jaka plc robot-controller serial socket templete universal-robotics vention
Created 12 months ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License Citation

README.md

armctl

Python Version License Downloads

A unified Python interface for controlling a variety of industrial and hobbyist robots from different manufacturers.

Supported Manufacturers & Robot Series

The armctl library currently supports the following manufacturers and robot models:

Universal Robots Vention Elephant Robotics
UR3, UR5, UR5e, UR10, UR16 7th Axis Plate myCobot Pro600
UR5 Vention Plate Elephant myCobot Pro600

Want to see your robot supported?
Open an issue or contribute a pull request!

Quick Start

Installation

From PyPI:

bash pip install armctl

From GitHub:

bash pip install git+https://github.com/MGross21/armctl.git

Importing the Library

python from armctl import *

Note:
For improved runtime performance and clarity, you may import specific manufacturers and robot series directly.

Simple Example with Manufacturer Defaults

python with Manufacturer("ROBOT_IP_ADDRESS") as robot: robot.move_joints([...]) robot.get_joint_positions() robot.move_cartesian([...]) robot.get_cartesian_position(...) robot.sleep(...) robot.get_robot_state()

Simple Example with Specific Robot Series

python with RobotSeries("ROBOT_IP_ADDRESS") as robot: robot.home() robot.move_joints([...]) robot.get_joint_positions() robot.move_cartesian([...]) robot.get_cartesian_position() robot.sleep(...) robot.get_robot_state()

Multi-Robot Control

UR5 on Vention Plate

```python with ( Robot1("ROBOT1IPADDRESS") as r1, Robot2("ROBOT2IPADDRESS") as r2, ): r1.home() r2.home()

r1.move_joints([...])
r2.move_joints([...])

```

Tip:
For more precise and synchronous control of two or more robots, it is recommended to manage each robot within its own thread or process.

Multithread Control

Replicating the prior example,

```python import threading

def controlrobot(robot, ip): with robot(ip) as r: r.home() r.movejoints([0] * r.DOF)

threads = [ threading.Thread(target=controlrobot, args=(Robot1, "ROBOT1IP")), threading.Thread(target=controlrobot, args=(Robot2, "ROBOT2IP")) ]

for t in threads: t.start() for t in threads: t.join() ```

API Reference

Note:
The API has been designed for maximum compatibility across supported robots. Additional commands, such as gripper controls and other advanced features, are planned for future releases to further expand functionality.

Control Template

The following methods are available to users of the library to control various supported robots.

| Method Name | Description | |------------------------------|-----------------------------------------------------------------------------| | move_joints(pos) | Move the robot to specified joint positions. | | get_joint_positions() | Retrieve the current joint positions of the robot. | | move_cartesian(pose) | Move the robot to a specified Cartesian pose. | | get_cartesian_position() | Retrieve the current Cartesian position of the robot. | | stop_motion() | Stop all robot motion immediately. | | get_robot_state() | Retrieve the current state of the robot. | | sleep(seconds) | Pause execution for a specified number of seconds. | | home()
(Available only for specific robot series, not for generic manufacturer control) | Move the robot to its home position. |

Robot Homing Behavior The "home" position refers to a predefined, manufacturer-specific pose that is safe and repeatable for initialization and calibration. ```txt⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⢀⢠⢰⢡⢣⢢⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⢀⡶⣿⣺⢜⡜⡜⡜⡜⡜⡔⡄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠈⢯⣯⡿⣗⣕⡗⡵⡱⡱⡱⡱⡱⡱⡠⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⣻⢾⣿⠱⣲⢫⢞⢵⣳⡵⡱⣱⣵⣻⣟⣿⢶⡤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⢽⣟⣿⢘⣯⣿⡕⢹⢺⡽⡕⣯⣿⢷⢿⣽⣟⡿⡳⡠⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⣻⣽⢿⢨⣷⢿⡇⠀⠀⠈⠣⢟⡷⡽⢽⡾⣅⢇⢇⢇⢇⢇⢆⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⣺⡿⣿⠰⣿⣻⡇⠀⠀⠀⠀⠀⠉⠛⢟⠿⣻⣯⡾⣜⢜⢜⢜⢜⢜⢔⢄⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⣺⣟⣿⠸⣯⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠈⠛⠿⣷⢷⣕⣕⡵⣵⣟⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⣺⡿⣯⢎⢭⢓⢇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢙⣿⣾⣻⢷⢿⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⢠⣟⣿⣿⢸⢸⢸⢸⢸⢰⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠰⣿⣽⣳⢣⣿⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⣤⡾⣯⣻⡾⣏⡮⣪⢪⢪⢪⢪⢲⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣯⣟⡷⣿⣽⣦⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⢸⣷⢿⣽⢽⡻⡣⣣⢷⡣⡇⡇⡇⣇⡿⡇⠀⠀⠀⠀⠀⠀⠀⢀⣿⢾⣽⡿⢛⣷⢿⡇⠀⠀⠀⠀ ⠀⠀⠀⠀⢸⣾⢿⡽⣯⡿⣵⢧⡫⡕⣇⣧⣗⣿⣻⡇⠀⠀⠀⠀⠀⠀⠀⣞⣯⣿⠁⠀⢐⣟⣿⡇⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⣹⢿⣻⣯⡿⣯⣟⣯⣿⣽⡷⣿⣽⡫⠀⠀⠀⠀⠀⠀⠀⠀⣯⣟⣾⠀⠀⠀⠋⠻⠃⠀⠀⠀⠀ ⠀⠀⠀⠀⢠⢮⢺⡱⡫⡟⡯⣻⢝⢗⡟⣝⢝⢼⢸⡄⠀⠀⠀⠀⠀⠀⠀⢯⣿⣽⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⢸⣗⡵⡣⡏⣞⢜⡕⡗⣝⢼⢪⡺⣱⢽⡇⠀⠀⠀⠀⠀⠀⠀⠈⠈⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠘⢯⡿⣾⣳⢵⣝⣼⣱⣣⢯⣞⣾⣽⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠉⠻⠻⢿⢾⡷⣿⣽⢟⠿⠓⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ```

Standard Units

All inputs and outputs use these standard units:

| Type | Unit | | ---------------------- | ------------------------ | | Joint Angle | radians | | Cartesian Position | meters ([x, y, z]) | | Cartesian Rotation | radians ([rx, ry, rz]) |

Connection Template

The following methods facilitate explicit connection management and low-level command execution. These are primarily intended for advanced scenarios, such as when not using Python's with/as context manager or when sending custom commands outside the standard API. Use with caution.

| Method Name | Description | |------------------------------|------------------------------------------------------------------| | connect() | Establish a connection to the robot controller. | | disconnect() | Close the connection to the robot controller. | | send_command(cmd) | Send a low-level command to the robot controller. |

Properties Template

The properties template exposes key robot class attributes as variables, allowing you to query important specifications programmatically. These include:

| Property Name | Description | |--------------------------|--------------------------------------------------| | JOINT_RANGES | List of allowed ranges for each joint (radians). | | DOF | Number of degrees of freedom (joints). | | MAX_JOINT_VELOCITY | Maximum joint velocity (radians/second). | | MAX_JOINT_ACCELERATION | Maximum joint acceleration (radians/second²). |

Graphical Overview

Below is a high-level diagram illustrating the architecture of the armctl library. This design emphasizes the careful templatization of connection and control APIs, ensuring a consistent and extensible interface across different manufacturers and robot series.

Template Overview

System Logging

By default, the library will show the outgoing commands and incoming data. An example can be seen below:

console 2025-02-12 13:18:11,350 - INFO - Connected to ElephantRobotics(192.168.1.159:5001)(SEND/RECV) 2025-02-12 13:18:11,351 - SEND - Sending command: power_on() 2025-02-12 13:18:11,954 - RECV - Received response: [ok] 2025-02-12 13:18:11,954 - SEND - Sending command: state_on() 2025-02-12 13:18:12,647 - RECV - Received response: [ok] 2025-02-12 13:18:12,647 - SEND - Sending command: get_angles() 2025-02-12 13:18:12,663 - RECV - Received response: get_angles:[0.290562,-95.891321,-74.804509,-162.949219,1.845703,12.041016] 2025-02-12 13:18:12,663 - SEND - Sending command: task_stop() 2025-02-12 13:18:13,466 - RECV - Received response: [ok] 2025-02-12 13:18:13,466 - SEND - Sending command: state_off() 2025-02-12 13:18:14,176 - RECV - Received response: [ok] 2025-02-12 13:18:14,176 - SEND - Sending command: power_off() 2025-02-12 13:18:14,176 - RECV - Received response: [ok] 2025-02-12 13:18:14,176 - INFO - Disconnected from ElephantRobotics

Disabling Logging

To disable logging in your Python code:

python from armctl import Logger Logger.disable()

Or, set the environment variable before running your script:

bash export ARMCTL_LOG=0

Re-Enabling Logging

To re-enable logging in your code:

python Logger.enable()

Or, remove the environment variable in your shell:

bash unset ARMCTL_LOG

Under Development

  • JAKA
    • Models: Zu 5
  • Dobot
    • Models: Magician Lite

Future Development

  • FANUC
    • Models: LR Mate 200iD Series
  • More manufacturers and robot series will be supported in future releases.

Contributing

Please feel free to submit a pull request or open an issue for any enhancements or bug fixes. See CONTRIBUTING for more details.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Notice

This package automatically installs the Universal Robots RTDE Python Client Library when needed.
The RTDE library is provided by Universal Robots and is subject to their licensing terms.

Owner

  • Name: Michael Gross
  • Login: MGross21
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
title: "armctl"
message: "If you use this software in your research, please cite it using the following reference."
authors:
  - family-names: "Gross"
    given-names: "Michael"
    email: "MGross21@users.noreply.github.com"
version: "0.3.3"
date-released: "2025-03-09"
license: "MIT"
url: "https://github.com/MGross21/armctl"
abstract: |
  armctl is a unified Python interface for controlling a variety of industrial and hobbyist robots from different manufacturers.

GitHub Events

Total
  • Create event: 15
  • Issues event: 12
  • Release event: 4
  • Watch event: 5
  • Delete event: 9
  • Issue comment event: 12
  • Push event: 79
  • Pull request review comment event: 1
  • Pull request review event: 2
  • Pull request event: 20
Last Year
  • Create event: 15
  • Issues event: 12
  • Release event: 4
  • Watch event: 5
  • Delete event: 9
  • Issue comment event: 12
  • Push event: 79
  • Pull request review comment event: 1
  • Pull request review event: 2
  • Pull request event: 20

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 4
  • Total pull requests: 12
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 day
  • Total issue authors: 2
  • Total pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 4
  • Pull requests: 12
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 day
  • Issue authors: 2
  • Pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ssvision (2)
  • MGross21 (2)
Pull Request Authors
  • MGross21 (11)
  • Copilot (1)
Top Labels
Issue Labels
enhancement (1) bug (1) help wanted (1)
Pull Request Labels
bug (1) enhancement (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 156 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 1
pypi.org: armctl

Agnostic Robotic Manipulator Controller (armctl)

  • Homepage: https://github.com/MGross21/armctl
  • Documentation: https://armctl.readthedocs.io/
  • License: MIT License Copyright (c) 2025 Michael Gross Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 0.3.3
    published 6 months ago
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 156 Last month
Rankings
Dependent packages count: 8.7%
Stargazers count: 24.9%
Average: 28.5%
Forks count: 31.0%
Dependent repos count: 49.2%
Maintainers (1)
Last synced: 6 months ago

Dependencies

pyproject.toml pypi