Simple FANUC RMI client
Project description
FANUC RMI Client
Python client for FANUC RMI with reusable functions (no CLI entrypoint).
Install (pip)
python3 -m venv .venv
source .venv/bin/activate
pip install fanuc-rmi
Create Client + Connect
from fanuc_rmi import RobotClient
# create client (no network calls yet)
robot = RobotClient(
host="192.168.1.22",
startup_port=16001,
main_port=16002,
connect_timeout=5.0,
socket_timeout=100.0,
reader_timeout=100.0,
attempts=5,
retry_delay=0.5,
startup_pause=0.25,
)
robot.connect() # returns None
robot.initialize(uframe=0, utool=1) # returns None
Speed Override
# set speed override (controller-specific range)
robot.speed_override(50) # returns None
Linear Relative Motion
# move relative to current pose (mm / deg)
relative_displacement = {"X": 100, "Y": 0, "Z": 0, "W": 0, "P": 0, "R": 0}
robot.linear_relative(relative_displacement, speed=500, sequence_id=1) # mm/sec, returns None
Linear Absolute Motion
# move to absolute pose (mm / deg)
absolute_position = {"X": 491.320, "Y": -507.016, "Z": 223.397, "W": -179.577, "P": 52.380, "R": -93.233}
robot.linear_absolute(absolute_position, speed=300, sequence_id=2) # mm/sec, returns None
Joint Relative Motion
# move joints relative to current (deg)
relative_joints = {"J0": 0, "J1": 0, "J2": 0, "J3": 0, "J4": 0, "J5": 0, "J6": 0, "J7": 0, "J8": 0, "J9": 0}
robot.joint_relative(relative_joints, speed_percentage=40, sequence_id=3) # returns None
Joint Absolute Motion
# move to absolute joint angles (deg)
absolute_joints = {"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}
robot.joint_absolute(absolute_joints, speed_percentage=40, sequence_id=4) # returns None
Read Cartesian Position (writes file)
robot.read_cartesian_coordinates() # returns None
# writes to ./robot_position_cartesian.txt (auto-created)
Read Joint Angles (writes file)
robot.read_joint_coordinates() # returns None
# writes to ./robot_position_joint.txt (auto-created)
Disconnect
robot.close() # returns None
Output Files
robot_position_cartesian.txt: created automatically when reading Cartesian posesrobot_position_joint.txt: created automatically when reading joint poses
Notes
- Requires Python 3.11+.
- If you cloned the repo,
main.pyis a runnable example. - For back-to-back moves, increment
sequence_idto preserve ordering.
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.3.tar.gz.
File metadata
- Download URL: fanuc_rmi-0.1.3.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b61c0dc5dce7b975d46670a3a2f7702b1fd6a692ab07c0a5ed5163bd25d81b97
|
|
| MD5 |
bef49d2d188e07489b876b90a0c83e8c
|
|
| BLAKE2b-256 |
980e3004119c37b615587617fe790bd83b050cf0d69091f1349d1db99719879f
|
File details
Details for the file fanuc_rmi-0.1.3-py3-none-any.whl.
File metadata
- Download URL: fanuc_rmi-0.1.3-py3-none-any.whl
- Upload date:
- Size: 6.8 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 |
000fa2767090b909b900884e25c4f4d1847834ccc9a190d25b323cf58fbf683a
|
|
| MD5 |
959393079e05a2acd1ee64722b33999f
|
|
| BLAKE2b-256 |
437e0944e4e6f905faa5f444fbcdbe86039cc2709f46ccb59932c3b9e885c560
|