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

Revision history [back]

You are missing #:commin-lisp in the use section of your package definition and you must not use #:roslisp_runtime. Another issue is that you don't export the symbols TALKER and LISTENER although you use them in the CMakeLists.txt. It should be something like that:

(defpackage sam-begin-lisp
  (:nicknames :first-package)
  (:use #:common-lisp #:roslisp)
  (:export talker listener))

You then need to change your asd file to use your new, renamed package:

rospack_add_lisp_executable(bin/talker sam-lisp-system sam-begin-lisp:talker)
rospack_add_lisp_executable(bin/listener sam-lisp-system sam-begin-lisp:listener)

Btw. it is really uncommon to use rosmake while developing a lisp node. Rather, people use the REPL to interactively develop their code. That makes debugging much easier because you get backtraces that show where an error happened.

Try the following:

rosrun roslisp_repl repl

This will start up an emacs instance with a lisp shell. Then inside the lisp shell in emacs, run:

(ros-load:load-system "sam_begin_lisp" :sam-lisp-system)
(in-package :sam_begin_lisp)
(talker)

If the first line of the lisp commands above should fail, please copy-paste the complete backtrace to this question.

Now the talker should be running in lisp. You can check in a terminal with

rostopic echo /chatter

In the lisp repl, press Ctrl-c Ctrl-c and then click on abort. That shuts down the talker. Then execute in the lisp repl:

(listener)

Execute in a terminal:

rostopic pub /chatter std_msgs/String 'foo' -r 1

Now you should receive data in the lisp shell. After all of these steps worked, you can call rosmake again and it should not error out anymore. Then you can use your lisp wrapper binaries from the command line.

You are missing #:commin-lisp#:common-lisp in the use section of your package definition and you must not use #:roslisp_runtime. Another issue is that you don't export the symbols TALKER and LISTENER although you use them in the CMakeLists.txt. It should be something like that:

(defpackage sam-begin-lisp
  (:nicknames :first-package)
  (:use #:common-lisp #:roslisp)
  (:export talker listener))

You then need to change your asd file to use your new, renamed package:

rospack_add_lisp_executable(bin/talker sam-lisp-system sam-begin-lisp:talker)
rospack_add_lisp_executable(bin/listener sam-lisp-system sam-begin-lisp:listener)

Btw. it is really uncommon to use rosmake while developing a lisp node. Rather, people use the REPL to interactively develop their code. That makes debugging much easier because you get backtraces that show where an error happened.

Try the following:

rosrun roslisp_repl repl

This will start up an emacs instance with a lisp shell. Then inside the lisp shell in emacs, run:

(ros-load:load-system "sam_begin_lisp" :sam-lisp-system)
(in-package :sam_begin_lisp)
(talker)

If the first line of the lisp commands above should fail, please copy-paste the complete backtrace to this question.

Now the talker should be running in lisp. You can check in a terminal with

rostopic echo /chatter

In the lisp repl, press Ctrl-c Ctrl-c and then click on abort. That shuts down the talker. Then execute in the lisp repl:

(listener)

Execute in a terminal:

rostopic pub /chatter std_msgs/String 'foo' -r 1

Now you should receive data in the lisp shell. After all of these steps worked, you can call rosmake again and it should not error out anymore. Then you can use your lisp wrapper binaries from the command line.

You are missing #:common-lisp in the use section of your package definition and you must not use #:roslisp_runtime. Another issue is that you don't export the symbols TALKER and LISTENER although you use them in the CMakeLists.txt. It should be something like that:

(defpackage sam-begin-lisp
  (:nicknames :first-package)
  (:use #:common-lisp #:roslisp)
  (:export talker listener))

You then need to change your asd file to use your new, renamed package:

rospack_add_lisp_executable(bin/talker sam-lisp-system sam-begin-lisp:talker)
rospack_add_lisp_executable(bin/listener sam-lisp-system sam-begin-lisp:listener)

Btw. it is really uncommon to use rosmake while developing a lisp node. Rather, people use the REPL to interactively develop their code. That makes debugging much easier because you get backtraces that show where an error happened.

Try the following:

rosrun roslisp_repl repl

This will start up an emacs instance with a lisp shell. Then inside the lisp shell in emacs, run:

(ros-load:load-system "sam_begin_lisp" :sam-lisp-system)
(in-package :sam_begin_lisp)
:sam-begin-lisp)
(talker)

If the first line of the lisp commands above should fail, please copy-paste the complete backtrace to this question.

Now the talker should be running in lisp. You can check in a terminal with

rostopic echo /chatter

In the lisp repl, press Ctrl-c Ctrl-c and then click on abort. That shuts down the talker. Then execute in the lisp repl:

(listener)

Execute in a terminal:

rostopic pub /chatter std_msgs/String 'foo' -r 1

Now you should receive data in the lisp shell. After all of these steps worked, you can call rosmake again and it should not error out anymore. Then you can use your lisp wrapper binaries from the command line.