ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
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:
Create a lisp "main" function that is the entry point for the script. Let's call it main
for now.
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)
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>