[[
✎ pl:miw:miw08_mindstormsapi
]]
aiWiki
Pokaż stronę
Ostatnie zmiany
Indeks
Zaloguj
Ta strona jest tylko do odczytu. Możesz wyświetlić źródła tej strony ale nie możesz ich zmienić.
====== Opis ====== Piotr Hołownia, <holownia@student.agh.edu.pl> Build an API prototype in Prolog for NXT-based robots * low-level sensomotoric API, cover NXT funcs, provide control for motors, sensors, brick i/o * mid-level mimic LEGO env blocks?? does it make sens? * component-level: identify common robot parts that need control: wheel, sensor, arm, etc? * robot-level: identify robot classes: e.g. im/mobile, rolling vs. walking; provide means to describe common robot designs, like the four provided by LEGO * high-level provide services for different classes Architecture: * MVC, the above is logical model * provide a V for every M component to support building of the interface Issues: * communication * control * design * event handling, device polling Ideas: * think how to build a Prolog API for NXT * investigate the [[http://lejos.sourceforge.net/|LeJOS]] [[http://lejos.sourceforge.net/p_technologies/nxt/nxj/api/index.html|NXJ API]] to remain compatible * investigate communication layer: one can use native NXT protocol, iCommand stack, other? * middle layer for: integrating logic layer with communication layer ====== Spotkania ====== ===== 08.03.04 ===== * fenomenologicznie :) mamy klocki, jakby można zrobić API? * inżyniersko, mamy klocki, BT, jak się dogadać z Prologiem ===== 08.03.11 ===== * spec: czego chcemy od niższej warstwy, np.: synchr, etc. * próbujemy opisywać predyaktem w prologu moduły ze środ. lego ====== Projekt ====== ===== 08.03.04 ===== {{:pl:miw:miw08_mindstormsapi:akcje.pl|:pl:miw:miw08_mindstormsapi:akcje.pl}} {{:pl:miw:miw08_mindstormsapi:ruch.pl|:pl:miw:miw08_mindstormsapi:ruch.pl}} <code prolog> nxt_motor(Motor,Speed, Direction) :- var(Speed), % odczyt pr get_speed(Speed) nxt_motor(Motor,Speed, Direction) :- var(Dir), % odczyt dir nxt_motor(Motor,Speed, Direction) :- nonvar(S), set_speed(S), nxt_motor(Motor,Speed, Direction) :- Speed < 0, nxt_motor(Motor,reverse, Direction) :- nxt_motor(Motor,Speed, _), Speedn is - Speed, nxt_motor(Motor,Speedn). </code> nxt_motor(M,S,_),S \= 0. ====== Sprawozdanie ====== ===== 08.03.04 ===== Podejście inżynierskie zawiesiłem. Spróbowałem tworzyć API wyższego poziomu przy założeniu, że mam dostępne pewne predykaty API niższego poziomu (ustawianie prędkości obrotowej serwomechanizmu, obracanie o zadany kąt). Jest to trudne do realizacji bez gotowych rozwiązań API niższego poziomu. Istotne jest, aby stworzyć mechanizmy działania, które w leJOS są dostępne w klasie Behavior i umożliwiają podejmowanie akcji po zajściu jakiegoś zdarzenia. Myślę, że należy skupić się na podejściu inżynierskim. ====== Materiały ====== * http://mindstorms.lego.com/Overview/NXTreme.aspx * http://mindstorms.lego.com/eng/community/resources/default.asp
pl/miw/miw08_mindstormsapi.1204639866.txt.gz
· ostatnio zmienione: 2019/06/27 15:58 (edycja zewnętrzna)
Pokaż stronę
Poprzednie wersje
Menadżer multimediów
Do góry