KavrakiLab / tmkit

A Task-Motion Planning Framework
http://tmkit.kavrakilab.org
BSD 3-Clause "New" or "Revised" License
48 stars 12 forks source link

Support for >SBCL-1.4.5 #9

Closed theredcomputer closed 5 years ago

theredcomputer commented 5 years ago

Do you currently only support ROS Kinetic? I've attempted to install tmkit with Melodic, but there is a consistent error where the "import aminopy as aa" and "import tmsmtpy as tm" lines in tm-blocks.py consistently fail for an unknown reason (CLPython says it's an ImportError).

I've been able to get tmkit working on Kinetic but not Indigo due to a lack of package support.

ndantam commented 5 years ago

I do not think this is specifically ROS-related since TMKit is only loosely coupled with ROS (we import URDFs, but that is all). The issue seems to be compatibility with the OS distribution. We are developing mainly on Debian Stable / Ubuntu LTS, though I am not sure if we have migrated yet to the most recent Ubuntu LTS version. Going forward, the plan is to ensure comparability with Stable/LTS, but I don't think we have the cycles to fully support other releases ourselves.

Which distribution/release are you using?

On 11/2/18 11:01 PM, Stephen Eick wrote:

Do you currently only support ROS Kinetic? I've attempted to install tmkit with Melodic, but there is a consistent error where the "import aminopy as aa" and "import tmsmtpy as tm" lines in tm-blocks.py consistently fail for an unknown reason (CLPython says it's an ImportError).

I've been able to get tmkit working on Kinetic but not Indigo due to a lack of package support.

-- Neil T. Dantam, Ph.D. Assistant Professor Department of Computer Science Colorado School of Mines http://www.mines.edu/~ndantam

theredcomputer commented 5 years ago

My goal has been to get TMKit running in a Docker container using ROS Melodic. When my Dockerfile imports a specific version of ROS (for example, Kinetic), apt uses the packages for the appropriate Ubuntu distribution (so, xenial). So far, I've found that TMKit encounters fatal errors on Ubuntu 14.04 (trusty --> ROS Indigo) and 18.04 (bionic --> ROS Melodic). The errors on each distro are distinct.

When I use Ubuntu 16.04 (xenial --> ROS Kinetic), the only issue encountered was my container not seeing the libraries in /usr/local/lib. Changing the install prefix to "/usr" fixed that problem.

As of last night, I'm successfully able to create a Docker image running TMKit with Ubuntu 16.04/xenial/ROS Kinetic with no noticeable impact to performance, graphics and all. I'm happy to share the code, if you'd like.

That being said, I'd really like this to work with Melodic. This is part of a project for Frank Dellaert, and certain components of our tooling have been developed in Melodic.

ndantam commented 5 years ago

My goal has been to get TMKit running in a Docker container using ROS Melodic. When my Dockerfile imports a specific version of ROS (for example, Kinetic), apt uses the packages for the appropriate Ubuntu distribution (so, xenial).

We do have some docker containers for integration testing under script/docker, though I have been lax in maintaining them recently.

So far, I've found that TMKit encounters fatal errors on Ubuntu 14.04 (trusty --> ROS Indigo) and 18.04 (bionic --> ROS Melodic). The errors on each distro are distinct.

@andrewmw94 and @Schackma, Have you run TMKit on Ubuntu 18.04 yet? If not, looks like we will have a compatibility issue to fix.

When I use Ubuntu 16.04 (xenial --> ROS Kinetic), the only issue encountered was my container not seeing the libraries in /usr/local/lib. Changing the install prefix to "/usr" fixed that problem.

Sometimes you need a sudo ldconfig to pick up new libraries in /usr/local.

As of last night, I'm successfully able to create a Docker image running TMKit with Ubuntu 16.04/xenial/ROS Kinetic with no noticeable impact to performance, graphics and all. I'm happy to share the code, if you'd like.

Sure, I do need to update the integration tests. Thanks!

That being said, I'd really like this to work with Melodic.

We do need get TMKit working under Ubuntu 18.04, which would presumably fix your issue. Could you please send a copy of the complete error (stack trace, etc.)?

This is part of a project for Frank Dellaert, and certain components of our tooling have been developed in Melodic.

Please send my regards to Frank.

