Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| doc:beginner:creating_a_cram_package [2013/12/11 22:03] – gkazhoya | doc:beginner:creating_a_cram_package [2014/03/11 13:39] (current) – hmess | ||
|---|---|---|---|
| Line 9: | Line 9: | ||
| ===== Creating a ROS package ===== | ===== Creating a ROS package ===== | ||
| - | First we need to create a ROS package. It needs to depend on '' | + | First we need to create a ROS package |
| + | You can do this with either catkin or rosbuild. | ||
| - | **catkin** | + | **For catkin** |
| - | Go to '' | + | |
| - | + | ||
| - | < | + | |
| + | Go to the '' | ||
| + | <code bash>$ cd MY_CATKIN_WORKSPACE_PATH/ | ||
| and execute the following: | and execute the following: | ||
| - | + | < | |
| - | < | + | |
| More information on '' | More information on '' | ||
| - | |||
| < | < | ||
| + | or on the [[http:// | ||
| - | or on [[http:// | + | **For rosbuild** |
| - | + | ||
| - | **rosbuild** | + | |
| - | Please use '' | + | |
| + | Please use '' | ||
| In your rosbuild workspace root do: | In your rosbuild workspace root do: | ||
| - | + | < | |
| - | < | + | |
| That was easy. Now we need to set up the Lisp infrastructure. | That was easy. Now we need to set up the Lisp infrastructure. | ||
| - | |||
| ===== Setting up the Lisp infrastructure ===== | ===== Setting up the Lisp infrastructure ===== | ||
| Line 43: | Line 36: | ||
| ==== Creating an ASDF system ==== | ==== Creating an ASDF system ==== | ||
| - | Switch into the root directory of the '' | + | Switch into the root directory of the '' |
| - | < | + | < |
| $ rospack profile | $ rospack profile | ||
| - | $ roscd cram_tutorial | + | $ roscd cram_beginner_tutorial |
| </ | </ | ||
| | | ||
| - | and create a file '' | + | and create a file '' |
| === The code === | === The code === | ||
| - | Put the following content into '' | + | Put the following content into '' |
| - | < | + | < |
| - | (defsystem cram-tutorial | + | (defsystem cram-beginner-tutorial |
| :depends-on (cram-language) | :depends-on (cram-language) | ||
| :components | :components | ||
| Line 80: | Line 73: | ||
| Create a sub-directory '' | Create a sub-directory '' | ||
| - | < | + | < |
| - | (defpackage cram-tutorial | + | (defpackage cram-beginner-tutorial |
| (:nicknames :tut) | (:nicknames :tut) | ||
| (:use #:cpl)) | (:use #:cpl)) | ||
| Line 88: | Line 81: | ||
| === The code explained === | === The code explained === | ||
| - | 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 '' |
| - | < | + | < |
| (in-package :tut) | (in-package :tut) | ||
| </ | </ | ||
| Line 102: | Line 95: | ||
| Now we are ready to compile and load our new system. Launch Emacs and load the Lisp REPL. If it is already running, reload it by executing | Now we are ready to compile and load our new system. Launch Emacs and load the Lisp REPL. If it is already running, reload it by executing | ||
| - | < | + | < |
| , | , | ||
| restart-inferior-lisp | restart-inferior-lisp | ||
| Line 109: | Line 102: | ||
| in the REPL. Then, enter the following command: | in the REPL. Then, enter the following command: | ||
| - | < | + | < |
| - | (ros-load: | + | (ros-load: |
| </ | </ | ||
| You need to load the system every time before you use it, so experts would build their own shortcuts to this command or use the rosemacs function unstead: | You need to load the system every time before you use it, so experts would build their own shortcuts to this command or use the rosemacs function unstead: | ||
| - | < | + | < |
| , | , | ||
| ros-load-system | ros-load-system | ||
| - | cram_tutorial | + | cram_beginner_tutorial |
| - | cram-tutorial | + | cram-beginner-tutorial |
| </ | </ | ||
| - | The first parameter to '' | + | The first parameter to '' |
| - | < | + | < |
| (in-package :tut) | (in-package :tut) | ||
| </ | </ | ||

