Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
doc:beginner:package_for_turtlesim [2014/03/12 14:26] hmessdoc:beginner:package_for_turtlesim [2014/10/20 11:53] – Added the "Next" title for the last section of the tutorial. mpomarlan
Line 1: Line 1:
 ====== Creating a CRAM package ====== ====== Creating a CRAM package ======
  
-**Description:** In this tutorial you will set up a ROS package to use the CRAM plan language within the repl.+**Description:** In this tutorial you will set up a ROS package to use the CRAM plan language within the lisp repl.
  
-**Next Tutorial:** [[doc:beginner:controlling_turtlesim_2|Controlling turtlesim from Lisp_2]]+**Next Tutorial:** [[doc:beginner:controlling_turtlesim_2|Controlling turtlesim from CRAM]]
  
 ===== Creating a ROS package ===== ===== Creating a ROS package =====
Line 53: Line 53:
 </code>   </code>  
      
-We define a package with the name ''cram-beginner-tutorial''. Packages in Common Lisp can have an arbitrary number of nicknames. In our case we nickname ''cram-beginner-tutorial'' as ''tut''. Finally, we define that the package uses another package ''cpl'' which is a nickname of the package  ''CRAM Plan Language''+We define a package with the name ''cram-beginner-tutorial''. Packages in Common Lisp can have an arbitrary number of nicknames. In our case we nickname ''cram-beginner-tutorial'' as ''tut''. Finally, we define that the package uses another package ''cpl'' which is a nickname of the package  ''Cram-language'' in the stack ''cram_core''
  
 ==== Exporting the ASDF system to ROS ==== ==== Exporting the ASDF system to ROS ====
Line 65: Line 65:
 This just selects the namespace of the file by the nickname '':tut'' we defined in ''package.lisp''. We will fill it with more content in later tutorials. This just selects the namespace of the file by the nickname '':tut'' we defined in ''package.lisp''. We will fill it with more content in later tutorials.
  
-Now we are ready to compile and load our new system. Launch the Lisp REPL. If it is already running, reload it by executing:+Now we are ready to compile and load our new system. Launch the Lisp REPL.  
 +Then load your newly created system by typing:
  
 <code lisp> <code lisp>
-+(ros-load:load-system "cram_beginner_tutorial" :cram-beginner-tutorial)
-restart-inferior-lisp+
 </code> </code>
  
-in the REPLThen load your newly created system by typing:+This loads the ''cram-beginner-tutorial'' of the package ''cram_beginner_tutorial''. 
 +Test it by evaluating
  
 <code lisp> <code lisp>
-(ros-load:load-system "cram_beginner_tutorial" :cram-beginner-tutorial)+(in-package :tut)
 </code> </code>
  
 +== Next ==
  
-Now the package ''cram-beginner-tutorial'' should be defined. Test it by evaluating 
- 
-<code lisp> 
-(in-package :tut) 
-</code> 
  
 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:beginner:controlling_turtlesim_2|Controlling turtlesim from Lisp_2]]+[[doc:beginner:controlling_turtlesim_2|Controlling turtlesim from CRAM]]