ndantam commented 5 years ago

Also, if you want a workaround today, and could run on Debian, it looks like ROS Melodic works on Debian Stretch (current Stable): http://wiki.ros.org/melodic/Installation.

theredcomputer commented 5 years ago

Sometimes you need a sudo ldconfig to pick up new libraries in /usr/local.

Of course, thank you. Mark that as resolved.

Could you please send a copy of the complete error (stack trace, etc.)?

The following occurs when running on Ubuntu 18.04. Both the amino and tmkit/tmsmt libraries have been installed at /usr/local/lib and sourced with ldconfig.

stephen@ubuntu:~/baxter-blocks$ tmsmt package://baxter_description/urdf/baxter.urdf sussman-0.robray allowed-collision.robray tm-blocks.pddl tm-blocks.py -q q0.tmp -g sussman-1.robray -o baxter-sussman.tmp
Unhandled CLPYTHON.USER.BUILTIN.TYPE.EXCEPTION:|ImportError| in thread #<SB-THREAD:THREAD "main thread" RUNNING
                                                                          {10006B05B3}>:
  ImportError: Loading of module `aminopy' was aborted. Binary: /tmp/clpython-aminopy-fasl-1win169z

Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {10006B05B3}>
0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK ImportError: Loading of module `aminopy' was aborted. Binary: /tmp/clpython-aminopy-fasl-1win169z #<unused argument> :QUIT T)
1: (SB-DEBUG::RUN-HOOK *INVOKE-DEBUGGER-HOOK* ImportError: Loading of module `aminopy' was aborted. Binary: /tmp/clpython-aminopy-fasl-1win169z)
2: (INVOKE-DEBUGGER ImportError: Loading of module `aminopy' was aborted. Binary: /tmp/clpython-aminopy-fasl-1win169z)
3: (ERROR CLPYTHON.USER.BUILTIN.TYPE.EXCEPTION:|ImportError| :ARGS ("Loading of module `~A' was aborted. ~
                                            ~@[~:@_Source: ~A~]~@[~:@_Binary: ~A~]~@[~:@_Imported by: ~A~]" "aminopy" NIL #P"/tmp/clpython-aminopy-fasl-1win169z" NIL))
4: (CLPYTHON:PY-RAISE CLPYTHON.USER.BUILTIN.TYPE.EXCEPTION:|ImportError| "Loading of module `~A' was aborted. ~
                                            ~@[~:@_Source: ~A~]~@[~:@_Binary: ~A~]~@[~:@_Imported by: ~A~]" "aminopy" NIL #P"/tmp/clpython-aminopy-fasl-1win169z" NIL)
5: ((FLET CLPYTHON::LOG-ABORT :IN CLPYTHON::PY-IMPORT) T)
6: ((FLET "CLEANUP-FUN-54" :IN CLPYTHON::PY-IMPORT)) [cleanup]
7: (CLPYTHON::PY-IMPORT (CLPYTHON.USER::|aminopy|) :WITHIN-MOD-PATH NIL :WITHIN-MOD-NAME "__main__")
8: (CLPYTHON::|python-module __main__|)
9: (CLPYTHON.USER::|{__main__[3] "import aminopy as aa" #4347493795708768588}| #<HASH-TABLE :TEST EQ :COUNT 5 {10047D19E3}>)
10: ((FLET CLPYTHON::RUN-TOP-LEVEL-FORMS :IN CLPYTHON::MODULE-INIT) #<HASH-TABLE :TEST EQ :COUNT 5 {10047D19E3}>)
11: ((FLET CLPYTHON:RUN :IN CLPYTHON:RUN-PYTHON-AST))
12: (CLPYTHON:RUN-PYTHON-AST (CLPYTHON.AST.NODE:|module-stmt| (CLPYTHON.AST.NODE:|suite-stmt| ((CLPYTHON.AST.NODE:|assign-stmt| (CLPYTHON.AST.TOKEN:|literal-expr| :NUMBER 0.1d0) (#)) (CLPYTHON.AST.NODE:|assign-stmt| (CLPYTHON.AST.TOKEN:|literal-expr| :STRING "end_effector_grasp") (#)) (CLPYTHON.AST.NODE:|assign-stmt| (CLPYTHON.AST.TOKEN:|literal-expr| :NUMBER 1.0d-4) (#)) (CLPYTHON.AST.NODE:|import-stmt| (#)) (CLPYTHON.AST.NODE:|import-stmt| (#)) (CLPYTHON.AST.NODE:|import-stmt| (#)) (CLPYTHON.AST.NODE:|import-from-stmt| (CLPYTHON.USER::|math|) (#)) (CLPYTHON.AST.NODE:|import-stmt| (#)) (CLPYTHON.AST.NODE:|funcdef-stmt| NIL (CLPYTHON.AST.NODE:|identifier-expr| CLPYTHON.USER::|map_locations|) (# NIL NIL NIL) (CLPYTHON.AST.NODE:|suite-stmt| #)) (CLPYTHON.AST.NODE:|funcdef-stmt| NIL (CLPYTHON.AST.NODE:|identifier-expr| CLPYTHON.USER::|location_table|) (# NIL NIL NIL) (CLPYTHON.AST.NODE:|suite-stmt| #)) (CLPYTHON.AST.NODE:|funcdef-stmt| NIL (CLPYTHON.AST.NODE:|identifier-expr| CLPYTHON.USER::|collision_constraint|) (# NIL NIL NIL) (CLPYTHON.AST.NODE:|suite-stmt| #)) (CLPYTHON.AST.NODE:|funcdef-stmt| NIL (CLPYTHON.AST.NODE:|identifier-expr| CLPYTHON.USER::|make_state|) (# NIL NIL NIL) (CLPYTHON.AST.NODE:|suite-stmt| #)) ...))) :HABITAT NIL :COMPILE NIL :MODULE-GLOBALS NIL :TIME NIL :ARGS NIL)
13: (SB-KERNEL:%MAP-FOR-EFFECT-ARITY-1 #<FUNCTION TMSMT::TMP-SCRIPT> ("tm-blocks.py"))
14: (TMSMT:TMP-DRIVER :TIMES-FILE NIL :START-SCENE ("package://baxter_description/urdf/baxter.urdf" "sussman-0.robray" "allowed-collision.robray") :GOAL-SCENE ("sussman-1.robray") :PDDL ("tm-blocks.pddl") :GUI NIL :SCRIPTS ("tm-blocks.py") :VERBOSE NIL :MAX-STEPS 10 :OUTPUT "baxter-sussman.tmp" :WRITE-FACTS NIL :MOTION-TIMEOUT NIL :START-PLAN "q0.tmp" :START NIL :PREFIX-CACHE T :CONSTRAINTS :STATE)
15: (SB-INT:SIMPLE-EVAL-IN-LEXENV (TMSMT::TMP-COMMAND) #<NULL-LEXENV>)
16: (EVAL (TMSMT::TMP-COMMAND))
17: (SB-IMPL::PROCESS-EVAL/LOAD-OPTIONS ((:EVAL . "(require :tmsmt)") (:EVAL . "(tmsmt::tmp-command)") (:QUIT)))
18: (SB-IMPL::TOPLEVEL-INIT)
19: ((FLET SB-UNIX::BODY :IN SAVE-LISP-AND-DIE))
20: ((FLET "WITHOUT-INTERRUPTS-BODY-36" :IN SAVE-LISP-AND-DIE))
21: ((LABELS SB-IMPL::RESTART-LISP :IN SAVE-LISP-AND-DIE))

unhandled condition in --disable-debugger mode, quitting
ndantam commented 5 years ago

Thank you for the backtrace.

I have duplicated your issue using SBCL 1.4.13 on Debian Squeeze. Appears to be a compatibility problem between newer SBCL and how we are using CLPython. Please let me look into this.

In the meantime, an alternate workaround for you would be to install a downgraded SBCL. Version 1.3.1 from Ubuntu Xenial should work.

ndantam commented 5 years ago

Looks like an upstream issue in CLPython. Pull request submitted https://github.com/metawilm/cl-python/pull/25

ndantam commented 5 years ago

CLPython has merged the pull request. Eventually, this update will filter into the Quicklisp package manager. Until then, you can manually install the updated CLPython by cloning the git repo and setting a symlink to clpython.asd under $HOME/.local/share/common-lisp/source/ (may need to create the directory).

theredcomputer commented 5 years ago

Great, thank you!