Skip to main content

a simple interface package for aimooe AP-200.

Project description

py_ap200_simple_interface

a simple interface package for aimooe AP-200.

Installation

[!WARNING] This package can only be installed under windows10/11 and x86-64 ISA.

pip install py_ap200_simple_interface

Usage

from py_ap200_simple_interface import AimooeExtDrive, I_ConnectionMethod

# Initialize AimooeExtDrive
drive = AimooeExtDrive()

# Connect Methods
# Select from I_USB, I_ETHERNET and I_WIFI
connect_method = I_ConnectionMethod.I_WIFI

# USB:
if connect_method == I_ConnectionMethod.I_USB:
    drive.connect(I_ConnectionMethod.I_USB)

# Ethernets:
#     An IP address should be given for ethernet connection
#     before connecting device with ethernet, you need to confirm that
#     your ethernet adaptor is in the same IP address segment with the device
#     and shutdown all proxy service on your computer which may affect the connection
if connect_method == I_ConnectionMethod.I_ETHERNET:
    drive.connect(I_ConnectionMethod.I_ETHERNET, "192.168.1.10")

# Wifi:
#     The wifi name of Aimooe Device is `AimPosition-XXXXXX`
#     The password of that wireless connection is `aimooe8888`
if connect_method == I_ConnectionMethod.I_WIFI:
    drive.connect(I_ConnectionMethod.I_WIFI)

# Some basic information
print(drive.get_connect_method())
print(drive.get_device_type())
print(drive.get_ip_address())
print(drive.get_manufacture_info())
print(drive.get_physical_address())

# BONE-1 is a sample specific tool
# path and toolname should not contain special characters
print(drive.get_specific_tool_info("./py_ap200_simple_interface/AimooeExt/AimToolsSample/", ["BONE-1"]))

# You can reconnect after disconnect
# After disconnect, you must reconnect before next use
drive.disconnect()

Return value of drive.get_specific_tool_info

  • _ToolPath: The selected tool folder.
  • _DiscretePoints: The discrete points which do not lie in any tool listed.
  • _TimeCost: The length of time between the begin and end of the device call.
  • <tool_name>: Gives the specific infomation of a tool.
    • MeanError and RMSError: Error for markers.
    • Origin: The translation vector from tool space to camera space.
      • i.e. The position of gravity point of markers in camera space, if your tool file is generated by aimooe system.
    • Tooltip: If tooltip is defined, it shows the coordination of tooltip, otherwise the same as Origin.
    • rMatrix: The rotation matrix from tool coordination to camera coordination.
    • qRotation: Quaternion form in order $(x, y, z, w) = w + xi + yj + zk$ of the rotation matrix .
    • MarkerCoordinates: The marker coordinates (in camera space) in this tool.
{
	'_ToolPath': './py_ap200_simple_interface/AimooeExt/AimToolsSample/\\', 
	'BONE-1': {
		'MeanError': 0.1138331070542336, 
		'RMSError': 0.0003674850158859, 
		'Origin': [-137.575927734375, 120.42643737792969, 793.1155395507812], 
		'Tooltip': [-137.575927734375, 120.42643737792969, 793.1155395507812], 
		'Rotation': [2.061613082885742, 1.6536511182785034, -0.4304990470409393], 
		'qRotation': [0.7492992877960205, 0.601024329662323, -0.1564661413431168, 0.2298665046691895], 
		'rMatrix': [
			[0.2285761088132858, 0.9726269245147705, 0.0418308153748512], 
			[0.828761637210846, -0.1718621850013733, -0.5325575470924377], 
			[-0.5107907056808472, 0.1563977003097534, -0.8453594446182251]
		], 
		'MarkerCoordinates': {
			'0': [-132.94031926182967, 137.4289669332182, 782.6069181107938], 
			'1': [-164.12739196778332, 120.93405919807722, 791.4971644346351], 
			'2': [-115.37230320753432, 126.89401508498568, 790.1637162115628], 
			'3': [-137.8636773243661, 96.44871350623225, 808.1944560570211]
		}
	}, 
	'_DiscretePoints': {
		'0': [-144.17166590597648, -200.3791638982969, 1135.5793169583249], 
		'1': [-198.36308760690474, -156.32112285976535, 1102.102245959862], 
		'2': [-150.24065470212915, -126.80431827909578, 1094.3467438475025]
	}, 
	'_TimeCost': 0.006980419158935547
}

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

py_ap200_simple_interface-0.1.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

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

py_ap200_simple_interface-0.1.0-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file py_ap200_simple_interface-0.1.0.tar.gz.

File metadata

  • Download URL: py_ap200_simple_interface-0.1.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.12 Windows/11

File hashes

Hashes for py_ap200_simple_interface-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a49448672e5fd06e56684ab53d9582a20e8d8c951cf0a047cf73c0ec819c4621
MD5 49fce55e47a94e97ef130c815d712b49
BLAKE2b-256 b2a85f4e5535c524816c2d8469956d678aa47dde81cb3ed4dc003e89add5d527

See more details on using hashes here.

File details

Details for the file py_ap200_simple_interface-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for py_ap200_simple_interface-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8bcaf14685ddc2f9f29ffe5d52799df624062777e46ea874a82cbf4c3a5cdf9a
MD5 cf569dbbc41a6e0d311909be0ca7b046
BLAKE2b-256 681cf678d3215a101cc085a0ca0294dd16ce37f23be667c87898164ebbbd543e

See more details on using hashes here.

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