how to install
Hi, is this a working solution? How can I install it?
I think it's still available, because it had been used in production for years, even though it has not been updated for a long time. How to install:
# install boost-python, for debian or ubuntu
apt-get install libboost-python-dev
# install boost-python, for centos or fedora
yum install boost-devel boost-python
# clone source code
git clone https://github.com/layzerar/recastlib.git
cd recastlib
# patch the recast code
cp -rf ./Recast\(Patched\)/Detour/ ./Recast/
# build and install
python setup.py install
# test
cd examples && python simpletest.py
PS: If you want to use this library for Unity3D's NavMesh.asset, you should checkout the branch unity3d.
d:recastlib$ python setup.py install
running install
running build
running build_ext
running install_lib
running install_egg_info
Removing /usr/local/lib/python2.7/dist-packages/_recast-0.0.0.egg-info
Writing /usr/local/lib/python2.7/dist-packages/_recast-0.0.0.egg-info
d:recastlib$ cd examples && python simpletest.py
Traceback (most recent call last):
File "simpletest.py", line 8, in
@mimooh Sorry, I leave out one step.
# install boost-python, for debian or ubuntu
apt-get install libboost-python-dev
# install boost-python, for centos or fedora
yum install boost-devel boost-python
# clone source code
git clone https://github.com/layzerar/recastlib.git
cd recastlib
# patch the recast code
cp -rf ./Recast\(Patched\)/Detour/ ./Recast/
# build and install
python setup.py install
# test
cd examples && python simpletest.py
You may also need clean current working tree by running git clean -xfd before you rebuild the module.
No way! This is working! You wouldn't believe how much time I've spent trying to bring recastdetour into python! There are c++, js, go solutions, but I just couldn't make any progress. The simpletest.py looks easy, returned values without errors, so I'll be inspecting it, but this time I finally hope to get things going. Thanks a lot!
On 05/07/2018, Mel Ts [email protected] wrote:
You may also need clean current working tree by running
git clean -xfdbefore you rebuild the module.-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/layzerar/recastlib/issues/1#issuecomment-402689732
Two questions first:
-
What would it take to support python3? Could you make it perhaps? :)
-
Can this package create the navmesh from geometry? Well, I have another tool which produces the binary navmesh from an obj file, but I just hope that binary will be compatible with whatever your package requires as the navmesh input.
On 05/07/2018, Karol Krenski [email protected] wrote:
No way! This is working! You wouldn't believe how much time I've spent trying to bring recastdetour into python! There are c++, js, go solutions, but I just couldn't make any progress. The simpletest.py looks easy, returned values without errors, so I'll be inspecting it, but this time I finally hope to get things going. Thanks a lot!
On 05/07/2018, Mel Ts [email protected] wrote:
You may also need clean current working tree by running
git clean -xfdbefore you rebuild the module.-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/layzerar/recastlib/issues/1#issuecomment-402689732
Congratulations!
- What would it take to support python3? Could you make it perhaps? :)
Since the glue layer of this project is depending on the Boost-Python, and Boost-Python support Python 3 since version 1.41. Most likely it could work with just adapt simpletest.py to Python 3. It's quite a simple task.
- Can this package create the navmesh from geometry? Well, I have another tool which produces the binary navmesh from an obj file, but I just hope that binary will be compatible with whatever your package requires as the navmesh input.
Short answer is no, this package only ported the query APIs of RecastNavigation, such as path finding, raycast etc. Fortunately the master branch could load mesh data generated by RecastDemo, you can get RecastDemo from the original RecastNavigation project. And the unity3d branch could load mesh data(NavMesh.asset file) generated by Unity3D. So you can choose one of them.
I managed to succesfully load into simpletest.py a binary navmesh produced by this tool: https://github.com/arl/go-detour, so it works!
I converted the simpletest.py to python3, but I ran into:
mimooh:examples$ python3 simpletest3.py
Traceback (most recent call last):
File "simpletest3.py", line 8, in
Is this severe, or is there an easy fix?
It is likely my python3 libboost problem may be general for my Ubuntu 16.04, not your package: https://stackoverflow.com/questions/5539557/boost-and-python-3-x/21460832
I will upgrade to ubuntu 18.04 and report if it fixes the issue.
Hmmm, doesn't work under ubuntu 18.04. Is it more linux/liboost issue, or your package issue?
lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04 LTS Release: 18.04 Codename: bionic
python3 simpletest.py
Traceback (most recent call last):
File "simpletest.py", line 8, in
The recent releases of Ubuntu or Debian contain multiple version of Python. So you may need to change the link flags in setup.py manually if the setup script cann't find the correct version of Boost-Python. For example, you should change the line libraries += ['boost_python'] in setup.py to libraries += ['boost_python-py35'] on Debian Stretch.
Just update, should be compiled on Python 3.
Awesome, you libboost wizard! Except it didn't work initially for me, and this fix was needed: if sys.version_info[0] == 3:
- libraries += ['boost_python3']
- libraries += ['boost_python-py35']
UPDATE: Various ubuntus have various libboost files. Just make sure there is /usr/lib/x86_64-linux-gnu/libboost_python3.so present (a link to py35 or py37 etc) and then libraries += ['boost_python3'] will do.
Hi, thanks again for your code. I managed to integrate it in my project and this extremally valuable for us! However, it fails at some more complex geometries. I compare the results against the original and fresh RecastDemo and the orignal seems to handle things better. I guess they have improved the algorithms over these 5 or so years. Hence my question: would would it take to have python+boost+current Recast? I mean, could you try? :)
Well, it works, no need for a fresher recastDetour code. I thought the navmesh would not always reach from src to dst, but it was only due to max limit of hops (which serves to improve performance). Thanks again, for this lovely piece of code and for making it opensource! We use it in https://github.com/aamks/aamks.
hello, I have a problem when i run "pythonsimpletest.py " "_recast.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZNK13dtQueryFilter10passFilterEjPK10dtMeshTilePK6dtPoly", What happened?
@djy4713 please see https://github.com/layzerar/recastlib/issues/1#issuecomment-402687318