[roslisp] 02/02: Revert "Merge tag 'upstream/1.9.19'"

Jochen Sprickerhof jspricke-guest at moszumanska.debian.org
Fri Aug 14 11:33:51 UTC 2015


This is an automated email from the git hooks/post-receive script.

jspricke-guest pushed a commit to branch master
in repository roslisp.

commit f45f28068b2bbe066110a532de723a3b12fec779
Author: Jochen Sprickerhof <git at jochen.sprickerhof.de>
Date:   Fri Aug 14 13:33:32 2015 +0200

    Revert "Merge tag 'upstream/1.9.19'"
    
    This reverts commit e1d1feec6c49ed764cf575cae8d5508264fb08e7, reversing
    changes made to 104ae9990c76b7df9956318fb45077950dea5022.
---
 CHANGELOG.rst                          |  14 +---
 cmake/roslisp-extras.cmake.em          |  87 ++++------------------
 package.xml                            |   2 +-
 roslisp-msg-protocol/msg-protocol.lisp |  26 +------
 roslisp-msg-protocol/package.lisp      |   2 -
 scripts/compile_load_manifest          |  12 ---
 scripts/make-roslisp-exec.lisp         | 131 +++++++++++++++------------------
 scripts/make_exe_script                |  25 -------
 scripts/make_node_exec                 |  42 +++++------
 scripts/run-roslisp-script.sh          |  68 -----------------
 src/msg.lisp                           |  20 +----
 src/node.lisp                          |   2 +-
 src/roslisp.lisp                       |   2 -
 13 files changed, 98 insertions(+), 335 deletions(-)

diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 2cbf83f..180d72f 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -2,18 +2,6 @@
 Changelog for package roslisp
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-1.9.19 (2015-08-14)
------------
-* Merge pull request `#25 <https://github.com/ros/roslisp/issues/25>`_ from airballking/symbol-codes
-  roslisp-msg-protocol: looking up symbols from constants
-* Followed Gaya's suggestion of throwing an error if no symbol-code with the requested code can be found in (code-symbol ...).
-* Merge pull request `#26 <https://github.com/ros/roslisp/issues/26>`_ from gaya-/deprecated-quit
-  Replaced deprecated SB-EXT:QUIT with SB-EXT:EXIT
-* Merge pull request `#19 <https://github.com/ros/roslisp/issues/19>`_ from gaya-/master
-  Fixed the outdated executables generation pipeline
-* Replaced deprecated SB-EXT:QUIT with SB-EXT:EXIT
-* Contributors: Dirk Thomas, Gayane Kazhoyan, Georg Bartels
-
 1.9.17 (2014-10-02)
 -------------------
 * Merge pull request `#20 <https://github.com/ros/roslisp/issues/20>`_ from daewok/use_sim_time
@@ -27,7 +15,7 @@ Changelog for package roslisp
 * Contributors: Eric Timmons, Georg Bartels, Jannik Buckelo, Lorenz Mösenlechner
 
 1.9.16 (2014-04-22)
--------------------
+-----------
 * Added Georg Bartels as maintainer in package.xml.
 * Bug-fix: Export SERVICE-CALL-ERROR symbol.
 * Bug-fix: Don't throw END-OF-FILE condition in TCPROS-DO-SERVICE-REQUEST.
diff --git a/cmake/roslisp-extras.cmake.em b/cmake/roslisp-extras.cmake.em
index e9d6280..404fe81 100644
--- a/cmake/roslisp-extras.cmake.em
+++ b/cmake/roslisp-extras.cmake.em
@@ -5,88 +5,31 @@
 @[if DEVELSPACE]@
 # location of script in develspace
 set(ROSLISP_MAKE_NODE_BIN "@(CMAKE_CURRENT_SOURCE_DIR)/scripts/make_node_exec")
-set(ROSLISP_COMPILE_MANIFEST_BIN "@(CMAKE_CURRENT_SOURCE_DIR)/scripts/compile_load_manifest")
-set(ROSLISP_EXE_SCRIPT "@(CMAKE_CURRENT_SOURCE_DIR)/scripts/make_exe_script")
 @[else]@
 # location of script in installspace
