Giter Site home page Giter Site logo

uoip / pangolin Goto Github PK

View Code? Open in Web Editor NEW
281.0 6.0 88.0 1.87 MB

Python binding of 3D visualization library Pangolin

License: MIT License

CMake 3.98% C++ 85.82% C 7.56% Objective-C 0.29% Python 1.01% Objective-C++ 1.34%
pangolin opengl 3d visualization point-cloud slam binding python

pangolin's Introduction

pangolin

The project implements a python binding for 3D visualization library Pangolin.

Pangolin is a lightweight portable rapid development library for managing OpenGL display / interaction and abstracting video input. At its heart is a simple OpenGL viewport manager which can help to modularise 3D visualisation without adding to its complexity, and offers an advanced but intuitive 3D navigation handler. Pangolin also provides a mechanism for manipulating program variables through config files and ui integration, and has a flexible real-time plotter for visualising graphical data.
The ethos of Pangolin is to reduce the boilerplate code that normally gets written to visualise and interact with (typically image and 3D based) systems, without compromising performance. It also enables write-once code for a number of platforms, currently including Windows, Linux, OSX, Android and IOS.

This binding is primarily written for SLAM related visualization in python, for convenience, I write some handy functions (DrawPoints, DrawLines, DrawCameras, DrawBoxes) for drawing point clouds, trajectory, poses and 3d bounding boxes. These functions can access numpy array directly, so are very efficient. Actually, this library has little python overload.
Some of Pangolin's C++ functions are not wrapped, for implemented part, see examples or Gallery below.

Requirements

  • C++: dependencies.
    This project also relies on pybind11, but it's built in this repository, you don't need to install.
  • Python: To run those python examples, you should have numpy and PyOpenGL installed.

Installation

git clone https://github.com/uoip/pangolin.git
cd pangolin
mkdir build
cd build
cmake ..
make -j8
cd ..
python setup.py install

Tested under Ubuntu 16.04, Python 3.6+.

Getting started

The code below create a window, and render a cube and a cloud of points.

import numpy as np
import OpenGL.GL as gl
import pangolin

pangolin.CreateWindowAndBind('Main', 640, 480)
gl.glEnable(gl.GL_DEPTH_TEST)

# Define Projection and initial ModelView matrix
scam = pangolin.OpenGlRenderState(
    pangolin.ProjectionMatrix(640, 480, 420, 420, 320, 240, 0.2, 100),
    pangolin.ModelViewLookAt(-2, 2, -2, 0, 0, 0, pangolin.AxisDirection.AxisY))
handler = pangolin.Handler3D(scam)

# Create Interactive View in window
dcam = pangolin.CreateDisplay()
dcam.SetBounds(0.0, 1.0, 0.0, 1.0, -640.0/480.0)
dcam.SetHandler(handler)

while not pangolin.ShouldQuit():
    gl.glClear(gl.GL_COLOR_BUFFER_BIT | gl.GL_DEPTH_BUFFER_BIT)
    gl.glClearColor(1.0, 1.0, 1.0, 1.0)
    dcam.Activate(scam)
    
    # Render OpenGL Cube
    pangolin.glDrawColouredCube()

    # Draw Point Cloud
    points = np.random.random((100000, 3)) * 10
    gl.glPointSize(2)
    gl.glColor3f(1.0, 0.0, 0.0)
    pangolin.DrawPoints(points)

    pangolin.FinishFrame()

As shown above, this library works seamlessly with PyOpenGL and numpy, it can access numpy array directly without copying data (thanks to pybind11).

HelloPangolin.py (point cloud and 3d object):

SimpleDisplayImage.py (image and 3d object):

SimpleDisplayMenu.py (basic GUI):

SimpleMultiDisplay.py (multiple display windows):

SimplePlot.py (2d plot):

SimplePlotDisplay.py (2d plot and 3d object):

simple_draw.py draw point clouds, camera/pose, 3d boxes, lines(consecutive or separate):

License

Follow Pangolin, the C++ binding code and python example code of this project is released under MIT License.

Contact

If you have problems related to binding code/python interface/python examples of this project, you can report isseus, or email me ([email protected]).






README of Pangolin:




