Temas Socket API for controlling and communicating with Temas devices
Project description
Rubu Tech – Temas Socket API
Overview
This Python package provides an intuitive API to control and communicate with Temas hardware devices via TCP/IP socket communication. It is particularly suitable for laboratory robotic systems, environments, test setups, and other precise positioning or sensing scenarios.
Features
- TCP/IP socket communication to Temas devices
- Distance measurement (laser sensor)
- Precise pan and tilt positioning
- Real-time camera stream (visual and ToF)
- Easy-to-use object-oriented API
- Built-in threading support for camera streams
- Point cloud scanning
- Adjustable camera settings (exposure time, brightness, saturation, contrast, gain, lens position)
Installation
Install via pip:
pip install rubu
Usage
Extended Example: Query distance, positioning, camera stream, and additional features
import cv2
from rubu import temas
# Connect to the device (via hostname or IP address)
device = temas.Connect(hostname="temas")
# Alternatively: device = temas.Connect(ip_address="192.168.4.4")
# Initialize control class
control = temas.Control()
# Measure distance (laser, in cm)
distance = control.distance()
print(f"Measured distance: {distance} cm")
# Move to a specific position (Pan, Tilt)
control.move_pos(60, 30)
# Initialize camera (Visual Port: 8081, ToF Port: 8084)
camera = temas.Camera(port=8081)
camera.start_thread()
# Adjust camera settings
camera.set_exposure_time(32000)
camera.set_brightness(50)
camera.set_contrast(3)
while True:
try:
frame = camera.get_frame()
if frame is not None:
cv2.imshow('Visual Camera', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
print("Exiting camera stream...")
break
except Exception as e:
print(f"Error retrieving camera frame: {e}")
# Reset camera and control
control.move_home()
camera.stop_thread()
cv2.destroyAllWindows()
print("Program terminated.")
Contact
For more information, visit https://rubu-tech.de
or contact us via email: info@rubu-tech.de
Project details
Release history Release notifications | RSS feed
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 rubu-0.0.19.tar.gz.
File metadata
- Download URL: rubu-0.0.19.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
112a13281f6179c524ac9e0910c3802a082b745c97f0fc9a5f873af350d4f4ec
|
|
| MD5 |
6a57933d43e736857a94a6b45a36b1b1
|
|
| BLAKE2b-256 |
2ee328de168249e6334eda6505b6906fc8db226e58e19735f2b3ff0786f67488
|
File details
Details for the file rubu-0.0.19-py3-none-any.whl.
File metadata
- Download URL: rubu-0.0.19-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3f5ade927dbc29a660e742a0d8f384df33ea8a66b4846b571e80cf3dd94c057
|
|
| MD5 |
599c14c5525870cfb5277b167ec557f7
|
|
| BLAKE2b-256 |
16d6ee35b774f0c27c26f07a505742cbed8f15c5f3020df026202715495732e6
|