Create Executable roslisp script
I'm using catkin ros. Now I'm trying to make a lisp script executable with "rosrun xxx".
The roslisp tutorial is kind of out of date, so I tried different approaches with information I got from different places.
Now in the CMakeList.txt, I have
install(PROGRAMS
src/beckon.lisp
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
At the head of the .lisp script, I add
#!/usr/bin/env sh
"true" ; exec /usr/bin/env sbcl --noinform --script "$0" "$@"
To make it executable
My code snippet is
(defpackage :lisp_interpreter
(:use :roslisp :cl))
However, when I actually run it, I got error messages
Unhandled SB-KERNEL:SIMPLE-PACKAGE-ERROR in thread #<SB-THREAD:THREAD
"main thread" RUNNING
{1002A8B3A3}>:
The name "ROSLISP" does not designate any package.
Besides that, the following hello world code seems to be problematic
(with-ros-node ("lisp_interpreter")
(sleep 1)
)
with error
; in: WITH-ROS-NODE ("lisp_interpreter")
; ("lisp_interpreter")
;
; caught ERROR:
; illegal function call
;
; compilation unit finished
; Undefined function:
; WITH-ROS-NODE
; caught 1 ERROR condition
Unhandled SB-INT:COMPILED-PROGRAM-ERROR in thread #<SB-THREAD:THREAD
"main thread" RUNNING
{1002A8B3A3}>:
Execution of a form compiled with errors.
Form:
("lisp_interpreter")
Compile-time error:
illegal function call
How to make it works?