get_devices()
📖 Method Description
Get the configuration list of all Vitai vision-based tactile sensor devices connected to the computer. This method scans and returns currently available devices.
📝 Syntax
devices = finder.get_devices()
🔧 Parameters
No parameters
📤 Return Type
List[VTSDeviceConfig] - List of device configuration objects
Each VTSDeviceConfig object contains device configuration information that can be used to initialize sensor instances.
💡 Example Code
from pyvitaisdk import VTSDeviceFinder, GF225
# Create VTSDeviceFinder instance
finder = VTSDeviceFinder()
# Get all devices
devices = finder.get_devices()
if devices:
print(f"Found {len(devices)} device(s)")
# Create sensor instance with first device
sensor = GF225(devices[0])
print("Sensor initialized")
sensor.release()
print("Sensor released")
else:
print("No devices found")
⚠️ Notes
Device Connection
If an empty list is returned, please check:
- Whether the sensor is properly connected to the computer
- Whether the USB connection is stable
Best Practices
- Check if the list is empty before using devices
- Recommended to call once at program startup and cache the results
🔗 Related Methods
- VTSDeviceFinder() - Create device finder
- count - Get device count
- get_device_by_sn - Get specific device by serial number