jstraub / cudaPcl

depth image processing using CUDA
Other
99 stars 24 forks source link

js.* python classes/bindings #2

Open kpykc opened 8 years ago

kpykc commented 8 years ago

Hi,

where could be found python classes which are used in python scripts? E.g. in cudaPcl/python/testRgbdFrameNormals.py:

from js.data.rgbd.rgbdframe import RgbdFrame

Or they are not public?

Thanks.

jstraub commented 8 years ago

Oh! I am sorry. I put those on my github as well at https://github.com/jstraub/js - the README.md in that repo tells you how to make the scripts available to testRgbdFrameNormals.py.

Does it work now?

kpykc commented 8 years ago

Thank you,

and sorry for late reply. For now I finished with this recipe (on clean ubuntu 14.04 virtual machine):

sudo apt-get update
sudo apt-get upgrade

# some tools
sudo apt install openssh-server openssh-sftp-server openssh-blacklist-extra openssh-blacklist
sudo apt-get install ipython

# deps
sudo apt install cmake
sudo apt install libeigen3-dev libboost-dev libopencv-dev 
sudo apt install libopenni2-dev libopenni2-0 openni2-utils
sudo apt install libblas-dev liblapack-dev libatlas-base-dev gfortran
sudo apt install python-dev
sudo apt install libvtk5-dev
sudo apt install python-vtk

# CUDA
sudo sh -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64 /" > /etc/apt/sources.list.d/cuda.list'

wget -q -O - http://developer.download.nvidia.com/compute/cuda/repos/GPGKEY | sudo apt-key add -

sudo apt update

# ROS (PCL 1.7)
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
#sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net --recv-key 0xB01FA116
wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -

sudo apt update

sudo apt install libpcl-1.7-all-dev
#sudo apt install cuda-samples-6-5
sudo apt install cuda-6-5

sudo apt install python-opencv
#sudo pip install numpy

sudo pip install mayavi
sudo pip install scipy
sudo pip install matplotlib

git clone https://github.com/jstraub/cudaPcl
cd cudaPcl/

git clone https://github.com/jstraub/js
git clone https://github.com/jstraub/jsCore
git clone https://github.com/jstraub/rgbdGrabber

# does not help
# export CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-6.5

# solution
sudo ln -s /usr/local/cuda-6.5 /usr/local/cuda

make update; make configure; make -j6; make install;
# cd cudaPcl/ ## still in this dir
export PYTHONPATH=$PYTHONPATH:${HOME}/cudaPcl
cd python/
python testRgbdFrameNormals.py 

Last problem:

Traceback (most recent call last):
  File "testRgbdFrameNormals.py", line 9, in <module>
    plt.show()
NameError: name 'plt' is not defined
diff --git a/python/testRgbdFrameNormals.py b/python/testRgbdFrameNormals.py
index b27e17a..38787ad 100644
--- a/python/testRgbdFrameNormals.py
+++ b/python/testRgbdFrameNormals.py
@@ -1,5 +1,6 @@
 import numpy as np
 import mayavi.mlab as mlab
+from matplotlib import pyplot as plt
 from js.data.rgbd.rgbdframe import RgbdFrame

 rgbd = RgbdFrame(540.)
jstraub commented 8 years ago

Cool thanks =)! So it is all working now?