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

ROSLisp Tutorial Error in add-two-ints

asked 2016-09-02 08:26:53 -0600

toddcpierce gravatar image

updated 2016-09-03 03:39:07 -0600

gvdhoorn gravatar image

I have what seems to be a completely standard ROSLisp configuration. I have the talker and listener tutorials working; in fact so does the add-two-ints-server, but the add-two-ints-client script triggers an error in SBCL:

The symbol "ADD-TWO-INTS-CLIENT-MAIN" is not external in the ROSLISP-TUTORIALS-BASICS package.

The script looks fine:

(ros-load:load-system "roslisp_tutorials_basics" "roslisp-tutorials-basics")
(roslisp-tutorials-basics:add-two-ints-client-main)

So I´m guessing that there is a manipulation of the package environment somewhere deep in the ROS libraries that may not work on every system. These guys on the Web discovered a pretty subtle bug that caused similar behavior. They said:

(DEFVAR *BUILT-IN-PACKAGES*
  (MAPCAN (LAMBDA (PACK)
            (CONS (PACKAGE-NAME PACK) (PACKAGE-NICKNAMES PACK)))
          (LIST-ALL-PACKAGES)))

You are destructively changing the package-nicknames list of PACK. Don't do that.

Changing this to:

(defvar *built-in-packages*
  (mapcan (lambda (pack)
            (cons (package-name pack) 
                  (copy-list (package-nicknames pack))))
          (list-all-packages)))

makes the problem go away.

Is it possible that having quicklisp installed would conflict with ROS? I´m at SBCL 1.3.1. Is it advised to upgrade?

-T

edit retag flag offensive close merge delete

Comments

These guys on the Web

'these guys'?

gvdhoorn gravatar image gvdhoorn  ( 2016-09-03 03:39:21 -0600 )edit

Looking at the responses to other Lisp related questions, I have the feeling that the ROSLisp community isn't very large (any more). It might take some time before you get a reply.

It would be very nice if you could report back on any solution/work-around you find. That would help immensely.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-03 03:40:41 -0600 )edit

Could you please point at the particular part of the roslisp tutorial from the ROS wiki page when this error happens? I suspect that you are not following the tutorial.

The problem that you encountered is a minor issue, I doubt greatly that it is connected to an SBCL bug.

gaya gravatar image gaya  ( 2016-09-07 06:37:45 -0600 )edit

I did another pull of the add-two-ints tutorial and it worked. By the way, I was not implying that there was a bug in SBCL. It´s just that I´m really putting the configuration of Lisp through a lot while doing other experiments. You saved me again. How do I close this?

toddcpierce gravatar image toddcpierce  ( 2016-09-07 08:28:50 -0600 )edit

You could accept the answer by @gaya by ticking the checkmark to the left of the answer. That would mark the question as answered.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-07 08:45:56 -0600 )edit

We don't typically close questions here on ROS Answers. Marking the question as answered is much more visible from the question list.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-07 08:46:32 -0600 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2016-09-07 06:51:39 -0600

gaya gravatar image

I committed a fix to the tutorial. Do a git pull and try again. I strongly recommend, though, that you follow the text in the tutorials on the ROS wiki page, e.g. here:

http://wiki.ros.org/roslisp/Tutorials...

The text in those tutorials will help a lot to figure out what is going on in the tutorial code.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-09-02 08:26:53 -0600

Seen: 257 times

Last updated: Sep 07 '16