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 [2017/09/07 11:40] – [ASDF dependencies] cpotutorials:beginner:controlling_turtlesim_2 [2017/09/07 12:52] cpo
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'', ''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-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>
Line 87: Line 87:
                          :angular (make-msg "geometry_msgs/Vector3" :z ang))))                          :angular (make-msg "geometry_msgs/Vector3" :z ang))))
                                                    
-(defun set-pen (r g b width off)+(defun call-set-pen (r g b width off)
   "Function to call the SetPen service."   "Function to call the SetPen service."
   (call-service *pen-srv* 'turtlesim-srv:SetPen   (call-service *pen-srv* 'turtlesim-srv:SetPen
Line 134: Line 134:
  
 <code lisp> <code lisp>
-TUT> (init-ros-turtle "/turtle1")+TUT> (init-ros-turtle "turtle1")
 </code> </code>
  
Line 240: Line 240:
 We also can change how the turtle writes on the background. Try: We also can change how the turtle writes on the background. Try:
 <code lisp> <code lisp>
-TUT> (set-pen 255 0 0 10 0)+TUT> (call-set-pen 255 0 0 10 0)
 </code> </code>
  
-We use the ''set-pen'' function, also defined in ''control-turtlesim.lisp''. The line the turtle leaves on the ground should be red. Try moving the turtle, either with the teleop or the ''send-vel-cmd'' function.+We use the ''call-set-pen'' function, also defined in ''control-turtlesim.lisp''. The line the turtle leaves on the ground should be red. Try moving the turtle, either with the teleop or the ''send-vel-cmd'' function.