Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorials:beginner:simple_plans [2017/09/19 14:07] – [Implementing simple plans to move a turtle] Relinking cpo | tutorials:beginner:simple_plans [2022/02/25 23:15] (current) – [Implementing simple plans to move a turtle] schimpf | ||
---|---|---|---|
Line 4: | Line 4: | ||
**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 need to be executed: | ||
+ | <code lisp> | ||
+ | CL-USER> | ||
+ | ... | ||
+ | CL-USER> | ||
+ | ... | ||
+ | TUT> | ||
+ | ... | ||
+ | TUT> | ||
+ | </ | ||
===== Moving the turtle towards a point ===== | ===== Moving the turtle towards a point ===== | ||
Line 28: | Line 45: | ||
(defun relative-angle-to (goal pose-msg) | (defun relative-angle-to (goal pose-msg) | ||
- | "Given a `pose-msg' | + | "Given a `pose-msg' |
calculate the angle by which the pose has to be turned to point toward the goal." | calculate the angle by which the pose has to be turned to point toward the goal." | ||
(let ((diff-pose (cl-transforms: | (let ((diff-pose (cl-transforms: | ||
Line 81: | Line 98: | ||
(def-cram-function move-to (goal & | (def-cram-function move-to (goal & | ||
"Sends velocity commands until `goal' is reached." | "Sends velocity commands until `goal' is reached." | ||
- | | + | (let ((reached-fl (< (fl-funcall #' |
| | ||
#' | #' | ||
Line 123: | Line 140: | ||
- | Moving along predetermined points is all fine and good, but let's have a look at a more flexible way that CRAM provides to specify and reason about parameters ... | + | Moving along predetermined points is all fine and good, but let's have a look at a more flexible way that CRAM provides to specify and reason about parameters. To learn about motion parameter, we, however, first need to understand how the Lisp Prolog works ... |
- | [[tutorials: | + | [[tutorials: |