Skip to main content

Simple FANUC RMI client

Project description

FANUC RMI Client

Simple Python client for FANUC RMI with a small CLI and reusable functions.

Install (pip)

  1. python3 -m venv .venv
  2. source .venv/bin/activate
  3. pip install fanuc-rmi

Note: pip install fanuc-rmi works once this package is published to PyPI. If you want, I can add the publish steps.

Basic Use (RobotClient)

from fanuc_rmi import RobotClient

client = RobotClient(
    host="192.168.1.22",
    socket_timeout=100.0,
    reader_timeout=100.0,
)

client.connect()
client.initialize(uframe=0, utool=1)

absolute_position = {"J1": 63.252, "J2": 31.488, "J3": -35.602, "J4": 18.504, "J5": -101.313, "J6": 108.650, "J7": 0.000, "J8": 0.000, "J9": 0.000}
client.joint_absolute(absolute_position, speed_percentage=40)

client.close()

Functions

  • RobotClient.connect() / RobotClient.close()
  • RobotClient.initialize(uframe=0, utool=1)

Motions (RobotClient)

  • linear_relative(relative_displacement, speed)relative_displacement has X, Y, Z, W, P, R (mm/deg); speed is mm/s.
  • linear_absolute(absolute_position, speed)absolute_position has X, Y, Z, W, P, R; speed is mm/s.
  • joint_relative(relative_displacement, speed_percentage)relative_displacement has J0..J9; speed_percentage is % of max.
  • joint_absolute(absolute_position, speed_percentage)absolute_position has J1..J9; speed_percentage is % of max.

Reads (RobotClient)

  • read_cartesian_coordinates(output_path="./robot_position_cartesian.txt") — appends a formatted Cartesian pose line; file auto-created.
  • read_joint_coordinates(output_path="./robot_position_joint.txt") — appends a formatted joint pose line; file auto-created.
  • request_current_position() — returns the raw response dict.

Lower-Level Imports You can also import specific functions if you prefer:

from fanuc_rmi import joint_absolute, linear_relative

Notes

  • Requires Python 3.11+.
  • main.py runs the example.
  • robot_position_cartesian.txt and robot_position_joint.txt are created automatically when you read positions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fanuc_rmi-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fanuc_rmi-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file fanuc_rmi-0.1.0.tar.gz.

File metadata

  • Download URL: fanuc_rmi-0.1.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for fanuc_rmi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7b9b747e3e80521bbfeb3a49122eeaf42bd36b668e2550546785fa029a0d713a
MD5 3d900496f2f0d2cd03baf0d25520ae84
BLAKE2b-256 32f6034c4687a3c26d6c2d6554b8fdf939bd5babe931107c983b319b6eed5107

See more details on using hashes here.

File details

Details for the file fanuc_rmi-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fanuc_rmi-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for fanuc_rmi-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 843dca77739c3d1ced67f1c15eb558d861a18b6faae750d451375b231a5b9cf7
MD5 68344a49e5674644ca8d1ca430e2b8e0
BLAKE2b-256 b0c35e7101744cfd33d590f71e275131631d020f6c21f53f3ab8cd3c34c00f09

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page