Getting roslisp
Roslisp is part of the ros stack in C-turtle and later releases, so installing ros also installs roslisp.
Roslisp uses the SBCL common lisp implementation.
However, the specific version of the sbcl compiler we use is in the roslisp_support stack (which is also part of the C-turtle distribution). Packages that use roslisp should declare a dependency on the roslisp_runtime package. Doing a rosdep install followed by a rosmake of such a package will pull and build all required dependencies (sbcl will take several minutes the first time round).
Running nodes within Lisp
See the sbcl ros package documentation for how to launch the ros version of sbcl. To set up ros-related paths, etc., load scripts/roslisp-sbcl-init from within lisp after startup. If you're using the popular and recommended SLIME interface, see here for how to set this up automatically; if not, add it to your .sbclrc.
Roslisp is tightly integrated with SBCL's 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 asdf/baz.asd. Then, the startup script above extends ASDF, so that whenever you refer to system baz, either if you directly ask to load baz or if you just state that some other system depends on baz, 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 in rospack .
For the special case of messages and services, we refer to their asdf system using a -msg or -srv suffix. 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 in the ros_tutorials stack for an example. The src and asdf subdirectories contain the relevant files. When using roslisp interactively, slime_ros automates much of the above.
Running nodes from the command line
Use the rospack_add_lisp_executable macro in CMakeLists.txt. For example, in the roslisp_tutorials package CMakeLists.txt, there is the line:
rospack_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). After loading that system, invoke the function roslisp-tutorials:talker to run the node.