What is Pangolin {#mainpage}

Pangolin is a lightweight portable rapid development library for managing OpenGL display / interaction and abstracting video input. At its heart is a simple OpenGl viewport manager which can help to modularise 3D visualisation without adding to its complexity, and offers an advanced but intuitive 3D navigation handler. Pangolin also provides a mechanism for manipulating program variables through config files and ui integration, and has a flexible real-time plotter for visualising graphical data.

The ethos of Pangolin is to reduce the boilerplate code that normally gets written to visualise and interact with (typically image and 3D based) systems, without compromising performance. It also enables write-once code for a number of platforms, currently including Windows, Linux, OSX, Android and IOS.

Code

Find the latest version on Github:

git clone https://github.com/stevenlovegrove/Pangolin.git

Optional dependencies are enabled when found, otherwise they are silently disabled. Check the CMake configure output for details.

Required Dependencies

  • C++11

  • OpenGL (Desktop / ES / ES2)

  • Glew

  • (win) built automatically (assuming git is on your path)

  • (deb) sudo apt-get install libglew-dev

  • (mac) sudo port install glew

  • CMake (for build environment)

  • (win) http://www.cmake.org/cmake/resources/software.html

  • (deb) sudo apt-get install cmake

  • (mac) sudo port install cmake

Recommended Dependencies

Optional Dependencies for video input

  • FFMPEG (For video decoding and image rescaling)

  • (deb) sudo apt-get install ffmpeg libavcodec-dev libavutil-dev libavformat-dev libswscale-dev

  • DC1394 (For firewire input)

  • (deb) sudo apt-get install libdc1394-22-dev libraw1394-dev

  • libuvc (For cross-platform webcam video input via libusb)

  • git://github.com/ktossell/libuvc.git

  • libjpeg, libpng, libtiff, libopenexr (For reading still-image sequences)

  • (deb) sudo apt-get install libjpeg-dev libpng12-dev libtiff5-dev libopenexr-dev

  • OpenNI / OpenNI2 (For Kinect / Xtrion / Primesense capture)

  • DepthSense SDK

Very Optional Dependencies

  • Eigen / TooN (These matrix types supported in the Pangolin API.)

  • CUDA Toolkit >= 3.2 (Some CUDA header-only interop utilities included)

  • http://developer.nvidia.com/cuda-downloads

  • Doxygen for generating html / pdf documentation.

Building

Pangolin uses the CMake portable pre-build tool. To checkout and build pangolin in the directory 'build', execute the following at a shell (or the equivelent using a GUI):

git clone https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin
mkdir build
cd build
cmake ..
cmake --build .

If you would like to build the documentation and you have Doxygen installed, you can execute:

cmake --build . --target doc

On Windows, Pangolin will attempt to download and build glew, libjpeg, libpng and zlib automatically. It does so assuming that git is available on the path - this assumption may be wrong for windows users who have downloaded Pangolin via a zip file on github. You will instead need to download and compile the dependencies manually, and set the BUILD_EXTERN_(lib) options to false for these libraries. The alternate and recommended approach is to install gitbash and work from within their provided console.

Issues

Please visit Github Issues to view and report problems with Pangolin. Issues and pull requests should be raised against the master branch which contains the current development version.

Please note; most Pangolin dependencies are optional - to disable a dependency which may be causing trouble on your machine, set the BUILD_PANGOLIN_(option) variable to false with a cmake configuration tool (e.g. ccmake or cmake-gui).

Contributions and Continuous Integration

For CI, Pangolin uses travis-ci.org for Ubuntu, OSX and ci.appveyor.com for Windows.

To contribute to Pangolin, I would appreciate pull requests against the master branch. This will trigger CI builds for your changes automatically, and help me to merge with confidence.

Binaries

Binaries are available for Windows x64, as output by the Windows CI server: Appveyor Artifacts.

Acknowledgements

I'd like to thank the growing number of kind contributors to Pangolin for helping to make it more stable and feature rich. Many features of Pangolin have been influenced by other projects such as GFlags, GLConsole, and libcvd in particular. I'd also like to thank the FOSS projects on which Pangolin depends.

For a summary of those who have made code contributions, execute:

git shortlog -sne

pangolin's People

Contributors

martinarroyo avatar uoip avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pangolin's Issues

ubuntu 16.04 python 3.7 cmake warning

Hi! on running the ""cmake .." command, I get this warning. I'm wondering if this an issue to be taken care of.

CMake Warning at python/CMakeLists.txt:3 (find_package):
  By not providing "Findpybind11.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "pybind11",
  but CMake did not find one.

  Could not find a package configuration file provided by "pybind11" with any
  of the following names:

    pybind11Config.cmake
    pybind11-config.cmake

  Add the installation prefix of "pybind11" to CMAKE_PREFIX_PATH or set
  "pybind11_DIR" to a directory containing one of the above files.  If
  "pybind11" provides a separate development package or SDK, be sure it has
  been installed.


-- Configuring done
-- Generating done

use of undeclared identifier '_window'

when I try to make pangolin, I get this error:
pangolin/src/display/device/PangolinNSGLView.mm:75:54: error: use of undeclared identifier '_window'

this part of code:
-(void)reshape
1 {
74 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
1 if ( [self wantsBestResolutionOpenGLSurface] && [_window respondsToSelector:@selector(backingScaleFactor) ] )
2 backing_scale = [_window backingScaleFactor];
3 else
4 #endif
5 backing_scale = 1.0;
6
7 pangolin::process::Resize(self.bounds.size.width * backing_scale, self.bounds.size.height * backing_scale);
8
9 [[self openGLContext] update];
10 }

I try to just comment this stuff and all was cool, but when I run HellowPangolin.py, I get only red window

help plz, mb I need to rename this variable?

installation error

Doing all previous installation steps and running python setup.py install results in NameError: global name 'install_dirs' is not defined.

Parrot-OS cmake error. Python-3.6.6

I return after the execute "make -j8" command.
/home/f3l1x/Desktop/pangolin/include/pangolin/var/varwrapper.h: In instantiation of ‘void pangolin::VarWrapper<T, S>::Set(const T&) [with T = bool; S = double]’: /home/f3l1x/Desktop/pangolin/include/pangolin/var/varwrapper.h:75:10: required from here /home/f3l1x/Desktop/pangolin/include/pangolin/var/varwrapper.h:80:10: warning: catching polymorphic type ‘struct pangolin::BadInputException’ by value [-Wcatch-value=] /home/f3l1x/Desktop/pangolin/include/pangolin/var/varwrapper.h: In instantiation of ‘void pangolin::VarWrapper<T, S>::Set(const T&) [with T = bool; S = float]’: /home/f3l1x/Desktop/pangolin/include/pangolin/var/varwrapper.h:75:10: required from here /home/f3l1x/Desktop/pangolin/include/pangolin/var/varwrapper.h:80:10: warning: catching polymorphic type ‘struct pangolin::BadInputException’ by value [-Wcatch-value=] /home/f3l1x/Desktop/pangolin/include/pangolin/var/varwrapper.h: In instantiation of ‘void pangolin::VarWrapper<T, S>::Set(const T&) [with T = bool; S = long int]’: /home/f3l1x/Desktop/pangolin/include/pangolin/var/varwrapper.h:75:10: required from here /home/f3l1x/Desktop/pangolin/include/pangolin/var/varwrapper.h:80:10: warning: catching polymorphic type ‘struct pangolin::BadInputException’ by value [-Wcatch-value=] /home/f3l1x/Desktop/pangolin/include/pangolin/var/varwrapper.h: In instantiation of ‘void pangolin::VarWrapper<T, S>::Set(const T&) [with T = bool; S = int]’: /home/f3l1x/Desktop/pangolin/include/pangolin/var/varwrapper.h:75:10: required from here /home/f3l1x/Desktop/pangolin/include/pangolin/var/varwrapper.h:80:10: warning: catching polymorphic type ‘struct pangolin::BadInputException’ by value [-Wcatch-value=] /home/f3l1x/Desktop/pangolin/include/pangolin/var/varwrapper.h: In instantiation of ‘void pangolin::VarWrapper<T, S>::Set(const T&) [with T = bool; S = short int]’: /home/f3l1x/Desktop/pangolin/include/pangolin/var/varwrapper.h:75:10: required from here /home/f3l1x/Desktop/pangolin/include/pangolin/var/varwrapper.h:80:10: warning: catching polymorphic type ‘struct pangolin::BadInputException’ by value [-Wcatch-value=] /home/f3l1x/Desktop/pangolin/include/pangolin/var/varwrapper.h: In instantiation of ‘void pangolin::VarWrapper<T, S>::Set(const T&) [with T = bool; S = bool]’: /home/f3l1x/Desktop/pangolin/include/pangolin/var/varwrapper.h:75:10: required from here /home/f3l1x/Desktop/pangolin/include/pangolin/var/varwrapper.h:80:10: warning: catching polymorphic type ‘struct pangolin::BadInputException’ by value [-Wcatch-value=] make[2]: *** [src/CMakeFiles/_pangolin.dir/build.make:973: src/CMakeFiles/_pangolin.dir/video/drivers/ffmpeg.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:141: src/CMakeFiles/_pangolin.dir/all] Error 2 make: *** [Makefile:152: all] Error 2

Black window while running HalloPangolin.py

I successfully installed pangolin on my Mac (OSX 11.2.3) and ran the HalloPangolin.py example. It seems that the window shows up, but the content is not visualised. Instead it showed coloured noise at the beginning and now only a black window.

I build it with cmake version 3.18.4 and ran it with python 3.7.10 with PyOpenGL-3.1.5 and pybind11-2.6.2

Screenshot 2021-04-15 at 13 40 18

OSx Make Error

I am trying to build on a mac and receiving the below errors, I'm not sure what to do to fix it. Can anyone help?

Thank you

In file included from /Users/lrayner/PycharmProjects/playground2/pangolin/python/pangolin.cpp:2: /Users/lrayner/PycharmProjects/playground2/pangolin/external/pybind11/include/pybind11/stl.h:283:46: error: no member named 'experimental' in namespace 'std' template<typename T> struct type_caster<std::experimental::optional<T>> ~~~~~^ /Users/lrayner/PycharmProjects/playground2/pangolin/external/pybind11/include/pybind11/stl.h:283:69: error: 'T' does not refer to a value template<typename T> struct type_caster<std::experimental::optional<T>> ^ /Users/lrayner/PycharmProjects/playground2/pangolin/external/pybind11/include/pybind11/stl.h:283:19: note: declared here template<typename T> struct type_caster<std::experimental::optional<T>> ^ /Users/lrayner/PycharmProjects/playground2/pangolin/external/pybind11/include/pybind11/stl.h:286:36: error: no member named 'experimental' in namespace 'std' template<> struct type_caster<std::experimental::nullopt_t>

Asserion error on running `python setup.py install`

Hi,
I am getting this error on running python setup.py install

running install
Traceback (most recent call last):
  File "setup.py", line 49, in <module>
    graphical data."""
  File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/usr/local/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/local/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 22, in run
    assert len(lib_file) == 1 and len(install_dirs) >= 1     
AssertionError

cmake .. make a error

why does it lack of a package configuration file named pybind11Config.cmake or pybind11-config.cmake when I run "cmake .. ". the github introduction doesn't have a demostration on this.

`(visualize3D) E:\3D可视化\pangolin\build>cmake ..
-- Selecting Windows SDK version to target Windows 10.0.14393.
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
CMake Warning (dev) in CMakeModules/FindMediaFoundation.cmake:
A logical block opening on the line

E:/3D可视化/pangolin/CMakeModules/FindMediaFoundation.cmake:13 (IF)

closes on the line

E:/3D可视化/pangolin/CMakeModules/FindMediaFoundation.cmake:15 (ENDIF)

with mis-matching arguments.
Call Stack (most recent call first):
src/CMakeLists.txt:427 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

-- MediaFoundation Found and Enabled
-- libpng Found and Enabled
-- libjpeg Found and Enabled
-- libtiff Found and Enabled
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
CMake Warning at python/CMakeLists.txt:3 (find_package):
By not providing "Findpybind11.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "pybind11",
but CMake did not find one.

Could not find a package configuration file provided by "pybind11" with any
of the following names:

pybind11Config.cmake
pybind11-config.cmake

Add the installation prefix of "pybind11" to CMAKE_PREFIX_PATH or set
"pybind11_DIR" to a directory containing one of the above files. If
"pybind11" provides a separate development package or SDK, be sure it has
been installed.

CMake Error at external/pybind11/tools/FindPythonLibsNew.cmake:122 (message):
Python config failure: Python is 64-bit, chosen compiler is 32-bit
Call Stack (most recent call first):
external/pybind11/tools/pybind11Tools.cmake:16 (find_package)
python/CMakeLists.txt:9 (include)

-- Configuring incomplete, errors occurred!
See also "E:/3D可视化/pangolin/build/CMakeFiles/CMakeOutput.log".
See also "E:/3D可视化/pangolin/build/CMakeFiles/CMakeError.log".`

setup.py different names for variable

I just had an issue installing pangolin. It's cause by different names for variables in the setup.py. get_python_lib() is copied into install_dir and afterwards it's checked for install_dirs.
Maybe you want to correct this.
Kind regards

Visualizing meshes

I really like the speed that it can render point clouds compared to other libraries. I was wondering if there is a way to render meshes with Pangolin.

Fix needed for the build with ffmpeg 4.0

The repository needs an update due to several build processes are broken

Building CXX object src/CMakeFiles/_pangolin.dir/video/drivers/ffmpeg.cpp.o
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp: In function 'std::__cxx11::string pangolin::FfmpegFmtToString(AVPixelFormat)':
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: 'AV_PIX_FMT_XVMC_MPEG2_MC' was not declared in this scope
 #  define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
                                         ^
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp:83:5: note: in expansion of macro 'TEST_PIX_FMT_RETURN'
     TEST_PIX_FMT_RETURN(XVMC_MPEG2_MC);
     ^
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: 'AV_PIX_FMT_XVMC_MPEG2_IDCT' was not declared in this scope
 #  define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
                                         ^
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp:84:5: note: in expansion of macro 'TEST_PIX_FMT_RETURN'
     TEST_PIX_FMT_RETURN(XVMC_MPEG2_IDCT);
     ^
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: 'AV_PIX_FMT_VDPAU_H264' was not declared in this scope
 #  define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
                                         ^
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp:104:5: note: in expansion of macro 'TEST_PIX_FMT_RETURN'
     TEST_PIX_FMT_RETURN(VDPAU_H264);
     ^
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: 'AV_PIX_FMT_VDPAU_MPEG1' was not declared in this scope
 #  define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
                                         ^
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp:105:5: note: in expansion of macro 'TEST_PIX_FMT_RETURN'
     TEST_PIX_FMT_RETURN(VDPAU_MPEG1);
     ^
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: 'AV_PIX_FMT_VDPAU_MPEG2' was not declared in this scope
 #  define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
                                         ^
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp:106:5: note: in expansion of macro 'TEST_PIX_FMT_RETURN'
     TEST_PIX_FMT_RETURN(VDPAU_MPEG2);
     ^
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: 'AV_PIX_FMT_VDPAU_WMV3' was not declared in this scope
 #  define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
                                         ^
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp:107:5: note: in expansion of macro 'TEST_PIX_FMT_RETURN'
     TEST_PIX_FMT_RETURN(VDPAU_WMV3);
     ^
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: 'AV_PIX_FMT_VDPAU_VC1' was not declared in this scope
 #  define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
                                         ^
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp:108:5: note: in expansion of macro 'TEST_PIX_FMT_RETURN'
     TEST_PIX_FMT_RETURN(VDPAU_VC1);
     ^
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: 'AV_PIX_FMT_VDPAU_MPEG4' was not declared in this scope
 #  define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
                                         ^
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp:128:5: note: in expansion of macro 'TEST_PIX_FMT_RETURN'
     TEST_PIX_FMT_RETURN(VDPAU_MPEG4);
     ^
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp: In function 'AVStream* pangolin::CreateStream(AVFormatContext*, pangolin::CodecID, uint64_t, int, AVPixelFormat, int, int)':
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp:519:33: error: 'CODEC_FLAG_GLOBAL_HEADER' was not declared in this scope
         stream->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
                                 ^
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp: In member function 'void pangolin::FfmpegVideoOutputStream::WriteFrame(AVFrame*)':
/workspaces/pangolin/src/video/drivers/ffmpeg.cpp:582:39: error: 'AVFMT_RAWPICTURE' was not declared in this scope
     if (recorder.oc->oformat->flags & AVFMT_RAWPICTURE) {
                                       ^
src/CMakeFiles/_pangolin.dir/build.make:1670: recipe for target 'src/CMakeFiles/_pangolin.dir/video/drivers/ffmpeg.cpp.o' failed
make[2]: *** [src/CMakeFiles/_pangolin.dir/video/drivers/ffmpeg.cpp.o] Error 1
CMakeFiles/Makefile2:135: recipe for target 'src/CMakeFiles/_pangolin.dir/all' failed
make[1]: *** [src/CMakeFiles/_pangolin.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Make error

When I try to build through make, the following error cannot be resolved:
'GL/glew.h' is not found.
Although I found glew.h at
/usr/local/Cellar/glew/2.1.0/include/GL/
and
/usr/local/include/GL,
how can I include the header file correctly?
Thank you in advance:)

Building on Windows [solution]

Environment: Windows 10, Visual Studio 2019, Python 3.7.4 64-bit

  1. Follow the instructions in readme.md
  2. When cmake fails to find vcvarsall.bat, instead of usual command prompt, use "developer command prompt" of Visual Studio (it's in Start menu)
  3. You'll have to download and install git for Windows (hmm doesn't VS have that included?)
  4. After cmake succeds, open the .sln file with Visual Studio, switch Debug to Release and try building. When the build fails at "pangolin_export.h not found", go to build\src\include\pangolin\ and rename _pangolin_export.h to pangolin_export.h. Remove all leading underscores inside the file as well. This should build 18 projects in the solution and 1 still fails.
  5. Inside Visual Studio go to pangolin project properties > C/C++ > General > Additional Include Directories > add directories to the list:
yourgitclonepath\build\src\include
yourgitclonepath\build\external\glew\include
  1. Download Eigen library and add to include directories
  2. Build the solution
  3. Change the setup.py file:
__library_file__ = 'Release/pangolin*.pyd' # line 8
assert len(lib_file) == 1 and install_dir is not None  # line 24

ubuntu 16.04 python3.6.4 cmake error

/usr/bin/ld: /usr/local/lib/libpython3.6m.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython3.6m.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
python/CMakeFiles/pangolin.dir/build.make:103: recipe for target '../pangolin.cpython-36m-x86_64-linux-gnu.so' failed
make[2]: *** [../pangolin.cpython-36m-x86_64-linux-gnu.so] Error 1
CMakeFiles/Makefile2:190: recipe for target 'python/CMakeFiles/pangolin.dir/all' failed
make[1]: *** [python/CMakeFiles/pangolin.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Error importing. Libpango*.so undefined symbol. PyPangolin works

Compiled and build the package but I'm getting this error

Python 3.5.6 |Anaconda, Inc.| (default, Aug 26 2018, 21:41:56) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pangolin
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0: undefined symbol: hb_font_funcs_set_variation_glyph_func

Since this was failing I tried compiling and building the original C++ version link and it was successfully build. I'm also able to import pypangolin

But Steven's version doesn't have DrawPoints, DrawLines, DrawCameras, DrawBoxes and so I would love it if my problem could be solved. Is the an issue with my libpango? Should I install any other package before I build?

make error

/usr/bin/ld: /usr/local/lib/libpython3.6m.a(dynload_shlib.o): undefined reference to symbol 'dlsym@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
examples/SimplePlot/CMakeFiles/SimplePlot.dir/build.make:113: recipe for target 'examples/SimplePlot/SimplePlot' failed
make[2]: *** [examples/SimplePlot/SimplePlot] Error 1
CMakeFiles/Makefile2:543: recipe for target 'examples/SimplePlot/CMakeFiles/SimplePlot.dir/all' failed
make[1]: *** [examples/SimplePlot/CMakeFiles/SimplePlot.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: /usr/local/lib/libpython3.6m.a(dynload_shlib.o): undefined reference to symbol 'dlsym@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
examples/HelloPangolin/CMakeFiles/HelloPangolin.dir/build.make:113: recipe for target 'examples/HelloPangolin/HelloPangolin' failed
make[2]: *** [examples/HelloPangolin/HelloPangolin] Error 1
CMakeFiles/Makefile2:323: recipe for target 'examples/HelloPangolin/CMakeFiles/HelloPangolin.dir/all' failed
make[1]: *** [examples/HelloPangolin/CMakeFiles/HelloPangolin.dir/all] Error 2
/usr/bin/ld: /usr/local/lib/libpython3.6m.a(dynload_shlib.o): undefined reference to symbol 'dlsym@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
examples/SimpleDisplayImage/CMakeFiles/SimpleDisplayImage.dir/build.make:113: recipe for target 'examples/SimpleDisplayImage/SimpleDisplayImage' failed
make[2]: *** [examples/SimpleDisplayImage/SimpleDisplayImage] Error 1
CMakeFiles/Makefile2:433: recipe for target 'examples/SimpleDisplayImage/CMakeFiles/SimpleDisplayImage.dir/all' failed
make[1]: *** [examples/SimpleDisplayImage/CMakeFiles/SimpleDisplayImage.dir/all] Error 2
/usr/bin/ld: /usr/local/lib/libpython3.6m.a(dynload_shlib.o): undefined reference to symbol 'dlsym@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
examples/SimpleMultiDisplay/CMakeFiles/SimpleMultiDisplay.dir/build.make:113: recipe for target 'examples/SimpleMultiDisplay/SimpleMultiDisplay' failed
make[2]: *** [examples/SimpleMultiDisplay/SimpleMultiDisplay] Error 1
CMakeFiles/Makefile2:378: recipe for target 'examples/SimpleMultiDisplay/CMakeFiles/SimpleMultiDisplay.dir/all' failed
make[1]: *** [examples/SimpleMultiDisplay/CMakeFiles/SimpleMultiDisplay.dir/all] Error 2
/usr/bin/ld: /usr/local/lib/libpython3.6m.a(dynload_shlib.o): undefined reference to symbol 'dlsym@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
examples/SimpleVideo/CMakeFiles/SimpleVideo.dir/build.make:113: recipe for target 'examples/SimpleVideo/SimpleVideo' failed
make[2]: *** [examples/SimpleVideo/SimpleVideo] Error 1
CMakeFiles/Makefile2:653: recipe for target 'examples/SimpleVideo/CMakeFiles/SimpleVideo.dir/all' failed
make[1]: *** [examples/SimpleVideo/CMakeFiles/SimpleVideo.dir/all] Error 2
In file included from /home/aa/pypangolin/pangolin/python/gl/gl.hpp:5:0,
from /home/aa/pypangolin/pangolin/python/pangolin.cpp:24:
/home/aa/pypangolin/pangolin/python/gl/colour.hpp:14:33: warning: unused parameter ‘m’ [-Wunused-parameter]
void declareColour(py::module & m) {
^
[ 85%] Linking CXX executable SimpleScene
/usr/bin/ld: /usr/local/lib/libpython3.6m.a(dynload_shlib.o): undefined reference to symbol 'dlsym@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
examples/SimpleScene/CMakeFiles/SimpleScene.dir/build.make:113: recipe for target 'examples/SimpleScene/SimpleScene' failed
make[2]: *** [examples/SimpleScene/SimpleScene] Error 1
CMakeFiles/Makefile2:488: recipe for target 'examples/SimpleScene/CMakeFiles/SimpleScene.dir/all' failed
make[1]: *** [examples/SimpleScene/CMakeFiles/SimpleScene.dir/all] Error 2
[ 86%] Linking CXX executable SimpleDisplay
/usr/bin/ld: /usr/local/lib/libpython3.6m.a(dynload_shlib.o): undefined reference to symbol 'dlsym@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
examples/SimpleDisplay/CMakeFiles/SimpleDisplay.dir/build.make:113: recipe for target 'examples/SimpleDisplay/SimpleDisplay' failed
make[2]: *** [examples/SimpleDisplay/SimpleDisplay] Error 1
CMakeFiles/Makefile2:598: recipe for target 'examples/SimpleDisplay/CMakeFiles/SimpleDisplay.dir/all' failed
make[1]: *** [examples/SimpleDisplay/CMakeFiles/SimpleDisplay.dir/all] Error 2
[ 87%] Linking CXX shared module ../../pangolin.cpython-36m-x86_64-linux-gnu.so
/usr/bin/ld: /usr/local/lib/libpython3.6m.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython3.6m.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
python/CMakeFiles/pangolin.dir/build.make:113: recipe for target '../pangolin.cpython-36m-x86_64-linux-gnu.so' failed
make[2]: *** [../pangolin.cpython-36m-x86_64-linux-gnu.so] Error 1
CMakeFiles/Makefile2:190: recipe for target 'python/CMakeFiles/pangolin.dir/all' failed
make[1]: *** [python/CMakeFiles/pangolin.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

install on ubuntu 18.04 LTS

gh0st@GH0ST:~/Desktop/pangolin$ python setup.py install
running install
Traceback (most recent call last):
File "setup.py", line 49, in
graphical data."""
File "/usr/local/lib/python2.7/dist-packages/setuptools/init.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "setup.py", line 22, in run
assert len(lib_file) == 1 and len(install_dirs) >= 1
NameError: global name 'install_dirs' is not defined

Python.h: No such file or directory

building went wrong, as pangolin/external/pybind11/include/pybind11/detail/common.h:111:20: fatal error: Python.h: No such file or directory

Make Error OSX Mojave

Hey!
So while following the install instructions, I seem to be running into a lot of errors that I can't seem to figure out how to resolve.
Most of the errors in the make process seem to come from ffmpeg.cpp, specifically, of the form :

use of undeclared identifier
      'AV_PIX_FMT_XVMC_MPEG2_MC' 

My cmake output is:

-- The C compiler identification is AppleClang 10.0.1.10010046
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Build type not set (defaults to release)
-DCMAKE_BUILD_TYPE=Debug for debug
-- Python Found and Enabled
-- Eigen Found and Enabled
-- Performing Test HAVE_FFMPEG_MAX_ANALYZE_DURATION2
-- Performing Test HAVE_FFMPEG_MAX_ANALYZE_DURATION2 - Failed
-- Performing Test HAVE_FFMPEG_AVFORMAT_ALLOC_OUTPUT_CONTEXT2
-- Performing Test HAVE_FFMPEG_AVFORMAT_ALLOC_OUTPUT_CONTEXT2 - Success
-- Performing Test HAVE_FFMPEG_AVPIXELFORMAT
-- Performing Test HAVE_FFMPEG_AVPIXELFORMAT - Success
-- ffmpeg Found and Enabled
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
-- libpng Found and Enabled
-- libjpeg Found and Enabled
-- libtiff Found and Enabled
-- libopenexr Found and Enabled
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Found PythonInterp: /usr/local/bin/python3.7 (found version "3.7.3")
-- Found PythonLibs: /usr/local/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7m.dylib
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done
-- Generating done

A snippet of some of the errors (16 in total):

/pyp/pangolin/src/video/drivers/ffmpeg.cpp:83:5: error: use of undeclared identifier
      'AV_PIX_FMT_XVMC_MPEG2_MC'
    TEST_PIX_FMT_RETURN(XVMC_MPEG2_MC);
    ^
/pyp/pangolin/src/video/drivers/ffmpeg.cpp:47:41: note: expanded from macro
      'TEST_PIX_FMT_RETURN'
#  define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
                                        ^
<scratch space>:179:1: note: expanded from here
AV_PIX_FMT_XVMC_MPEG2_MC
^
/pyp/pangolin/src/video/drivers/ffmpeg.cpp:84:5: error: use of undeclared identifier
      'AV_PIX_FMT_XVMC_MPEG2_IDCT'; did you mean 'AV_PIX_FMT_VAAPI_IDCT'?
    TEST_PIX_FMT_RETURN(XVMC_MPEG2_IDCT);
    ^
/pyp/pangolin/src/video/drivers/ffmpeg.cpp:47:41: note: expanded from macro
      'TEST_PIX_FMT_RETURN'
#  define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
                                        ^
<scratch space>:181:1: note: expanded from here
AV_PIX_FMT_XVMC_MPEG2_IDCT
^
/usr/local/include/libavutil/pixfmt.h:119:5: note: 'AV_PIX_FMT_VAAPI_IDCT' declared here
    AV_PIX_FMT_VAAPI_IDCT, ///< HW acceleration through VA API at IDCT entry-point, Picture.data[3] contains ...
    ^
/pyp/pangolin/src/video/drivers/ffmpeg.cpp:104:5: error: use of undeclared identifier
      'AV_PIX_FMT_VDPAU_H264'; did you mean 'AV_PIX_FMT_VDPAU'?
    TEST_PIX_FMT_RETURN(VDPAU_H264);
    ^
/pyp/pangolin/src/video/drivers/ffmpeg.cpp:47:41: note: expanded from macro
      'TEST_PIX_FMT_RETURN'
#  define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
                                        ^
<scratch space>:221:1: note: expanded from here
AV_PIX_FMT_VDPAU_H264
^
/usr/local/include/libavutil/pixfmt.h:197:5: note: 'AV_PIX_FMT_VDPAU' declared here
    AV_PIX_FMT_VDPAU,     ///< HW acceleration through VDPAU, Picture.data[3] contains a VdpVideoSurface
    ^
/pyp/pangolin/src/video/drivers/ffmpeg.cpp:105:5: error: use of undeclared identifier
      'AV_PIX_FMT_VDPAU_MPEG1'; did you mean 'AV_PIX_FMT_VDPAU'?
    TEST_PIX_FMT_RETURN(VDPAU_MPEG1);
    ^
/pyp/pangolin/src/video/drivers/ffmpeg.cpp:47:41: note: expanded from macro
      'TEST_PIX_FMT_RETURN'
#  define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;

I would be extremely grateful for any help!!!

Error occurred when execute make

Hello, thanks for your work!
when I execute the make -j8, it gives me these ....

data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp: In function ‘std::__cxx11::string pangolin::FfmpegFmtToString(AVPixelFormat)’:
/data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: ‘AV_PIX_FMT_XVMC_MPEG2_MC’ was not declared in this scope

define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;

                                     ^

/data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp:83:5: note: in expansion of macro ‘TEST_PIX_FMT_RETURN’
TEST_PIX_FMT_RETURN(XVMC_MPEG2_MC);
^
/data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: ‘AV_PIX_FMT_XVMC_MPEG2_IDCT’ was not declared in this scope

define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;

                                     ^

/data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp:84:5: note: in expansion of macro ‘TEST_PIX_FMT_RETURN’
TEST_PIX_FMT_RETURN(XVMC_MPEG2_IDCT);
^
/data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: ‘AV_PIX_FMT_VDPAU_H264’ was not declared in this scope

define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;

                                     ^

/data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp:104:5: note: in expansion of macro ‘TEST_PIX_FMT_RETURN’
TEST_PIX_FMT_RETURN(VDPAU_H264);
^
/data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: ‘AV_PIX_FMT_VDPAU_MPEG1’ was not declared in this scope

define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;

                                     ^

/data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp:105:5: note: in expansion of macro ‘TEST_PIX_FMT_RETURN’
TEST_PIX_FMT_RETURN(VDPAU_MPEG1);
^
/data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: ‘AV_PIX_FMT_VDPAU_MPEG2’ was not declared in this scope

define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;

                                     ^

/data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp:106:5: note: in expansion of macro ‘TEST_PIX_FMT_RETURN’
TEST_PIX_FMT_RETURN(VDPAU_MPEG2);
^
/data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: ‘AV_PIX_FMT_VDPAU_WMV3’ was not declared in this scope

define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;

                                     ^

/data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp:107:5: note: in expansion of macro ‘TEST_PIX_FMT_RETURN’
TEST_PIX_FMT_RETURN(VDPAU_WMV3);
^
/data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: ‘AV_PIX_FMT_VDPAU_VC1’ was not declared in this scope

define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;

                                     ^

/data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp:108:5: note: in expansion of macro ‘TEST_PIX_FMT_RETURN’
TEST_PIX_FMT_RETURN(VDPAU_VC1);
^
/data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: ‘AV_PIX_FMT_VDPAU_MPEG4’ was not declared in this scope

define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;

                                     ^

/data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp:128:5: note: in expansion of macro ‘TEST_PIX_FMT_RETURN’
TEST_PIX_FMT_RETURN(VDPAU_MPEG4);
^
/data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp: In function ‘AVStream* pangolin::CreateStream(AVFormatContext*, pangolin::CodecID, uint64_t, int, AVPixelFormat, int, int)’:
/data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp:519:33: error: ‘CODEC_FLAG_GLOBAL_HEADER’ was not declared in this scope
stream->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
^
/data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp: In member function ‘void pangolin::FfmpegVideoOutputStream::WriteFrame(AVFrame*)’:
/data_1/codes/pangolin/src/video/drivers/ffmpeg.cpp:582:39: error: ‘AVFMT_RAWPICTURE’ was not declared in this scope
if (recorder.oc->oformat->flags & AVFMT_RAWPICTURE) {
^
src/CMakeFiles/_pangolin.dir/build.make:1790: recipe for target 'src/CMakeFiles/_pangolin.dir/video/drivers/ffmpeg.cpp.o' failed
make[2]: *** [src/CMakeFiles/_pangolin.dir/video/drivers/ffmpeg.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:136: recipe for target 'src/CMakeFiles/_pangolin.dir/all' failed
make[1]: *** [src/CMakeFiles/_pangolin.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Cannot import pangolin after install

Hi,
I run the install command and got this message,
" running install
copying ./pangolin.cpython-35m-x86_64-linux-gnu.so -> /home/gmp/miniconda3/envs/panoProject/lib/python3.8/site-packages"

When I import pangolin, it reports ModuleNotFoundError, as follows.

Python 3.8.5 (default, Sep 4 2020, 07:30:14)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.

import pangolin
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'pangolin'

Any suggestions?

'GL/glew.h' file not found

Using macbook m2 air orb - slam2 configuration, the

/usr/local/include/pangolin/gl/glplatform. H: return: fatal error: 'GL/glew.h' file not found 
#include <GL/glew.h> 
^ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Please help me how to solve this problem

Pangolin built on python 3.7.4 results in seg fault 11

Hello,

I ran the cmake step for pangolin using the usual steps in a conda base env of python 3.7.4 (my MACOSX is using 3.7.7 from brew), and it detects the libraries just fine. Everything will build. But eventually when I go to python3 to import pangolin, it will result in a seg fault 11. Does anyone know what I can do?

(base) MacBook-Pro:build bryanling$ cmake -DBUILD_PANGOLIN_FFMPEG=OFF ../
-- The C compiler identification is AppleClang 10.0.1.10010046
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Build type not set (defaults to release)
-DCMAKE_BUILD_TYPE=Debug for debug
-- Python Found and Enabled
-- Eigen Found and Enabled
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") 
-- libpng Found and Enabled
-- libjpeg Found and Enabled
-- libtiff Found and Enabled
-- libzstd Found and Enabled
-- Found Doxygen: /usr/local/bin/doxygen (found version "1.8.17") found components: doxygen dot 
CMake Warning at python/CMakeLists.txt:3 (find_package):
  By not providing "Findpybind11.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "pybind11",
  but CMake did not find one.

  Could not find a package configuration file provided by "pybind11" with any
  of the following names:

    pybind11Config.cmake
    pybind11-config.cmake

  Add the installation prefix of "pybind11" to CMAKE_PREFIX_PATH or set
  "pybind11_DIR" to a directory containing one of the above files.  If
  "pybind11" provides a separate development package or SDK, be sure it has
  been installed.


-- Found PythonInterp: /Users/dragonSwords98/miniconda3/bin/python3.7 (found version "3.7.4") 
-- Found PythonLibs: /usr/local/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7m.dylib
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/dragonSwords98/PycharmProjects/pangolin-uoip/build

after make -j8

[100%] Built target pangolin
(base) MacBook-Pro:build dragonSwords98$ import python
(base) MacBook-Pro:build dragonSwords98$ cd ..
(base) MacBook-Pro:pangolin-uoip dragonSwords98$ python setup.py install
running install
copying ./pangolin.cpython-37m-darwin.so -> /
(base) MacBook-Pro:pangolin-uoip dragonSwords98$ python3
Python 3.7.4 (default, Aug 13 2019, 15:17:50) 
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pangolin
Segmentation fault: 11

I know this worked on 3.6.5 at some point. My next strategy would be to hack the cmakes so they detect conda's 3.6 instead of the higher version of 3.7.7 from brew. However, this has so far been a headache as well.

Any suggestions?

RuntimeError: Pangolin X11: Failed to open X display

Im trying to run the python exmaples, as i tried to run HelloPangolin.py, this error is showing up
python3 HelloPangolin.py Traceback (most recent call last): File "HelloPangolin.py", line 48, in <module> main() File "HelloPangolin.py", line 9, in main pangolin.CreateWindowAndBind('Main', 640, 480) RuntimeError: Pangolin X11: Failed to open X display

im using ubuntu 18

" Could not find a package configuration file provided by "pybind11" " while installing pangolin.

I am trying to install pangolin for implementing the SLAM algorithm, but the cmake build is failing due to absence of the Pybind11 .cmake file. How to resolve this issue ?

`

bikram:~/pangolin/pangolin/build$ cmake ..
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Build type not set (defaults to release)
-DCMAKE_BUILD_TYPE=Debug for debug
CMake Warning (dev) at /usr/share/cmake-3.16/Modules/FindOpenGL.cmake:275 (message):
Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
available. Run "cmake --help-policy CMP0072" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

FindOpenGL found both a legacy GL library:

OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

and GLVND libraries for OpenGL and GLX:

OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
src/CMakeLists.txt:155 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Python Found and Enabled
-- Eigen Found and Enabled
-- libdc1394 Found and Enabled
-- V4L Found and Enabled
-- Performing Test HAVE_FFMPEG_MAX_ANALYZE_DURATION2
-- Performing Test HAVE_FFMPEG_MAX_ANALYZE_DURATION2 - Failed
-- Performing Test HAVE_FFMPEG_AVFORMAT_ALLOC_OUTPUT_CONTEXT2
-- Performing Test HAVE_FFMPEG_AVFORMAT_ALLOC_OUTPUT_CONTEXT2 - Success
-- Performing Test HAVE_FFMPEG_AVPIXELFORMAT
-- Performing Test HAVE_FFMPEG_AVPIXELFORMAT - Success
-- ffmpeg Found and Enabled
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- OpenNI Found and Enabled
-- OpenNI2 Found and Enabled
-- libpng Found and Enabled
-- libjpeg Found and Enabled
-- libtiff Found and Enabled
-- libopenexr Found and Enabled
-- libzstd Found and Enabled
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.17") found components: doxygen dot
CMake Warning at python/CMakeLists.txt:3 (find_package):
By not providing "Findpybind11.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "pybind11",
but CMake did not find one.

Could not find a package configuration file provided by "pybind11" with any
of the following names:

pybind11Config.cmake
pybind11-config.cmake

Add the installation prefix of "pybind11" to CMAKE_PREFIX_PATH or set
"pybind11_DIR" to a directory containing one of the above files. If
"pybind11" provides a separate development package or SDK, be sure it has
been installed.

-- Found PythonInterp: /usr/bin/python3.6 (found version "3.6.9")
CMake Error at external/pybind11/tools/FindPythonLibsNew.cmake:95 (message):
Python config failure:

Traceback (most recent call last):

File "<string>", line 1, in <module>

ImportError: cannot import name 'sysconfig'

Call Stack (most recent call first):
external/pybind11/tools/pybind11Tools.cmake:16 (find_package)
python/CMakeLists.txt:9 (include)

-- Configuring incomplete, errors occurred!
See also "/home/bikram/pangolin/pangolin/build/CMakeFiles/CMakeOutput.log".
See also "/home/bikram/pangolin/pangolin/build/CMakeFiles/CMakeError.log".

`

Can't import module after install [Anaconda]

Hi, I compiled as per the instructions in the readme, (had to install libeigen3-dev to get it to compile) and installed after fixing the typo in the setup.py script. However I still can't import pangolin to python. Can anyone help me with this issue?

Thanks!

(base) user@pc:~/GitHub/twitchslam/build/pangolin$ python setup.py install
running install
copying ./pangolin.cpython-36m-x86_64-linux-gnu.so -> /home/user/anaconda3/lib/python3.5/site-packages
(base) user@pc:~/GitHub/twitchslam/build/pangolin$ python
Python 3.5.4 |Anaconda custom (64-bit)| (default, Nov 20 2017, 18:44:38) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pangolin
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'pangolin'

Compiling on Windows

I'm trying to compile for Python 3.7 on Windows with MinGW and cmake. When I run cmake .. I get the following error:

-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- libpng Found and Enabled
-- libjpeg Found and Enabled
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
CMake Warning at python/CMakeLists.txt:3 (find_package):
  By not providing "Findpybind11.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "pybind11",
  but CMake did not find one.

  Could not find a package configuration file provided by "pybind11" with any
  of the following names:

    pybind11Config.cmake
    pybind11-config.cmake

  Add the installation prefix of "pybind11" to CMAKE_PREFIX_PATH or set
  "pybind11_DIR" to a directory containing one of the above files.  If
  "pybind11" provides a separate development package or SDK, be sure it has
  been installed. ```



How do I fix this?

Merge with upstream?

I just noticed this python binding for Pangolin - do you have any interest in trying to merge this upstream with my own bindings? I'm not sure what the pros and cons are of each?

Examples glitching

All the examples have random glitches and artifacts.

The point cloud flickers in HelloPangolin.py:
image

The colors on the top-left image keep flickering in SimpleDisplayImage.py:
image

All the elements keep jumping around in simple_draw.py:
image

I am using Ubuntu 18.04, with pangolin compiled from source(as per the instructions in this repo), and Python 3.7.
GPU: NVIDIA 1050Ti

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.