Giter Site home page Giter Site logo

Comments (15)

joao-pm-santos96 avatar joao-pm-santos96 commented on June 19, 2024 2

I know the problem is not solved, but for me it is already a great victory and something I can work with! I am truly grateful! Thank you!

Please, let me know if you need my help to perform some test!

from ompl.

wbthomason avatar wbthomason commented on June 19, 2024 1

Maybe related to this? #1103 (comment)

from ompl.

zkingston avatar zkingston commented on June 19, 2024 1

@joao-pm-santos96 thank you for testing!

from ompl.

joao-pm-santos96 avatar joao-pm-santos96 commented on June 19, 2024

Running on ubuntu 22.04.3 inside WSL2.

from ompl.

wbthomason avatar wbthomason commented on June 19, 2024

Thanks for the report!

Unfortunately, we don't really have access to a WSL environment to test with, and I've been unable to reproduce the issue with either script under native Linux (with Python 3.11; haven't tested 3.10 yet, but you said both had the same behavior). Could you please provide some more information about where the script segfaults? Both a Python line number and a core dump would be useful, but at least the Python line number will give us a starting point.

from ompl.

kylc avatar kylc commented on June 19, 2024

Hi @joao-pm-santos96,

In a fresh Ubuntu 22.04 Docker container running under a Linux host, I'm not able to reproduce a crash. Pasted below is the minimal setup I use. If you are able, it would be helpful for you to try the equivalent under WSL and see if your issue persists.

# on host
docker run -it --rm ubuntu:22.04

# in container
apt update && apt install -y python3-pip git
python3 -m pip install https://github.com/ompl/ompl/releases/download/prerelease/ompl-1.6.0-cp310-cp310-manylinux_2_28_x86_64.whl
git clone https://github.com/ompl/ompl --depth 1
python3 ompl/demos/RigidBodyPlanning.py

from ompl.

joao-pm-santos96 avatar joao-pm-santos96 commented on June 19, 2024

Thanks for the report!

Unfortunately, we don't really have access to a WSL environment to test with, and I've been unable to reproduce the issue with either script under native Linux (with Python 3.11; haven't tested 3.10 yet, but you said both had the same behavior). Could you please provide some more information about where the script segfaults? Both a Python line number and a core dump would be useful, but at least the Python line number will give us a starting point.

Hi!
ompl/demos/RigidBodyPlanning.py has two functions, planWithSimpleSetup() and planTheHardWay().

On planWithSimpleSetup() it fails here

solved = ss.solve(1.0)

On planTheHardWay() if fails here

planner.setup()

I don't have a core dump, but if you guide me I can get it for you.

from ompl.

joao-pm-santos96 avatar joao-pm-santos96 commented on June 19, 2024

Hi @joao-pm-santos96,

In a fresh Ubuntu 22.04 Docker container running under a Linux host, I'm not able to reproduce a crash. Pasted below is the minimal setup I use. If you are able, it would be helpful for you to try the equivalent under WSL and see if your issue persists.

# on host
docker run -it --rm ubuntu:22.04

# in container
apt update && apt install -y python3-pip git
python3 -m pip install https://github.com/ompl/ompl/releases/download/prerelease/ompl-1.6.0-cp310-cp310-manylinux_2_28_x86_64.whl
git clone https://github.com/ompl/ompl --depth 1
python3 ompl/demos/RigidBodyPlanning.py

Using these steps, under WSL2, everything works as expected, no segmentation fault!

from ompl.

joao-pm-santos96 avatar joao-pm-santos96 commented on June 19, 2024

Thanks for the report!

Unfortunately, we don't really have access to a WSL environment to test with, and I've been unable to reproduce the issue with either script under native Linux (with Python 3.11; haven't tested 3.10 yet, but you said both had the same behavior). Could you please provide some more information about where the script segfaults? Both a Python line number and a core dump would be useful, but at least the Python line number will give us a starting point.

Is your distro Ubuntu? A colleague of mine has tested it under native Ubuntu and found the same issue...

from ompl.

kylc avatar kylc commented on June 19, 2024

It looks like pip-installed OMPL can clash with other versions of OMPL that are installed on your system. In a ros:humble container, I see a segmentation fault running the demo after apt install ros-humble-ompl.

Probably some incompatible shared libraries getting crossed up. In the meantime I would recommend ensuring that you don't have OMPL installed via any other sources.

from ompl.

wbthomason avatar wbthomason commented on June 19, 2024

I was originally testing on Arch Linux; I've since tried using Python 3.10 on native Ubuntu 22.04, and cannot reproduce the segfault. Since you said the instructions @kylc gave worked for you and did not cause a segfault, could you share the steps you use to install OMPL and run the scripts that does create the segfault?

EDIT: Whoops, crossed comments with @kylc. He's probably right about the issue with multiple OMPL versions. If you try installing and running in a clean virtualenv, do you still see the segfault?

from ompl.

kylc avatar kylc commented on June 19, 2024

Yeah, I still see the segfault in a clean virtualenv. I think the log below explains the issue, but I'm not really sure how we can work around it at build time. Maybe we should name the shared libs differently when built for Python wheels, e.g. libompl.python.so.1.6.0?

# echo $LD_LIBRARY_PATH
/opt/ros/humble/lib/x86_64-linux-gnu:/opt/ros/humble/lib
# python3 /ompl/demos/RigidBodyPlanning.py
Segmentation fault (core dumped)

# unset LD_LIBRARY_PATH
# python3 /ompl/demos/RigidBodyPlanning.py
... runs fine

# ls /opt/ros/humble/lib/x86_64-linux-gnu
libompl.so  libompl.so.1.6.0  libompl.so.17

# ls /root/venv/lib/python3.10/site-packages/
libompl.so  libompl.so.1.6.0  libompl.so.17 ...

EDIT: Looks like the culprit is in the way OMPL tries to load the shared libs on its own. I guess this code might be needed for some install methods, but when pip-installed it isn't needed (and apparently causes problems). https://github.com/ompl/ompl/blob/main/py-bindings/ompl/__init__.py#L1-L17

from ompl.

joao-pm-santos96 avatar joao-pm-santos96 commented on June 19, 2024

I've managed to make it work. As @kylc mentioned, there may be some issue with pre-installed ompl. I had it installed using the script https://github.com/ompl/ompl/blob/main/install-ompl-ubuntu.sh.in . After I completely cleaned my system of this previous installation (including the python bindings) the pip install version now works.

from ompl.

YukiCR avatar YukiCR commented on June 19, 2024

Hi!
I encountered the same segmentation fault problem as Moveit! installs ros-neotic-ompl automatically for me before I install the wheels. Yet I still want to use ompl with python, will there be any solutions for it?

from ompl.

zkingston avatar zkingston commented on June 19, 2024

@YukiCR unfortunately, no solution yet. This is tricky since using the ROS binaries always throws a wrench into any local installation of OMPL.

from ompl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.