-set(ROSLISP_MAKE_NODE_BIN "${roslisp_DIR}/../scripts/make_node_exec")
-set(ROSLISP_COMPILE_MANIFEST_BIN "${roslisp_DIR}/../scripts/compile_load_manifest")
-set(ROSLISP_EXE_SCRIPT "${roslisp_DIR}/..//scripts/make_exe_script")
+set(ROSLISP_MAKE_NODE_BIN "${roslisp_DIR}/../../common-lisp/ros/roslisp/scripts/make_node_exec")
 @[end if]@
 
 # Build up a list of executables, in order to make them depend on each
 # other, to avoid building them in parallel, because it's not safe to do
 # that.
-# The first entry in this list will be a target to compile ros-load-manifest
-# as all the executables depend on it.
-if(NOT TARGET _roslisp_load_manifest)
-  add_custom_target(_roslisp_load_manifest ALL COMMAND ${ROSLISP_COMPILE_MANIFEST_BIN})
+if(NOT ${ROSLISP_EXECUTABLES})
+  set(${ROSLISP_EXECUTABLES})
 endif()
-set(ROSLISP_EXECUTABLES _roslisp_load_manifest)
-
-
-# example usage:
-# add_compiled_lisp_executable(my_script my-system my-system:my-func [my_targetname])
-function(add_compiled_lisp_executable output system_name entry_point)
-  if(${ARGC} LESS 3 OR ${ARGC} GREATER 4)
-    message(SEND_ERROR "[roslisp] add_compiled_lisp_executable can only have 3 or 4 arguments")
-  elseif(${ARGC} LESS 4)
-    set(targetname _roslisp_${output})
-  else()
-    set(extra_macro_args ${ARGN})
-    list(GET extra_macro_args 0 targetname)
-  endif()
-  string(REPLACE "/" "_" targetname ${targetname})
-  set(targetdir ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION})
 
+macro(rosbuild_add_lisp_executable _output _system_name _entry_point)
+  set(_targetname _roslisp_${_output})
+  string(REPLACE "/" "_" _targetname ${_targetname})
   # Add dummy custom command to get make clean behavior right.
-  add_custom_command(OUTPUT ${targetdir}/${output} ${targetdir}/${output}.lisp
+  add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${_output} ${CMAKE_CURRENT_SOURCE_DIR}/${_output}.lisp
     COMMAND echo -n)
-  add_custom_target(${targetname} ALL
-    DEPENDS ${targetdir}/${output} ${targetdir}/${output}.lisp
-    COMMAND ${ROSLISP_MAKE_NODE_BIN} ${PROJECT_NAME} ${system_name} ${entry_point} ${targetdir}/${output})
-
-  # Make this executable depend on all previously declared executables, to serialize them.
-  if(ROSLISP_EXECUTABLES)
-    add_dependencies(${targetname} ${ROSLISP_EXECUTABLES})
-  endif()
+  add_custom_target(${_targetname} ALL
+                     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_output} ${CMAKE_CURRENT_SOURCE_DIR}/${_output}.lisp
+                     COMMAND ${roslisp_make_node_exe} ${PROJECT_NAME} ${_system_name} ${_entry_point} ${CMAKE_CURRENT_SOURCE_DIR}/${_output})
+  # Make this executable depend on all previously declared executables, to
+  # serialize them.
+  add_dependencies(${_targetname} rosbuild_precompile ${roslisp_executables})
   # Add this executable to the list of executables on which all future
   # executables will depend.
