0
$\begingroup$

Rosanswers logo

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.


Originally posted by tor on ROS Answers with karma: 277 on 2012-09-03

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Lorenz with karma: 22731 on 2012-09-04

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.