Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
tutorials:advanced:bullet_world_robot [2015/09/17 15:11] – [Robot URDF description] gkazhoyatutorials:advanced:bullet_world_robot [2015/09/17 15:34] – [Directory / file setup] gkazhoya
Line 64: Line 64:
 ===== Directory / file setup ===== ===== Directory / file setup =====
  
-Now let's setup a directory structure for our own packages: a directory (repo) and the metapackage inside: in the ''src'' of a catkin workspace create a new directory, we will call it ''cram_boxy''. Therein create a catkin metapackage with the same name:+Now let's setup a directory structure for our own packages: a directory (repo) and the metapackage inside: in the ''src'' of a catkin workspace create a new directory, we will call it ''cram_quadrotor''. Therein create a catkin metapackage with the same name:
  
 <code bash> <code bash>
-mkdir cram_boxy && cd cram_boxy +mkdir cram_quadrotor && cd cram_quadrotor 
-catkin_create_pkg cram_boxy && cd cram_boxy+catkin_create_pkg cram_quadrotor && cd cram_quadrotor
 </code> </code>
  
Line 75: Line 75:
 <code cmake> <code cmake>
 cmake_minimum_required(VERSION 2.8.3) cmake_minimum_required(VERSION 2.8.3)
-project(cram_boxy)+project(cram_quadrotor)
 find_package(catkin REQUIRED) find_package(catkin REQUIRED)
 catkin_metapackage() catkin_metapackage()
 </code> </code>
  
-The first ROS package we will create will be the Prolog description of our robot. We will call it ''cram_boxy_description''+The first ROS package we will create will be the Prolog description of our robot. We will call it ''cram_quadrotor_description''
-Go back to the root of your ''cram_boxy'' directory and create the package. The dependencies we will definitely need for now will be ''cram_prolog'' (as we're defining Prolog rules) and ''cram_robot_interfaces'' (which defines the names of predicates for describing robots in CRAM):+Go back to the root of your ''cram_quadrotor'' directory and create the package. The dependencies we will definitely need for now will be ''cram_prolog'' (as we're defining Prolog rules) and ''cram_robot_interfaces'' (which defines the names of predicates for describing robots in CRAM):
  
 <code bash> <code bash>
 cd .. cd ..
-catkin_create_pkg cram_boxy_knowledge cram_prolog cram_robot_interfaces+catkin_create_pkg cram_quadrotor_knowledge cram_prolog cram_robot_interfaces
 </code> </code>
  
-Now let's create the corresponding ASDF file called ''cram_boxy_knowledge/cram-boxy-knowledge.asd'':+Now let's create the corresponding ASDF file called ''cram_quadrotor_knowledge/cram-quadrotor-knowledge.asd'':
  
 <code lisp> <code lisp>
 ;;; You might want to add a license header first ;;; You might want to add a license header first
  
-(defsystem cram-boxy-knowledge+(defsystem cram-quadrotor-knowledge
   :author "Your Name"   :author "Your Name"
   :license "BSD"   :license "BSD"
Line 102: Line 102:
     :components     :components
     ((:file "package")     ((:file "package")
-     (:file "boxy-knowledge" :depends-on ("package"))))))+     (:file "quadrotor-knowledge" :depends-on ("package"))))))
 </code> </code>
  
-Now create the corresponding ''src'' directory and a ''cram_boxy_knowledge/src/package.lisp'' file in it:+Now create the corresponding ''src'' directory and a ''cram_quadrotor_knowledge/src/package.lisp'' file in it:
  
 <code lisp> <code lisp>
Line 112: Line 112:
 (in-package :cl-user) (in-package :cl-user)
  
-(defpackage cram-boxy-knowledge+(defpackage cram-quadrotor-knowledge
   (:use #:common-lisp   (:use #:common-lisp
         #:cram-prolog         #:cram-prolog
Line 118: Line 118:
 </code> </code>
  
-Also, an empty ''cram_boxy/cram_boxy_knowledge/src/boxy-knowledge.lisp''.+Also, an empty ''cram_quadrotor/cram_quadrotor_knowledge/src/quadrotor-knowledge.lisp''.
  
-Now, let's compile our new packages and load them through the REPL:+Now, let's compile our new packages (''catkin_make''and load them through the REPL:
  
 <code lisp> <code lisp>
 CL-USER> , CL-USER> ,
 ros-load-system ros-load-system
-cram_boxy_knowledge +cram_quadrotor_knowledge 
-cram-boxy-knowledge+cram-quadrotor-knowledge
 </code> </code>