OMPL integration issue

Report crashes, strange behaviour, or apparent bugs
Post Reply
Antonio_S
Posts: 6
Joined: 17 Nov 2023, 22:18

OMPL integration issue

Post by Antonio_S »

Hello,

Apologies for this long winded question. I recently tried to download the sim with OMPL integrated in it. I tried to test it out by running non_holonomic_path_planning.ttt which was located in simOMPL/examples. I got these errors instead:

Code: Select all

[RemoteApi:loadinfo] starting a remote API server on port 19997
[sandboxScript:info] Simulator launched, welcome! 
[simCmd:warning] Sandbox language: Python
[CoppeliaSim:info] Scene: /home/antonio/MP_final_project/CoppeliaSim/simOMPL/examples/non_holonomic_path_planning.ttt
Serialization version is 25.
File was previously written with CoppeliaSim version 4.06.00 (rev 6)
[CoppeliaSim:info] Scene opened.
[sandboxScript:info] Simulation started.
[/OMPL@childScript:warning] module 'sim' was implicitly loaded.
[/OMPL@childScript:warning] module 'simUI' was implicitly loaded.
[/OMPL@childScript:error] plugin simOMPL: Cannot load library /home/antonio/MP_final_project/CoppeliaSim/libsimOMPL.so: (libompl.so.16: cannot open shared object file: No such file or directory)
[/OMPL@childScript:error] /home/antonio/MP_final_project/CoppeliaSim/lua/simOMPL.lua:7: attempt to index a nil value (local 'simOMPL')
stack traceback:
    /home/antonio/MP_final_project/CoppeliaSim/lua/simOMPL.lua:7: in main chunk
    [C]: in field 'require'
    /home/antonio/MP_final_project/CoppeliaSim/lua/base.lua:91: in function 'require'
    /home/antonio/MP_final_project/CoppeliaSim/lua/base.lua:352: in metamethod '__index'
    [string "/OMPL@childScript"]:47: in function 'task'
    [string "/OMPL@childScript"]:33: in function 'coroutineMain'
stack traceback:
    [C]: in function 'error'
    [string "/OMPL@childScript"]:9: in function 'sysCall_actuation'
I ensured that libsimOMPL.so was in the correct directory. I will go over how installed the sim and simOMPL to see if I messed up somewhere. Here were my methods:

I extracted, downloaded, and relocated the CoppeliaSim folder. I renamed it to CoppeliaSim.

I executed the following in the terminal:

Code: Select all

sudo apt-get update
sudo apt-get install xsltproc
python3 -m pip install xmlschema
I cd'ed to the CoppeliaSim folder and executed:

Code: Select all

