Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorials:beginner:assigning_actions_2 [2019/07/09 18:27] – [Setting up fact groups to select a process module] gkazhoya | tutorials:beginner:assigning_actions_2 [2022/02/25 23:19] (current) – [Automatically choosing a process module for a motion] schimpf | ||
---|---|---|---|
Line 6: | Line 6: | ||
**Previous Tutorial:** [[tutorials: | **Previous Tutorial:** [[tutorials: | ||
**Next Tutorial:** [[tutorials: | **Next Tutorial:** [[tutorials: | ||
+ | |||
+ | |||
+ | To run the code in the tutuorial the roscore and the turtlesim need to be started over the terminal. Each in their own tab. | ||
+ | <code bash> | ||
+ | $ roscore | ||
+ | </ | ||
+ | <code bash> | ||
+ | $ rosrun turtlesim turtlesim_node | ||
+ | </ | ||
+ | |||
+ | And in the REPL the following commands should be executed: | ||
+ | <code lisp> | ||
+ | CL-USER> | ||
+ | ... | ||
+ | CL-USER> | ||
+ | ... | ||
+ | TUT> | ||
+ | ... | ||
+ | TUT> | ||
+ | </ | ||
===== Setting up fact groups to select a process module ===== | ===== Setting up fact groups to select a process module ===== | ||
Line 14: | Line 34: | ||
(defsystem cram-my-beginner-tutorial | (defsystem cram-my-beginner-tutorial | ||
:depends-on (cram-language roslisp turtlesim-msg geometry_msgs-msg cl-transforms | :depends-on (cram-language roslisp turtlesim-msg geometry_msgs-msg cl-transforms | ||
- | | + | |
| | ||
| | ||
Line 73: | Line 93: | ||
<code lisp> | <code lisp> | ||
- | TUT> (defparameter fast-circle (desig:a motion (type driving) (speed 10) (angle 7))) | + | TUT> (defparameter |
- | FAST-CIRCLE | + | *FAST-CIRCLE* |
- | TUT> (defparameter goal (desig:a motion (type moving) (goal (1 9 0)))) | + | TUT> (defparameter |
- | GOAL | + | *GOAL* |
- | TUT> (defparameter pen-off (desig:a motion (type setting-pen) (off 1))) | + | TUT> (defparameter |
- | PEN-OFF | + | *PEN-OFF* |
</ | </ | ||
Line 84: | Line 104: | ||
<code lisp> | <code lisp> | ||
- | TUT> (perform-some-motion fast-circle) | + | TUT> (perform-some-motion |
[(TURTLE-PROCESS-MODULES) INFO] 1501142699.638: | [(TURTLE-PROCESS-MODULES) INFO] 1501142699.638: | ||
| | ||
Line 99: | Line 119: | ||
<code lisp> | <code lisp> | ||
- | (perform-some-motion goal) | + | (perform-some-motion |
[(TURTLE-PROCESS-MODULES) INFO] 1501142702.867: | [(TURTLE-PROCESS-MODULES) INFO] 1501142702.867: | ||
| | ||
Line 108: | Line 128: | ||
</ | </ | ||
- | You can also perform '' | + | You can also perform '' |
<code lisp> | <code lisp> | ||
- | | + | |
[(TURTLE-PROCESS-MODULES) INFO] 1504786623.566: | [(TURTLE-PROCESS-MODULES) INFO] 1504786623.566: | ||
SETTING-PEN) | SETTING-PEN) | ||
Line 117: | Line 137: | ||
1)) {1002BB26A3}>' | 1)) {1002BB26A3}>' | ||
[TURTLESIM-SRV: | [TURTLESIM-SRV: | ||
- | TUT> (perform-some-motion fast-circle) | + | TUT> (perform-some-motion |
[(TURTLE-PROCESS-MODULES) INFO] 1504786630.845: | [(TURTLE-PROCESS-MODULES) INFO] 1504786630.845: | ||
| |