== Getting roslisp == Roslisp is part of the ros stack in C-turtle and later releases, so installing ros also installs roslisp. Roslisp uses the [[http://www.sbcl.org/|SBCL]] Common Lisp implementation. It will be automatically installed during roslisp installation as a Debian package. == Running nodes within Lisp == To start SBCL you can just call {{{ $ sbcl }}} on the command line. To set up ros-related paths, etc., load `scripts/roslisp-sbcl-init` from within Lisp after SBCL startup: {{{ (load "PATH_TO_ROSLISP_ROS_PACKAGE/scripts/roslisp-sbcl-init") }}} If you're using the popular and recommended SLIME interface, see [[rosemacs|here]] for how to set this up automatically; if not, add it to your `.sbclrc`. Roslisp is tightly integrated with SBCL's [[http://common-lisp.net/project/asdf/|ASDF]] build system, and extends it using [[rospack]] to search over packages. Basically, there's a special variable called `ros-load:*current-ros-package*` that holds a package name. Say it equals `foo`, and say `foo` has a dependency on another ROS package `bar` containing an ASDF system definition `bar.asd`. Then, the startup script above extends ASDF, so that whenever you refer to system `bar`, either if you directly ask to load `bar` or if you just state that some other system `foo` depends on `bar`, the name will be resolved to the right thing. Currently, if there are multiple ASDF systems with the same name in different dependent packages, we depend on the first one found by `rospack`. For the special case of messages and services, we refer to their ASDF system using the `-msg` and `-srv` suffixes respectively. In the above example, say we want to make use of the messages in the `bar` package. We would then add a dependency on `bar-msg` to our ASDF file. See the [[roslisp_tutorials]] package stack for an example. When using roslisp interactively, [[rosemacs#Integration_with_roslisp_and_slime|slime_ros]] automates much of the above. == Running nodes from the command line == Currently, running nodes from the command line is '''not''' supported in catkin. If you're using rosbuild, you can use the `rosbuild_add_lisp_executable` Cmake macro. For example, in the `roslisp_tutorials` package CMakeLists.txt, there is the line: {{{ rosbuild_add_lisp_executable(bin/talker roslisp-tutorials roslisp-tutorials:talker) }}} This means: create an executable called `bin/talker` in the current package. The ASDF system for this package is called `roslisp_tutorials/roslisp-tutorials` (the package name concatenated with the second argument of the CMake macro). To run the node inside Lisp, invoke the function `roslisp-tutorials:talker` after loading that system.