git clone https://github.com/CoppeliaRobotics/simOMPL.git
cd simOMPL
git checkout coppeliasim-v4.6.0-rev6
mkdir -p build && cd build
I went inside the CmakeLists.txt in the simOMPL folder and added these lines after line 16 (list(APPEND .... ):

Code: Select all

set(CMAKE_MODULE_PATH "~/MP_final_project/CoppeliaSim/programming/include/cmake")
set(CMAKE_PREFIX_PATH "~/MP_final_project")
After saving and closing the .txt file I opened FindCoppeliaSim.cmake in CoppeliaSim/programming/include/cmake and added the following line at line 206.

Code: Select all

set(Python3_ROOT_DIR "/usr/bin")
I had to add the previous line due to the following commands not recognizing my sytem's python3 without me pointing to it. These were done in the build folder of simOMPL that I created.

Code: Select all

cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
cmake --install .
I also had to install these libraries because the sim said it needed them after I had launched it.

Code: Select all

python3 -m pip install pyzmq cbor2
I had run the sim before installing and after installing those two libraries and it didn't seem to change much.

Again sorry for the long winded question, but I wanted to be as detailed as possible so that it would be easier to identify if I did anything wrong.

Thank You,
Antonio S

coppelia
Site Admin
Posts: 10558
Joined: 14 Dec 2012, 00:25

Re: OMPL integration issue

Post by coppelia »

Hello Antonio,

what platform are you running on?

Cheers

Antonio_S
Posts: 6
Joined: 17 Nov 2023, 22:18

Re: OMPL integration issue

Post by Antonio_S »

Hello,

Thank you for the reply. It is Ubuntu 20.04.

coppelia
Site Admin
Posts: 10558
Joined: 14 Dec 2012, 00:25

Re: OMPL integration issue

Post by coppelia »

If you start the downloaded CoppeliaSim and type

Code: Select all

require('allModules')
what does it print?

With the original libsimOMPL.so, type following in the terminal:

Code: Select all

ldd libsimOMPL.so
What does it print?

Antonio_S
Posts: 6
Joined: 17 Nov 2023, 22:18

Re: OMPL integration issue

Post by Antonio_S »

For the first

Code: Select all

require('allModules')
, I get:

Code: Select all

[sandboxScript:info] successfully loaded module simIK
[sandboxScript:info] successfully loaded module simUI
[sandboxScript:info] successfully loaded module simGeom
[sandboxScript:info] successfully loaded module simAssimp
[sandboxScript:error] plugin simOMPL: Cannot load library /home/antonio/MP_final_project/CoppeliaSim/libsimOMPL.so: (libompl.so.16: cannot open shared object file: No such file or directory)
[sandboxScript:warning] failed loading module simOMPL
[sandboxScript:info] successfully loaded module simIM
[sandboxScript:info] successfully loaded module simVision
[sandboxScript:info] successfully loaded module simIGL
[simROS:error] ROS master is not running
[sandboxScript:error] plugin simROS: init failed.
[sandboxScript:info] successfully loaded module simROS
[sandboxScript:warning] failed loading module simROS2
[sandboxScript:info] successfully loaded module simZMQ
[sandboxScript:info] successfully loaded module simWS
[sandboxScript:info] successfully loaded module simOpenMesh
[sandboxScript:info] successfully loaded module simEigen
[sandboxScript:info] successfully loaded module simQHull
[sandboxScript:info] successfully loaded module simICP
[sandboxScript:info] successfully loaded module simRRS1
[sandboxScript:info] successfully loaded module simURDF
[sandboxScript:info] successfully loaded module simSDF
[sandboxScript:info] successfully loaded module simSubprocess
[sandboxScript:info] successfully loaded module simSurfRec
[sandboxScript:warning] failed loading module simCHAI3D
[sandboxScript:info] successfully loaded module simBullet-2-78
[sandboxScript:info] successfully loaded module simODE
[sandboxScript:info] successfully loaded module simVortex
[sandboxScript:info] successfully loaded module simNewton
[sandboxScript:info] successfully loaded module simMujoco
[sandboxScript:info] successfully loaded module simGLTF
[sandboxScript:info] successfully loaded module simOpenGL3
[sandboxScript:info] successfully loaded module simPovRay
[sandboxScript:info] successfully loaded module simQML
[sandboxScript:info] successfully loaded module simConvexDecompose
[sandboxScript:info] successfully loaded module simRuckig
[sandboxScript:info] successfully loaded module simBullet-2-83
[sandboxScript:info] successfully loaded module simCodeEditor
[sandboxScript:info] successfully loaded module simURLDrop
[sandboxScript:info] successfully loaded module simIK0
[sandboxScript:info] successfully loaded module simBubble
[sandboxScript:info] successfully loaded module simMTB
[sandboxScript:warning] failed loading module simSkel
[sandboxScript:warning] failed loading module simSkeleton
[sandboxScript:info] successfully loaded module simCmd
Error: 'bool' object has no attribute 'items'
For the

Code: Select all

ldd libsimOMPL.so
I get this for when I do it in the main directory for CoppeliaSim, I get:

Code: Select all

ldd libsimOMPL.so
        linux-vdso.so.1 (0x00007ffc79793000)
	libompl.so.16 => not found
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007febfb589000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007febfb43a000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007febfb41f000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007febfb22d000)
	/lib64/ld-linux-x86-64.so.2 (0x00007febfb847000)
When I do it in the build folder of simOMPL, I get:

Code: Select all

linux-vdso.so.1 (0x00007fff10658000)
	libompl.so.16 => /home/antonio/MP_final_project/CoppeliaSim/simOMPL/build/ompl-1.5.0-prefix/src/ompl-1.5.0-build/lib/libompl.so.16 (0x00007f0a61132000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f0a60f14000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0a60dc5000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f0a60daa000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0a60bb8000)
	libode.so.8 => /lib/x86_64-linux-gnu/libode.so.8 (0x00007f0a60a92000)
	libboost_serialization.so.1.71.0 => /lib/x86_64-linux-gnu/libboost_serialization.so.1.71.0 (0x00007f0a60a4e000)
	libboost_filesystem.so.1.71.0 => /lib/x86_64-linux-gnu/libboost_filesystem.so.1.71.0 (0x00007f0a60a30000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0a60a0d000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f0a61940000)
	libccd.so.2 => /lib/x86_64-linux-gnu/libccd.so.2 (0x00007f0a60a01000)
I noticed that the output for when I found the dependencies in the main directory it says that libompl.so.16 => not found, but checking the directory, I see that it is there in the main directory with it.

coppelia
Site Admin
Posts: 10558
Joined: 14 Dec 2012, 00:25

Re: OMPL integration issue

Post by coppelia »

So you have libompl.so.16 in CoppeliaSim's folder, but it can't be found anyways? What if you do this?

Code: Select all

ldd libompl.so.16
Also, you can start CoppeliaSim in 3 different ways:
  • ./coppeliaSim
  • ./coppeliaSim.sh
  • python3 coppeliaSim.py
do you get same results when starting with method 1 or 2?

Cheers

Post Reply