Skip to main content

CRS robots control at CTU/CIIRC

Package to control CTU/CIIRC robots CRS93 and CRS97 via MARS control unit. For the complete documentation see https://robotics-robot-stations.readthedocs.io/

Installation

pip install ctu_crs

Command-Line Scripts

This package includes command-line scripts for direct robot control from your terminal.

move_crs93 and move_crs97

After installing the package, you can use the move_crs93 or move_crs97 scripts to move the robot by a relative offset for specified joints.

Usage:

move_crs93 [--nohome] <joint> <angle> [<joint> <angle> ...]
move_crs97 [--nohome] <joint> <angle> [<joint> <angle> ...]

Arguments:

  • <joint> <angle>: One or more pairs of joint names (q0-q5) and their corresponding relative angles in degrees.
  • --nohome: Optional flag to initialize the robot without performing the homing sequence.

Examples:

To move the crs93's first joint (q0) by 10 degrees and the second joint (q1) by -5 degrees:

move_crs93 q0 10 q1 -5

To move the crs97's second joint (q2) by 20.5 degrees without homing the robot first:

move_crs97 --nohome q2 20.5

Simple python script to control the robot

from ctu_crs import CRS93 # or CRS97
robot = CRS93()  # set argument tty_dev=None if you are not connected to robot,
# it will allow you to compute FK and IK offline
robot.initialize()  # initialize connection to the robot, perform hard and soft home
q = robot.get_q()  # get current joint configuration
robot.move_to_q(q + [0.1, 0.0, 0.0, 0.0, 0.0, 0.0])  # move robot all values in radians
robot.wait_for_motion_stop() # wait until the robot stops
robot.close()  # close the connection

Example of Grabbing a Camera Picture

You can easily capture an image from the camera associated with the robot using the robot interface itself. The library handles the camera connection automatically.

from ctu_crs import CRS97 # or CRS93

# Initialize the robot interface
robot = CRS97()
robot.initialize()

# Grab an image from the camera
# This will automatically connect to and open the camera on the first call
img = robot.grab_image()

# 'img' is a NumPy array containing the image data.
# You can now process it, for example, using a library like OpenCV.
if img is not None:
    print(f"Successfully grabbed image with shape: {img.shape}")

# Don't forget to close the connection when you're done
robot.close()

Step-by-Step Procedure for Operating the Robot

  • Power On the Robot Turn on the robot using the red switch on the front panel of the control unit (the switch will light up). Press the yellow Arm Power button (a yellow LED will light up above it).
  • Initialize Communication and Setup in Python Run the following commands to initiate communication and perform necessary setup:
from ctu_crs import CRS93 # or CRS97
robot = CRS93()  # set argument tty_dev=None if you are not connected to robot,
# it will allow you to compute FK and IK offline
robot.initialize()  # initialize connection to the robot, perform hard and soft home
  • Move the Robot After initialization, you can continue with your desired commands for operating the robot.

  • End of Session - Return Robot to Home Position To finish working and return the robot to the home position, execute:

robot.soft_home()
robot.close()  # close the connection

Turn off the robot by switching off the red rocker switch on the front panel.

Accessing the Robot Within the Safety Cage

If you need to work inside the protective cage: Stop the robot (wait until movement stops completely). You can check with:

robot.in_motion()

Run the following command to release the robot:

robot.release()

This will engage the brakes and disconnect feedback. Be cautious, as the robot arm might slightly drop, so avoid performing this command directly above the work surface. Open the cage door (the yellow Arm Power LED will turn off).

Emergency Stop Procedure

If the robot behaves unexpectedly, immediately press the Emergency Stop button (red mushroom-shaped button).

Restoring Operation After Emergency Stop or Working Inside the Cage

Unlock the emergency stop by pressing the blue button on the side of the emergency button, or close the cage door if open. Press the Motion Stop button. Press the yellow Arm Power button (the yellow Arm Power LED will turn on). Resume sending movement commands to the robot. If the motor enters an error state (indicated by a flashing green status LED above the motor’s letter and a red error LED), reset the motor state with:

robot.reset_motors()

Note: Re-homing the robot is not necessary, even after activating the emergency stop or opening the cage door, as long as the control unit is not powered off.

For developers

git clone git@github.com:CTURobotics/ctu_crs.git
cd ctu_crs
uv sync
uv pip install -e ".[dev]"
pre-commit install

Metadata

Release files for ctu-crs 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ctu-crs 1.0.7
File Size Uploaded Provenance Actions
ctu_crs-1.0.7.tar.gz 16.1 kB With provenance Details for ctu_crs-1.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ctu-crs 1.0.7
File Interpreter ABI Platform Actions
ctu_crs-1.0.7-py3-none-any.whl Python 3 none any Details for ctu_crs-1.0.7-py3-none-any.whl

Total release size: 33.0 kB

Release files / ctu_crs-1.0.7.tar.gz

Download URL ctu_crs-1.0.7.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1b854948303a3970f6ba549b7345b6f251a8fbabf63cda5a93baa9451b2c8681
BLAKE2b-256 checksum
How to use checksums
d6e83ffee1bb3d2e9b98ccb63950454d834f7bffc83dcd325d96e047216cb948
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / ctu_crs-1.0.7-py3-none-any.whl

Download URL ctu_crs-1.0.7-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
800837a383ca5a7b849e8950adf4413a26c99f60ad8a33aa1c5b5e3490e78a54
BLAKE2b-256 checksum
How to use checksums
661bf0c7462dec960c47d1d8ae872251bf1e97e317fbccdbacb65a3d027c29a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Security for ctu-crs 1.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ctu_crs-1.0.7.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page