Findee 🚗
Findee는 Pathfinder의 라즈베리파이 제로 2 W 기반의 자율주행 차량 플랫폼입니다. 모터 제어, 카메라, 초음파 센서를 통합하여 로보틱스 프로젝트를 쉽게 구현할 수 있도록 도와줍니다.
✨ 주요 기능
- 🚗 모터 제어: DC 모터를 이용한 전진, 후진, 회전 제어
- 📷 카메라: Picamera2를 이용한 실시간 영상 처리
- 📡 초음파 센서: 거리 측정 및 장애물 감지
- 🎯 통합 플랫폼: 하나의 클래스로 모든 하드웨어 제어
🔧 하드웨어 요구사항
사용 하드웨어
- 라즈베리파이 제로 2 W
- 라즈베리파이 카메라 모듈 V2 또는 호환 카메라
- DC 모터 2개 (바퀴용)
- L298N 모터 드라이버
- HC-SR04 초음파 센서
- 점퍼 와이어 및 브레드보드
📦 설치 방법
1. 기본 설치
pip install findee
1-1. 업데이트
pip install --upgrade findee
2. 필수 라이브러리 설치
pip install opencv-python RPi.GPIO picamera2
🚀 사용법
1. 기본 예제
from findee import Findee
# Findee 객체 생성
robot = Findee()
try:
# 2초간 전진
robot.motor.move_forward(50)
time.sleep(2)
# 1초간 우회전
robot.motor.turn_right(30)
time.sleep(1)
# 정지
robot.motor.stop()
# 거리 측정
distance = robot.ultrasonic.get_distance()
print(f"거리: {distance}cm")
# 카메라 프레임 캡처
frame = robot.camera.get_frame()
print(f"프레임 크기: {frame.shape}")
finally:
# 리소스 정리
robot.motor.cleanup()
2. 자율주행 예제
import time
from findee import Findee
def autonomous_drive():
robot = Findee()
try:
while True:
# 거리 측정
distance = robot.ultrasonic.get_distance()
if distance is None:
print("센서 오류")
continue
if distance > 20: # 20cm 이상이면 전진
robot.motor.move_forward(40)
elif distance > 10: # 10-20cm면 천천히
robot.motor.move_forward(20)
else: # 10cm 이하면 회전
robot.motor.turn_right(30)
time.sleep(0.5)
robot.motor.stop()
time.sleep(0.1)
except KeyboardInterrupt:
print("프로그램 종료")
finally:
robot.motor.cleanup()
if __name__ == "__main__":
autonomous_drive()
📖 API 문서
1. Findee 클래스
메인 클래스로 모든 하드웨어 구성요소에 접근할 수 있습니다.
robot = Findee()
robot.motor # Motor 클래스 인스턴스
robot.camera # Camera 클래스 인스턴스
robot.ultrasonic # Ultrasonic 클래스 인스턴스
2. Motor 클래스
DC 모터 제어를 담당합니다.
기본 제어
move_forward(speed): 전진 (speed: 20-100)move_backward(speed): 후진 (speed: 20-100)turn_left(speed): 제자리 좌회전 (speed: 20-100)turn_right(speed): 제자리 우회전 (speed: 20-100)stop(): 정지cleanup(): GPIO 정리
고급 제어
curve_left(speed, angle): 좌회전 커브 (angle: 0-60)curve_right(speed, angle): 우회전 커브(angle: 0-60)control_motors(right, left): 개별 모터 제어 (-100 ~ 100)
3. Camera 클래스
라즈베리파이 카메라 제어를 담당합니다.
get_frame(): 현재 프레임 반환 (numpy array)camera_test(): 카메라 연결 테스트
4. Ultrasonic 클래스
HC-SR04 초음파 센서 제어를 담당합니다.
get_distance(): 거리 측정 반환 (cm, None if error)- 측정 범위: 2-400cm
- 정확도: ±1cm
이슈 리포트
버그나 기능 요청은 GitHub Issues를 이용해주세요.
📄 라이선스
이 프로젝트는 MIT 라이선스를 따릅니다. 자세한 내용은 LICENSE 파일을 참조하세요.
👥 제작자
- Pathfinder - 초기 개발 - Comrid
🙏 감사의 말
- 라즈베리파이 재단의 훌륭한 하드웨어
- 오픈소스 커뮤니티의 지원
즐거운 로보틱스 프로젝트 되세요! 🚀
Metadata
Release files for findee 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| findee-0.1.6.tar.gz | 15.3 kB | Without provenance | Details for findee-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| findee-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for findee-0.1.6-py3-none-any.whl |
Total release size: 29.3 kB
Release files / findee-0.1.6.tar.gz
| Download URL | findee-0.1.6.tar.gz |
|---|---|
| Size | 15.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
923990066356510d528f22ad28bdf12fde607d1870745d3362ca156d6fe3d2df
|
|
BLAKE2b-256 checksum How to use checksums |
ad61c0d2bf2f734fcb3dc9b51d49ec10755f754099378a46c4a2239c1db3b040
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.13
|
Release files / findee-0.1.6-py3-none-any.whl
| Download URL | findee-0.1.6-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a97eead7e693549bc79bad863cf51aad1eae48892b6b789d97a501e20ac21c03
|
|
BLAKE2b-256 checksum How to use checksums |
1cae7963fb6dc77c84ce1f4df70d39bd860802e557b1f4b9c79cb7abcd93d786
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.13
|
Security for findee 0.1.6
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.