Simple FANUC RMI client
Project description
FANUC RMI Client
Simple Python client for FANUC RMI with a small CLI and reusable functions.
Install (pip)
python3 -m venv .venvsource .venv/bin/activatepip 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_displacementhasX, Y, Z, W, P, R(mm/deg);speedis mm/s.linear_absolute(absolute_position, speed)—absolute_positionhasX, Y, Z, W, P, R;speedis mm/s.joint_relative(relative_displacement, speed_percentage)—relative_displacementhasJ0..J9;speed_percentageis % of max.joint_absolute(absolute_position, speed_percentage)—absolute_positionhasJ1..J9;speed_percentageis % 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.pyruns the example.robot_position_cartesian.txtandrobot_position_joint.txtare 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b9b747e3e80521bbfeb3a49122eeaf42bd36b668e2550546785fa029a0d713a
|
|
| MD5 |
3d900496f2f0d2cd03baf0d25520ae84
|
|
| BLAKE2b-256 |
32f6034c4687a3c26d6c2d6554b8fdf939bd5babe931107c983b319b6eed5107
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
843dca77739c3d1ced67f1c15eb558d861a18b6faae750d451375b231a5b9cf7
|
|
| MD5 |
68344a49e5674644ca8d1ca430e2b8e0
|
|
| BLAKE2b-256 |
b0c35e7101744cfd33d590f71e275131631d020f6c21f53f3ab8cd3c34c00f09
|