Skip to main content

mms-mp-test

Linux USB 후보 장치를 확인한 뒤 사용자 NPZ 파일의 trajectory 배열을 읽습니다.

pip install mms-mp-test
from mp_test import load_trajectory

trajectory = load_trajectory("franka_custom_tabletop_seed43_k1_configuration.npz")

load_trajectory(npz_path: str | os.PathLike[str]) -> numpy.ndarray의 경로는 필수입니다. 데이터 파일은 배포물에 포함하지 않습니다. 배열 값, shape, dtype을 그대로 반환하며 특정 크기를 요구하지 않습니다. 제공된 예제 파일은 (17, 7)의 float64 배열입니다.

import 시 장치 검색이나 데이터 파일 읽기를 하지 않습니다. 호출할 때마다 Linux /sys/bus/usb/devices를 확인하며, 후보가 있을 때만 numpy.load(..., allow_pickle=False)로 파일을 읽고 닫습니다.

후보 조건은 다음 중 하나입니다.

  • VID가 151f
  • 제조사 또는 제품명에 Opal Kelly 포함 (대소문자 무시)
  • 제품명이 XEM7310 또는 XEM7360으로 시작 (대소문자 무시)

이는 USB 식별이며 FPGA 동작, 펌웨어, 로드된 설계를 검증하지 않습니다.

예외 원인
RuntimeError Linux가 아님, USB 목록 접근 실패, 후보 없음 (메시지로 구분)
FileNotFoundError 후보 확인 후 지정한 파일이 없음
KeyError trajectory 키 누락
ValueError 잘못된 NPZ 또는 pickle이 필요한 배열

파일 자체의 접근 권한 오류는 PermissionError로 전달됩니다.

버전 0.1.1부터 Python >=3.8, NumPy >=1.23.5를 지원합니다. NumPy 1.23.5가 설치된 환경에서도 업그레이드 없이 사용할 수 있습니다. 기존 0.1.0은 NumPy >=1.26을 요구하므로 Python 3.8에 설치할 수 없습니다.

수정된 로컬 배포물을 Python 3.8 환경에 설치하려면 해당 환경의 Python으로 실행하세요.

python -m pip install "numpy==1.23.5" ./dist/mms-mp-test-0.1.1/mms_mp_test-0.1.1-py3-none-any.whl

기존 소스 스크립트도 사용할 수 있습니다.

python3 detect_opalkelly.py --json

mp conda 환경에서 설치된 패키지와 실제 USB 감지를 확인하려면:

conda run -n mp python -m pip install ./dist/mms-mp-test-0.1.1/mms_mp_test-0.1.1-py3-none-any.whl
conda run -n mp python test_mp_env.py
conda run -n mp python test_mp_env.py /path/to/trajectory.npz

경로를 생략하면 스크립트 옆의 예제 NPZ를 사용합니다. Python 실행 경로, 패키지 버전과 import 위치를 출력하고, API 호출 성공 후 원본의 배열 값·shape·dtype을 비교합니다. 모두 일치하면 종료 코드 0, 설치·장치·파일 문제나 배열 불일치가 있으면 원인을 출력하고 1로 종료합니다. USB 감지는 모의 처리하지 않습니다.

개발 및 배포 검증:

python3 -m venv .venv
.venv/bin/python -m pip install -e . build twine
.venv/bin/python -m unittest discover -v
.venv/bin/python -m build
.venv/bin/python -m twine check dist/*

라이선스와 작성자 정보는 제공되지 않아 지정하지 않았습니다. PyPI 게시 상태와 실물 장치 검증 여부는 VALIDATION.md를 참고하세요.

Metadata

Release files for mms-mp-test 0.1.1

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

Source distribution (sdist)

Source distribution for mms-mp-test 0.1.1
File Size Uploaded Provenance Actions
mms_mp_test-0.1.1.tar.gz 6.0 kB Without provenance Details for mms_mp_test-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mms-mp-test 0.1.1
File Interpreter ABI Platform Actions
mms_mp_test-0.1.1-py3-none-any.whl Python 3 none any Details for mms_mp_test-0.1.1-py3-none-any.whl

Total release size: 12.4 kB

Release files / mms_mp_test-0.1.1.tar.gz

Download URL mms_mp_test-0.1.1.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1f667dc3f430dc5965bda11d68c3bdf8284c862a52460f1fd39a398c0ca1ec14
BLAKE2b-256 checksum
How to use checksums
3b4887452aa7180dc49d323238fdf50c1ecdd0a37453b4d59511190671aca14e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / mms_mp_test-0.1.1-py3-none-any.whl

Download URL mms_mp_test-0.1.1-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
423d8641ce55785d7aeaafbf69e54fa6e44506ee2790e2ed6047957170a38736
BLAKE2b-256 checksum
How to use checksums
647f9e66cf6e6493ee3314035c5002a5b7e420e0c78332e9c4d97295db000c40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for mms-mp-test 0.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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