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

How to make a roslisp node load the shop2.asd ?

asked 2012-09-03 16:58:15 -0600

tor gravatar image

updated 2014-01-28 17:13:33 -0600

ngrennan gravatar image

Hi All,

I want to use the SHOP2 from inside ROS. Ideally, we can think of it completely as a black box.

So far, after _merely_ creating a link (under ./lispturtles_pkg/asdf) to shop2.asd, the shop2 can be loaded manually from an REPL.

* (ros-load:load-system "lispturtles_pkg" "shop2")

How to make a roslisp node do that?

I have tried this:

(defun load-shop2 ()
  (with-ros-node ("mynode")
    (ros-load:load-system "lispturtles_pkg" "shop2")
      ))

It compiled successfully, but:

$ rosrun lispturtles_pkg load-shop2
 ...
Roslisp exiting due to condition: Error while trying to load definition for
                                  system shop2 from pathname
                                  /home/me/shop2-2.8.0/shop2.asd:
                                     Component "shop-asd" not found
[(ROSLISP EVENT-LOOP) INFO] 1346726523.266: Terminating ROS Node event loop
[(ROSLISP TOP) INFO] 1346726523.303: Shutdown complete

Any ideas why? Should we adjust the shop2.asd? How? In which way?

Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-09-04 02:43:32 -0600

Lorenz gravatar image

I guess the problem is that you try to load shop2 using ros-load:load-system. For a first test, remove the link you created before and set up asdf2 to include the location you put shop2. Have a look at the ASDF documentation for setup instructions. Now you should be able to load shop2 in the repl by:

(asdf:operate 'asdf:load-op :shop2)

Now, open your asdf file in lispturtles_pkg and add shop2 to the system's dependencies.

While this solution should work, it's not perfect because it requires the user to manually install shop2 and set up asdf. A better solution would be to create a wrapper package that downloads and extracts shop2 into a ros package. For many examples, have a look at cram_core, subdirectory 3rdparty.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-09-03 16:58:15 -0600

Seen: 230 times

Last updated: Sep 04 '12