Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
doc:beginner:package_for_turtlesim [2014/03/12 14:48] – hmess | doc:beginner:package_for_turtlesim [2015/04/28 15:35] – [Creating the Lisp Package] gkazhoya | ||
---|---|---|---|
Line 3: | Line 3: | ||
**Description: | **Description: | ||
- | **Next Tutorial:** [[doc: | + | **Next Tutorial:** [[doc: |
===== Creating a ROS package ===== | ===== Creating a ROS package ===== | ||
Line 33: | Line 33: | ||
:components | :components | ||
((:file " | ((:file " | ||
- | | + | |
</ | </ | ||
Line 39: | Line 39: | ||
The first line defines the name of the system. Then we specify the dependencies of the system, i.e. other systems that need to be loaded before we load our system. | The first line defines the name of the system. Then we specify the dependencies of the system, i.e. other systems that need to be loaded before we load our system. | ||
- | Finally, we define the components of the system. A component is a sort of sub-system and might be either a module (i.e. a sub-directory) or a file. ASDF knows some more component types but they are not relevant for us most of the time. We define that the system knows a sub-directory '' | + | Finally, we define the components of the system. A component is a sort of sub-system and might be either a module (i.e. a sub-directory) or a file. ASDF knows some more component types but they are not relevant for us most of the time. We define that the system knows a sub-directory '' |
==== Creating the Lisp Package ==== | ==== Creating the Lisp Package ==== | ||
- | Lisp packages are the equivalent to C++ namespaces or to Python modules. Lisp packages cannot be hierarchic. We can define which other packages should be used, i.e. which symbols should be accessible without a package prefix. Further, we can define which symbols should be exported from the package. | + | Lisp packages are the equivalent to C++ namespaces or Python modules. Lisp packages cannot be hierarchical. Through Lisp packages we can define which other packages should be used, i.e. which symbols should be accessible without a package prefix. Further, we can define which symbols should be exported from the package. |
Create a sub-directory '' | Create a sub-directory '' | ||
Line 53: | Line 53: | ||
</ | </ | ||
| | ||
- | 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 ==== | ||
- | To actually load the ASDF system, all files referenced in the system definition must be present and we are missing the file '' | + | To actually load the ASDF system, all files referenced in the system definition must be present and we are missing the file '' |
<code lisp> | <code lisp> | ||
Line 63: | Line 63: | ||
</ | </ | ||
- | 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. | ||
Line 78: | Line 78: | ||
(in-package :tut) | (in-package :tut) | ||
</ | </ | ||
+ | |||
+ | == Next == | ||
+ | |||
Now that we have created our first CRAM package, let's try controlling the ROS turtlesim from it... | Now that we have created our first CRAM package, let's try controlling the ROS turtlesim from it... | ||
- | [[doc: | + | [[doc: |