-  list(APPEND ROSLISP_EXECUTABLES ${targetname})
-  set(ROSLISP_EXECUTABLES "${ROSLISP_EXECUTABLES}" PARENT_SCOPE)
-
-  # mark the generated executables for installation
-  install(PROGRAMS ${targetdir}/${output}
-    DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
-  install(FILES ${targetdir}/${output}.lisp
-    DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
-endfunction(add_compiled_lisp_executable)
-
-
-# example usage:
-# add_lisp_executable(my_script my-system my-package:my-func)
-function(add_lisp_executable output system_name entry_point)
-  if(NOT ${ARGC} EQUAL 3)
-    message(SEND_ERROR "[roslisp] add_lisp_executable can only have 3 arguments")
-  endif()
-
-  set(targetdir ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION})
-  set(targetname _roslisp_${output})
-  string(REPLACE "/" "_" targetname ${targetname})
-
-  # create directory if it does not exist
-  file(MAKE_DIRECTORY ${targetdir})
-
-  # generate script
-  add_custom_command(OUTPUT ${targetdir}/${output}
-    COMMAND ${ROSLISP_EXE_SCRIPT} ${PROJECT_NAME} ${system_name} ${entry_point}
-    ${targetdir}/${output}
-    DEPENDS ${ROSLISP_EXE_SCRIPT}
-    COMMENT "Generating lisp exe script ${targetdir}/${output}"
-    VERBATIM)
-  add_custom_target(${targetname} ALL DEPENDS ${targetdir}/${output})
-
-  # mark the generated executables for installation
-  install(PROGRAMS ${targetdir}/${output}
-    DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
-endfunction(add_lisp_executable)
+  list(APPEND ROSLISP_EXECUTABLES ${_targetname})
+endmacro(rosbuild_add_lisp_executable)
diff --git a/package.xml b/package.xml
index 52615dd..51a7d83 100644
--- a/package.xml
+++ b/package.xml
@@ -1,6 +1,6 @@
 <package>
   <name>roslisp</name>
-  <version>1.9.19</version>
+  <version>1.9.18</version>
   <description>Lisp client library for ROS, the Robot Operating System.</description>
   <maintainer email="georg.bartels at cs.uni-bremen.de">Georg Bartels</maintainer>
   <maintainer email="moesenle at cs.tum.edu">Lorenz Moesenlechner</maintainer>
diff --git a/roslisp-msg-protocol/msg-protocol.lisp b/roslisp-msg-protocol/msg-protocol.lisp
index ac01096..ed15baa 100644
--- a/roslisp-msg-protocol/msg-protocol.lisp
+++ b/roslisp-msg-protocol/msg-protocol.lisp
@@ -68,36 +68,14 @@
 (defgeneric service-response-type (srv))
 
 (defgeneric symbol-codes (msg-type)
-  (:documentation "Return an association list from symbols to numbers (the const declarations in the .msg file). `msg-type' is either a symbol naming the message class or an instance of the class."))
+  (:documentation "Return an association list from symbols to numbers (the const declarations in the .msg file)."))
+
 
 (defgeneric symbol-code (msg-type symbol)
   (:documentation "symbol-code MSG-TYPE SYMBOL.  Gets the value of a message-specific constant declared in a msg file.  The first argument is either a symbol naming the message class, or an instance of the class, and the second argument is the keyword symbol corresponding to the constant name. 
 
 For example, to get the value of the DEBUG constant from Log.msg, use (symbol-code '<Log> :debug)."))
 
-(defgeneric code-symbols (msg-type code)
-  (:documentation "Retrieves the list of symbol-code associations which contain
- `code' within `msg-type'. `msg-type' is a either a symbol naming the message class
- or an instance of that class. `code' is an integer.
-
- For example, if my_msgs/Log.msg has defined the constants DEBUG=1, WARN=2, ERROR=1,
- you can get all code-symbol associations with constant code 1 with:
-
- ROSLISP-MSG-PROTOCOL> (code-symbols 'my_msgs-msg:log 1)
-   ((:DEBUG . 1) (:ERROR . 1))"))
-
-(defgeneric code-symbol (msg-type code)
-  (:documentation "Retrieves the first symbol associated with the constant `code'
- in the symbol codes of `msg-type'. If no such association exists, it returns NIL.
- `msg-type' is a either a symbol naming the message class or an instance of that
- class. `code' is an integer.
-
- For example, if my_msgs/Log.msg has defined the constants DEBUG=1, WARN=2, ERROR=1, you
- can get the first symbol associated with the constant code 1 with:
-
- ROSLISP-MSG-PROTOCOL> (code-symbol 'my_msgs-msg:log 1)
-   :DEBUG"))
-
 (defgeneric ros-message-to-list (msg)
   (:documentation "Return a structured list representation of the message.  For example, say message type foo has a float field x equal to 42, and a field y which is itself a message of type bar, which has a single field z=24.  This function would then return the structured list '(foo (:x . 42.0) (:y . (bar (:z . 24)))).  
 
diff --git a/roslisp-msg-protocol/package.lisp b/roslisp-msg-protocol/package.lisp
index 527c8c9..88cca01 100644
--- a/roslisp-msg-protocol/package.lisp
+++ b/roslisp-msg-protocol/package.lisp
@@ -51,8 +51,6 @@
            :service-response-type
            :symbol-codes
            :symbol-code
-           :code-symbols
-           :code-symbol
            :string-to-ros-msgtype-symbol
            :ros-message-to-list
            :list-to-ros-message
diff --git a/scripts/compile_load_manifest b/scripts/compile_load_manifest
deleted file mode 100755
index 6a13439..0000000
--- a/scripts/compile_load_manifest
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env sh
-
-SBCL_CMD="/usr/bin/env sbcl"
-
-ROSLISP_PATH=`rospack find roslisp`
-if [ -z "$ROSLISP_PATH" ]; then
-  echo "roslisp not found"
-  exit 1
-fi
-
-$SBCL_CMD --noinform --end-runtime-options --noprint --non-interactive \
-    --load $ROSLISP_PATH/scripts/roslisp-sbcl-init
diff --git a/scripts/make-roslisp-exec.lisp b/scripts/make-roslisp-exec.lisp
index 81e7fd6..c942236 100644
--- a/scripts/make-roslisp-exec.lisp
+++ b/scripts/make-roslisp-exec.lisp
@@ -2,75 +2,62 @@
 
 (in-package :cl-user)
 
-(flet ((failure-quit (&key exit-code)
-         (if (find-symbol "EXIT" 'sb-ext)
-             (funcall (intern "EXIT" 'sb-ext) :code exit-code)
-             (funcall (intern "QUIT" 'sb-ext) :unix-status exit-code))))
-  (let ((p (sb-ext:posix-getenv "ROS_ROOT")))
-    (unless p (error "ROS_ROOT not set"))
-    (let ((roslisp-path (merge-pathnames (make-pathname :directory '(:relative "asdf"))
-                                         (ros-load:ros-package-path "roslisp")))
-          (output-filename (pathname (fifth sb-ext:*posix-argv*))))
-      (unless (sb-ext:posix-getenv "ROS_DEBBUILD")
-        (handler-case
-            (let ((ros-load:*current-ros-package* (second sb-ext:*posix-argv*)))
-              (asdf:operate 'asdf:compile-op (third sb-ext:*posix-argv*)))
-          (error (e)
-            (format *error-output* "Compilation failed due to condition: ~a~&" e)
-            (failure-quit :exit-code 1))))
-      (with-open-file (strm (ensure-directories-exist output-filename)
-                            :if-exists :supersede :direction :output)
-        (let ((*standard-output* strm))
-          (pprint '(require :asdf))
-          (pprint '(defmethod asdf:perform :around ((o asdf:load-op)
-                                                    (c asdf:cl-source-file))
-                    (handler-case (call-next-method o c)
-                      ;; If a fasl was stale, try to recompile and load (once).
-                      (sb-ext:invalid-fasl ()
-                        (asdf:perform (make-instance 'asdf:compile-op) c)
-                        (call-next-method)))))
-          (pprint '(push :roslisp-standalone-executable *features*))
-          (pprint '(declaim (sb-ext:muffle-conditions sb-ext:compiler-note)))
-          (pprint `(push ,roslisp-path asdf:*central-registry*))
-          (pprint '(defun roslisp-debugger-hook (condition me)
-                    (declare (ignore me))
-                    (flet ((failure-quit (&key abort-p)
-                             (if (find-symbol "EXIT" 'sb-ext)
-                                 (funcall (intern "EXIT" 'sb-ext)
-                                          :code 1 :abort abort-p)
-                                 (funcall (intern "QUIT" 'sb-ext)
-                                          :unix-status 1 :recklessly-p abort-p))))
-                      (handler-case
-                          (progn
-                            (format *error-output*
-                                    "~&Roslisp exiting due to condition: ~a~&" condition)
-                            (finish-output *error-output*)
-                            (failure-quit))
-                        (condition ()
-                          (failure-quit :abort-p t))))))
-          (pprint '(unless (let ((v (sb-ext:posix-getenv "ROSLISP_BACKTRACE_ON_ERRORS")))
-                             (and (stringp v) (> (length v) 0)))
-                    (setq sb-ext:*invoke-debugger-hook* #'roslisp-debugger-hook)))
-          (pprint `(handler-bind ((style-warning #'muffle-warning)
-                                  (warning #'print))
-                     (asdf:operate 'asdf:load-op :ros-load-manifest :verbose nil)
-                     (setf (symbol-value (intern "*CURRENT-ROS-PACKAGE*" :ros-load))
-                           ,(second sb-ext:*posix-argv*))
-                     (let ((*standard-output* (make-broadcast-stream))
-                           (sys ,(third sb-ext:*posix-argv*)))
-                       (handler-case (asdf:operate 'asdf:load-op sys :verbose nil)
-                         (asdf:missing-component (c)
-                           (error "Couldn't find asdf system (filename ~a.asd and system name ~a) or some dependency.  Original condition was ~a."
-                                  sys sys c))))
-                     (load (merge-pathnames
-                            (make-pathname :name ,(format nil "~a-init.lisp"
-                                                          (pathname-name output-filename))
-                                           :directory '(:relative "roslisp"
-                                                        ,(second sb-ext:*posix-argv*)))
-                            (funcall (symbol-function (intern "ROS-HOME" :ros-load))))
-                           :if-does-not-exist nil)
-                     (funcall (symbol-function (read-from-string ,(fourth sb-ext:*posix-argv*))))
-                     (if (find-symbol "EXIT" 'sb-ext)
-                         (funcall (intern "EXIT" 'sb-ext))
-                         (funcall (intern "QUIT" 'sb-ext))))))))
-    (failure-quit :exit-code 0)))
+(let ((p (sb-ext:posix-getenv "ROS_ROOT")))
+  (unless p (error "ROS_ROOT not set"))
+  (let ((roslisp-path (merge-pathnames (make-pathname :directory '(:relative "asdf"))
+                                       (ros-load:ros-package-path "roslisp")))
+        (output-filename (pathname (fifth sb-ext:*posix-argv*))))
+    (unless (sb-ext:posix-getenv "ROS_DEBBUILD")
+      (handler-case
+          (let ((ros-load:*current-ros-package* (second sb-ext:*posix-argv*)))
+            (asdf:operate 'asdf:compile-op (third sb-ext:*posix-argv*)))
+        (error (e)
+          (format *error-output* "Compilation failed due to condition: ~a~&" e)
+          (sb-ext:quit :unix-status 1))))
+
+    (with-open-file (strm output-filename :if-exists :supersede :direction :output)
+      (let ((*standard-output* strm))
+        (pprint '(require :asdf))
+        (pprint '(defmethod asdf:perform :around ((o asdf:load-op)
+                                                  (c asdf:cl-source-file))
+                  (handler-case (call-next-method o c)
+                    ;; If a fasl was stale, try to recompile and load (once).
+                    (sb-ext:invalid-fasl ()
+                      (asdf:perform (make-instance 'asdf:compile-op) c)
+                      (call-next-method)))))
+        (pprint '(push :roslisp-standalone-executable *features*))
+        (pprint '(declaim (sb-ext:muffle-conditions sb-ext:compiler-note)))
+        (pprint `(push ,roslisp-path asdf:*central-registry*))
+        (pprint '(defun roslisp-debugger-hook (condition me)
+                  (declare (ignore me))
+                  (flet ((failure-quit (&key recklessly-p)
+                           (sb-ext:quit :unix-status 1 :recklessly-p recklessly-p)))
+                    (handler-case
+                        (progn
+                          (format *error-output*
+                                  "~&Roslisp exiting due to condition: ~a~&" condition)
+                          (finish-output *error-output*)
+                          (failure-quit))
+                      (condition ()
+                        (failure-quit :recklessly-p t))))))
+        (pprint '(unless (let ((v (sb-ext:posix-getenv "ROSLISP_BACKTRACE_ON_ERRORS"))) (and (stringp v) (> (length v) 0)))
+                  (setq sb-ext:*invoke-debugger-hook* #'roslisp-debugger-hook)))
+
+        (pprint `(handler-bind ((style-warning #'muffle-warning)
+                                (warning #'print))
+                   (asdf:operate 'asdf:load-op :ros-load-manifest :verbose nil)
+                   (setf (symbol-value (intern "*CURRENT-ROS-PACKAGE*" :ros-load))
+                         ,(second sb-ext:*posix-argv*))                   
+                   (let ((*standard-output* (make-broadcast-stream))
+                         (sys ,(third sb-ext:*posix-argv*)))
+                     (handler-case (asdf:operate 'asdf:load-op sys :verbose nil)
+                       (asdf:missing-component (c)
+                         (error "Couldn't find asdf system (filename ~a.asd and system name ~a) or some dependency.  Original condition was ~a."
+                                sys sys c))))
+                   (load (merge-pathnames (make-pathname :name ,(format nil "~a-init.lisp" (pathname-name output-filename))
+                                                         :directory '(:relative "roslisp" ,(second sb-ext:*posix-argv*)))
+                                          (funcall (symbol-function (intern "ROS-HOME" :ros-load))))
+                         :if-does-not-exist nil)
+                   (funcall (symbol-function (read-from-string ,(fourth sb-ext:*posix-argv*))))
+                   (sb-ext:quit))))))
+  (sb-ext:quit))
diff --git a/scripts/make_exe_script b/scripts/make_exe_script
deleted file mode 100755
index 9337149..0000000
--- a/scripts/make_exe_script
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env sh
-
-ROSLISP_PATH=`rospack find roslisp`
-if [ -z "$ROSLISP_PATH" ]; then
-  echo "roslisp not found"
-  exit 1
-fi
-
-if [ $# = 4 ]; then
-  pkg=$1
-  system=$2
-  entry=$3
-  output=$4
-  cat > $output <<EOF
-#!/usr/bin/env sh
-"true"; exec /usr/bin/env sbcl --noinform --load $ROSLISP_PATH/scripts/roslisp-sbcl-init --script "\$0" "\$@"
-
-(ros-load:load-system "${pkg}" "${system}")
-(${entry})
-EOF
-  chmod a+x $output
-else
-  echo "Usage: make_node_exec <pkg> <system> <entry> <output>"
-  exit 1
-fi
diff --git a/scripts/make_node_exec b/scripts/make_node_exec
index 558b791..6525c10 100755
--- a/scripts/make_node_exec
+++ b/scripts/make_node_exec
@@ -1,42 +1,36 @@
-#!/usr/bin/env sh
+#!/bin/bash
 
-SBCL_CMD="/usr/bin/env sbcl"
-
-ROSLISP_PATH=`rospack find roslisp`
-if [ -z "$ROSLISP_PATH" ]; then
-  echo "roslisp not found"
-  exit 1
+ROS_SBCL_PATH=`rospack find sbcl`
+if [ -n "$ROS_SBCL_PATH" ]; then
+  SBCL_CMD=$ROS_SBCL_PATH/scripts/run-sbcl.sh
+else
+  SBCL_CMD=sbcl
 fi
 
-if [ $# = 4 ]; then
+if [[ $# == 4 ]]; then
   pkg=$1
   system=$2
   entry=$3
   output=$4
-  echo "Generating Lisp executable."
-  $SBCL_CMD --noinform --end-runtime-options --noprint --non-interactive \
-            --load $ROSLISP_PATH/scripts/roslisp-sbcl-init \
-            --load $ROSLISP_PATH/scripts/make-roslisp-exec.lisp \
-                   $pkg $system $entry $output.lisp \
-            --script \
-      || exit $?
+  $SBCL_CMD --noinform --end-runtime-options --load `rospack find roslisp`/scripts/roslisp-sbcl-init --noprint --disable-debugger --load `rospack find roslisp`/scripts/make-roslisp-exec.lisp $pkg $system $entry $output.lisp || exit $?
   cat > $output <<EOF
-#!/usr/bin/env sh
-
-SBCL_CMD="/usr/bin/env sbcl"
-
+#!/bin/bash
+ROS_SBCL_PATH=\`rospack find sbcl\`
 ROSLISP_PATH=\`rospack find roslisp\`
 if [ -z "\$ROSLISP_PATH" ]; then
   echo "roslisp not found"
   exit 1
 fi
+if [ -n "\$ROS_SBCL_PATH" ]; then
+  SBCL=$ROS_SBCL_PATH/scripts/run-sbcl.sh
+else
+  SBCL=sbcl
+fi
 
-ROSLISP_CURRENT_PACKAGE=$pkg
-
-$SBCL_CMD --noinform --end-runtime-options --noprint --no-userinit --disable-debugger --load \$ROSLISP_PATH/scripts/roslisp-sbcl-init --load $output.lisp --end-toplevel-options \$*
+ROSLISP_CURRENT_PACKAGE=$pkg \$SBCL --noinform --end-runtime-options --noprint --no-userinit --disable-debugger --load \$ROSLISP_PATH/scripts/roslisp-sbcl-init --load $output.lisp --end-toplevel-options \$*
 EOF
   chmod a+x $output
 else
-  echo "Usage: make_node_exec <pkg> <system> <entry> <output>"
-  exit 1
+    echo "Usage: make_node_exec <pkg> <system> <entry> <output>"
+    exit 1
 fi
diff --git a/scripts/run-roslisp-script.sh b/scripts/run-roslisp-script.sh
deleted file mode 100755
index cc967a9..0000000
--- a/scripts/run-roslisp-script.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env sh
-"true";exec /usr/bin/env /usr/bin/sbcl --noinform --end-runtime-options --noprint --no-userinit --disable-debugger --script "$0" "$@"
-
-;; This LISP script can be used to launch LISP scripts that depend on ros functinoality.
-;; To use it make the following the first two lines of your script:
-;;
-;; #!/usr/bin/env sh
-;; "true";exec /usr/bin/env rosrun roslisp run-roslisp-script.sh --script "$0" "$@"
-;;
-;; You can then load asdf systems from ROS (like roslisp) using:
-;; (ros-load:load-system "roslisp" "roslisp")
-;;
-;; This script initializes ros lookup of packages, and wraps SBCL to suppress unwanted output for scripts
-
-(REQUIRE :ASDF)
-
-(labels ((get-roslisp-path ()
-           ;; calls rospack to find path to roslisp
-           (let ((rospack-process
-                   (run-program "rospack" '("find" "roslisp")
-                                :search t
-                                :output :stream)))
-             (when rospack-process
-               (unwind-protect
-                    (with-open-stream (o (process-output rospack-process))
-                      (concatenate 'string (car (loop
-                                                  for line := (read-line o nil nil)
-                                                  while line
-                                                  collect line)) "/load-manifest/"))
-                 (process-close rospack-process)))))
-         (load-ros-lookup ()
-           ;; make sure roslisp is in asdf central registry
-           (PUSH (get-roslisp-path) ASDF:*CENTRAL-REGISTRY*)
-           ;; load ros-load-manifest, defining e.g. "ros-load:load-system"
-           (ASDF:OPERATE 'ASDF:LOAD-OP :ROS-LOAD-MANIFEST :VERBOSE NIL)))
-  (load-ros-lookup))
-
-
-
-(PUSH :ROSLISP-STANDALONE-EXECUTABLE *FEATURES*)
-;; handle conditions
-(LABELS ((ROSLISP-DEBUGGER-HOOK (CONDITION ME)
-           (DECLARE (IGNORE ME))
-           (FLET ((FAILURE-QUIT (&KEY RECKLESSLY-P)
-                    (QUIT :UNIX-STATUS 1 :RECKLESSLY-P RECKLESSLY-P)))
-             (HANDLER-CASE
-                 (PROGN
-                   (FORMAT *ERROR-OUTPUT* "~&Roslisp exiting due to condition: ~a~&"
-                           CONDITION)
-                   (FINISH-OUTPUT *ERROR-OUTPUT*)
-                   (FAILURE-QUIT))
-               (CONDITION NIL (FAILURE-QUIT :RECKLESSLY-P T))))))
-  (UNLESS
-      (LET ((V (POSIX-GETENV "ROSLISP_BACKTRACE_ON_ERRORS")))
-        (AND (STRINGP V) (> (LENGTH V) 0)))
-    (SETQ *INVOKE-DEBUGGER-HOOK* #'ROSLISP-DEBUGGER-HOOK)))
-
-;; load file
-(let ((filename (third sb-ext:*posix-argv*)))
-  (let ((stream (open filename :direction :input))
-        ;; remove artificial arguments
-        (sb-ext::*posix-argv* (cddr sb-ext::*posix-argv*)))
-    (unwind-protect
-         (progn
-           ;; ignore shebang line
-           (read-line stream)
-           (load stream))
-      (close stream))))
diff --git a/src/msg.lisp b/src/msg.lisp
index 7a98419..216df3a 100644
--- a/src/msg.lisp
+++ b/src/msg.lisp
@@ -75,26 +75,8 @@
 (defmethod symbol-codes ((msg-type symbol))
   nil)
 
-(defmethod symbol-codes ((m ros-message))
-  (symbol-codes (type-of m)))
-
 (defmethod symbol-code ((m ros-message) s)
-  (symbol-code (type-of m) s))
-
-(defmethod code-symbols ((msg-type symbol) code)
-  (remove code (symbol-codes msg-type) :test-not #'= :key #'rest))
-
-(defmethod code-symbols ((m ros-message) code)
-  (code-symbols (type-of m) code))
-
-(defmethod code-symbol ((msg-type symbol) code)
-  (let ((pair (rassoc code (symbol-codes msg-type) :test #'=)))
-    (unless pair
-      (error "Could not get code symbol for ~a in ROS message type ~a" code msg-type))
-    (car pair)))
-
-(defmethod code-symbol ((m ros-message) code)
-  (code-symbol (type-of m) code))
+  (symbol-code (class-of m) s))
 
 (defmethod symbol-code ((m symbol) s)
   (let ((pair (assoc s (symbol-codes m))))
diff --git a/src/node.lisp b/src/node.lisp
index 3913ddd..159d8c7 100644
--- a/src/node.lisp
+++ b/src/node.lisp
@@ -250,7 +250,7 @@ Assuming spin is not true, this call will return the return value of the final s
       
       (ros-info (roslisp top) "Shutdown complete")
       (close *ros-log-stream*)
-      (when *running-from-command-line* (sb-ext:exit)))))
+      (when *running-from-command-line* (sb-ext:quit)))))
 
 (defun maybe-shutdown-ros-node ()
   (unless (eq *node-status* :shutdown)
diff --git a/src/roslisp.lisp b/src/roslisp.lisp
index f3ec8bf..a9aedb1 100644
--- a/src/roslisp.lisp
+++ b/src/roslisp.lisp
@@ -66,8 +66,6 @@
    :make-request
    :symbol-code
    :symbol-codes
-   :code-symbols
-   :code-symbol
 
    :load-if-necessary
    

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ros/roslisp.git



More information about the debian-science-commits mailing list