Skip to main content

Package to control CTU/CIIRC robots CRS93 and CRS97 via MARS control unit.

Project description

CRS robots control at CTU/CIIRC

Package to control CTU/CIIRC robots CRS93 and CRS97 via MARS control unit.

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

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

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

ctu_crs-1.0.6.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

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

ctu_crs-1.0.6-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file ctu_crs-1.0.6.tar.gz.

File metadata

  • Download URL: ctu_crs-1.0.6.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ctu_crs-1.0.6.tar.gz
Algorithm Hash digest
SHA256 6b722f6f61018cb167e1ad60c1de3a0b7405bcb38027dcf5968165385c104e06
MD5 3d2aa9759a996b718378fc281f452de6
BLAKE2b-256 70c0a93bff1357263db0ad315ed311536aa0e54e9fa13b0e070d52c572036d3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ctu_crs-1.0.6.tar.gz:

Publisher: release.yml on CTURobotics/ctu_crs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ctu_crs-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: ctu_crs-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ctu_crs-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e213d8ac55b141c7119f142b73c105737f8fe5202b39d35d168dc624b836cf5a
MD5 ffdfa91dcd52eff45b43571e49a73b0b
BLAKE2b-256 0b7794e96ed445673993641dcdb5c05a5e58998c6d8278b8a689e6d7d34e2fea

See more details on using hashes here.

Provenance

The following attestation bundles were made for ctu_crs-1.0.6-py3-none-any.whl:

Publisher: release.yml on CTURobotics/ctu_crs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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