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
tutorials:beginner:controlling_turtlesim_2 [2019/07/03 11:50] – [ROS dependencies] tlippstutorials:beginner:controlling_turtlesim_2 [2019/07/03 11:52] – [Experimenting in the REPL] tlipps
Line 14: Line 14:
 ==== ASDF dependencies ==== ==== ASDF dependencies ====
  
-Now open ''cram-beginner-tutorial.asd'' and update the system dependencies to include the system  ''roslisp'', ''turtlesim-msg'', ''turtlesim-srv'', ''geometry_msgs-msg'' and ''cl-transforms''. The systems that correspond to the messages of a package are always named like the package name with a ''-msg'' suffix. Your system should now look like this:+Now open ''cram-my-beginner-tutorial.asd'' and update the system dependencies to include the system  ''roslisp'', ''turtlesim-msg'', ''turtlesim-srv'', ''geometry_msgs-msg'' and ''cl-transforms''. The systems that correspond to the messages of a package are always named like the package name with a ''-msg'' suffix. Your system should now look like this:
  
 <code lisp> <code lisp>
-(defsystem cram-beginner-tutorial+(defsystem cram-my-beginner-tutorial
   :depends-on (roslisp cram-language turtlesim-msg turtlesim-srv cl-transforms geometry_msgs-msg)   :depends-on (roslisp cram-language turtlesim-msg turtlesim-srv cl-transforms geometry_msgs-msg)
   :components   :components
Line 30: Line 30:
 We also want to add ''roslisp'' and ''cl-transforms'' to our namespace in the file ''package.lisp'' so that we don't have to specify the namespace each time we use a function from that package in our code. We also want to add ''roslisp'' and ''cl-transforms'' to our namespace in the file ''package.lisp'' so that we don't have to specify the namespace each time we use a function from that package in our code.
 <code lisp> <code lisp>
-(defpackage :cram-beginner-tutorial+(defpackage :cram-my-beginner-tutorial
   (:nicknames :tut)   (:nicknames :tut)
   (:use :cpl :roslisp :cl-transforms))   (:use :cpl :roslisp :cl-transforms))
Line 107: Line 107:
 ===== Experimenting in the REPL ===== ===== Experimenting in the REPL =====
  
-Now let's try it out. Open your Lisp REPL and make sure that you loaded the system ''cram-beginner-tutorial'' and switched to the package ''tut'', hint:+Now let's try it out. Open your Lisp REPL and make sure that you loaded the system ''cram-my-beginner-tutorial'' and switched to the package ''tut'', hint:
  
 <code lisp> <code lisp>
-CL-USER> (ros-load:load-system "cram_beginner_tutorial" :cram-beginner-tutorial)+CL-USER> (ros-load:load-system "cram_my_beginner_tutorial" :cram-my-beginner-tutorial)
 ... ...
 CL-USER> (in-package :tut) CL-USER> (in-package :tut)