ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Roslisp provides a way to create a script that loads an asdf system and run a lisp function. Assume you created the asdf file turtle-controller in the ROS package turtle_controller. The lisp package is call turtle-controller and your entry point is the lisp function main. To get an executable, do the following:

  1. Create a lisp "main" function that is the entry point for the script. Let's call it main for now.

  2. Open your package's CMakeLists.txt and add the following at the end:

    rospack_add_lisp_executable(bin/turtle_controller turtle-controller turtle-controller:main)

  3. rosmake turtle_controller

Now you should have a binary in turtle_controller/bin. Try executing it. If it works, you can also use it in launch files, e.g.:

<roslaunch>
  <node name="turtle_controller" type="turtle_controller" pkg="turtle_controller" />
</roslaunch>