Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tutorials:beginner:package_for_turtlesim [2016/01/21 17:28] – [Setting up the Lisp infrastructure] gkazhoya | tutorials:beginner:package_for_turtlesim [2019/07/03 11:45] – [Creating the Lisp Package] tlipps | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Creating a CRAM package ====== | ====== Creating a CRAM package ====== | ||
- | **Description: | + | **Description: |
**Next Tutorial:** [[tutorials: | **Next Tutorial:** [[tutorials: | ||
Line 10: | Line 10: | ||
In the '' | In the '' | ||
- | <code bash>$ catkin_create_pkg | + | <code bash>$ catkin_create_pkg |
===== Setting up the Lisp infrastructure ===== | ===== Setting up the Lisp infrastructure ===== | ||
- | Setting up the Common Lisp part is a little bit more work. First we need to create a Lisp ' | + | Setting up the Common Lisp part is a little bit more work. First, we need to create a Lisp ' |
- | After that we will need to create a Common Lisp package (i.e. the equivalent of C++ namespaces). You can learn '' | + | After that we will need to create a Common Lisp package (i.e. the equivalent of C++ namespaces). You can learn '' |
==== Creating an ASDF system ==== | ==== Creating an ASDF system ==== | ||
- | Switch into the root directory of the '' | + | Switch into the root directory of the '' |
- | and create a file '' | + | and create a file '' |
- | Put the following content into '' | + | Put the following content into '' |
<code lisp> | <code lisp> | ||
- | (defsystem cram-beginner-tutorial | + | (defsystem cram-my-beginner-tutorial |
:depends-on (cram-language) | :depends-on (cram-language) | ||
:components | :components | ||
Line 45: | Line 45: | ||
<code lisp> | <code lisp> | ||
- | (defpackage cram-beginner-tutorial | + | (defpackage |
(:nicknames :tut) | (:nicknames :tut) | ||
- | (:use #:cpl)) | + | (:use :cpl)) |
</ | </ | ||
| | ||
- | We define a package with the name '' | + | We define a package with the name '' |
==== Exporting the ASDF system to ROS ==== | ==== Exporting the ASDF system to ROS ==== | ||
Line 62: | Line 62: | ||
This just selects the namespace of the file by the nickname '': | This just selects the namespace of the file by the nickname '': | ||
- | Now we are ready to compile and load our new system. Launch the Lisp REPL ('' | + | Now we are ready to compile and load our new system. Launch the Lisp REPL ('' |
Then load your newly created system by typing: | Then load your newly created system by typing: | ||
<code lisp> | <code lisp> | ||
- | (ros-load: | + | CL-USER> |
</ | </ | ||
Line 73: | Line 73: | ||
<code lisp> | <code lisp> | ||
- | (in-package :tut) | + | CL-USER> |
</ | </ | ||