DA-RNN icon indicating copy to clipboard operation
DA-RNN copied to clipboard

Pangolin v.05 does not provide an namespace picojson / undefined reference to pangolin

Open kevinkit opened this issue 8 years ago • 22 comments

Hello,

When trying to compile the kinect_fusion with the suggested version from #2 , I found out that all the data code in camera relies on the namespace "picojson", while the version picojson v.0.5 does not provide this namepsace, it is "pangolin::json" instead, like described in here: picojson.h

This change is in the master-branch under Namespace-Change

So, I have the following questions(s): Was Pangolin v.0.5 used or a newer version that uses the new namespaces?

We checkout the tag v0.5 to get the version 0.5 - however this results in the mentioned error, but when we use the newest versin an unresolved symbol error gets thrown from kinect_fusion.cpp, stating that it cannot find some Pangolin functions - which I assume are just in the 0.5 version.

So can you please tell us the correct version / branch / git commit number ?

Thank you really much for your help

kevinkit avatar Jul 07 '17 08:07 kevinkit

I see. I downloaded a new version sometime ago and upgraded the code. The SHA1 ID of Pangolin I am using: 7bab0ae6b3e0971ae16e872ef8f5637d571ac2ac

yuxng avatar Jul 07 '17 17:07 yuxng

Thank you really much for your help. Now the namespace erros are gone, but the unresolved symbol errors stays.

When trying to build the kinect_fusion.cpp The error gets thrown:

undefined reference to 'pangolin::CreateWindowAndBInd(std::string, int, int, pangolin::Params const&)

The Same happens with some other functions relying on Pangolin. In some other functions from render_kinect.cpp, too. But all these functions have one thing in common: They all have a string as an argument, do you have any idea where the problem may origins?

Have you changed the code from Pangolin in any way?

Maybe Pangolin does not like to be in a Docker image and needs to be set free to work with the correct frame buffers and so on?

Thank you for your advice

kevinkit avatar Jul 07 '17 22:07 kevinkit

No, I have not changed the Pangolin code.

yuxng avatar Jul 08 '17 00:07 yuxng

@kevinkit Hi, I met the same error undefined reference to 'pangolin::CreateWindowAndBInd(std::string, int, int, pangolin::Params const&) when compiling the kinect_fusion, have you found the solution?

mafan avatar Jul 13 '17 09:07 mafan

No, not really.

Are you on a virtual machine or on a docker image?

When you go the build folder of Pangolin, then into examples and try to run the SimpleHelloPangolin example, what does it say?

In my case it says that it needs a GLX version greater than 1.3 , which is currently not available on the machine where the docker image runs.

However if you are on a native linux-machine it should work, or maybe try to update GLX.

kevinkit avatar Jul 13 '17 10:07 kevinkit

@kevinkit Thanks for your reply. I have tried, and all examples of Pangolin could work...

mafan avatar Jul 13 '17 11:07 mafan

Maybe check where your libpangolin.so is located and if the LD_LIBRARY_PATH includes it

Am 13.07.2017 13:03 schrieb "mafan" [email protected]:

@kevinkit https://github.com/kevinkit Thanks for your reply. I have tried, and all examples of Pangolin could work...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/yuxng/DA-RNN/issues/7#issuecomment-315046286, or mute the thread https://github.com/notifications/unsubscribe-auth/AGhecT7K3OEL1_0nQZEK1CQemboVsPTuks5sNflygaJpZM4OQquU .

kevinkit avatar Jul 13 '17 11:07 kevinkit

Hi guys, have the problem fixed? I am not sure what's wrong with the Pangolin here

yuxng avatar Jul 13 '17 17:07 yuxng

@mafan can you please check your glxversion? you can do so by running "glxinfo". To install glxinfo you need to install mesa-utils. If it is smaller than 1.3, than this might be the problem.

We made the assumption that this specific pangolin requires OpenGL acceleration (not pure OpenGL but opengl accelerated) which cannot be done through any kind of remote desktop connection. Thus, the code will only work on a native machine.

We will report back once we have tested our theory on new hardware.

kevinkit avatar Jul 16 '17 13:07 kevinkit

That's correct. If you want to run the KinectFusion module, you need to have a window open locally. You can not run it remotely. If you just want to use the segmentation, you can disable the KinectFusion and run it remotely.

yuxng avatar Jul 16 '17 18:07 yuxng

Ah thank your for this information, however how can I just use the segmentation and disable the Kinectfusion? As far as I understood, the kinect-fusion is only for showing the results, or does it provide any further information needed for the inference?

Again, thank you really much for your advice

kevinkit avatar Jul 16 '17 20:07 kevinkit

You can add the flag "--kfusion 0" to the testing script in order to disable KinectFusion. KinectFusion provides data association to the RNN during the inference. If it is disabled, the code would use the ground truth camera poses to compute the data association. Check our paper for details.

yuxng avatar Jul 17 '17 01:07 yuxng

@kevinkit The glversion is 1.4, and I am using a native machine.

mafan avatar Jul 17 '17 01:07 mafan

hi, @yuxng , as you said " If it is disabled, the code would use the ground truth camera poses to compute the data association", do you mean that kinect-fusion is use to calculating camera poses? In your paper , I see that kinect-fusion also do somethings like 3D pointclouds fusion ( C. Joint 3D Mapping and Semantic Labeling -- Semantic Fusion), Is it needed to run your kinectfusion code if I want to execute 3D pointclouds fusion

Another question about resnet50 . I've downloaded pretrained-model vgg16.npy and trained your code successfully. Does it needs to download your pretrained-model of resnet50 if training with resnet50?

JackHenry1992 avatar Jul 17 '17 03:07 JackHenry1992

@mafan @yuxng regarding this error, - I just want to get basic errors out of the way, so I might ask a little naive question here: Does the kinect-fusion reads data provided or does it need a Kinect plugged into the PC ?

kevinkit avatar Jul 17 '17 18:07 kevinkit

@JackHenry1992 Yes, if you want to 3D point cloud fusion, you need to run KinectFusion. resnet50 is not very well tested in the code. I do not plan to support it in the near future.

@kevinkit The KinectFusion reads data from files in the code.

yuxng avatar Jul 18 '17 17:07 yuxng

If you still have problems with Pangolin, try add the flag "-D_GLIBCXX_USE_CXX11_ABI=0" to the C/C++ compiler when compiling Pangolin with cmake.

yuxng avatar Jul 23 '17 21:07 yuxng

Hi, @yuxng , is main() in your kinect_fusion.cpp used in your DA-RNN system? I see that lib/fcn/test.py doesn't need this main() function and direct use feed_data API in test.py as follows image

Can I just comment video_input of main() cause I got error about pangolin when built kinectfusion.

JackHenry1992 avatar Jul 24 '17 07:07 JackHenry1992

We werer able to fix this problem by adding the following line to the CMakeList.txt from Pangolin:

add_definiton(-D_GLIBCXX_USE_CXX11_ABI=0)

However, we also installed all (everything you can get with apt-get) dependencies and further applications that are listed in Pangolin , in the https://github.com/stevenlovegrove/Pangolin/blob/master/README.md However, we had to run the make file for the kinect fusion kit twice ...

@JackHenry1992 @mafan can you check if this solves the issue for you? If it does I will close the issue, if not I will leave it open.

Also we had to do all the steps mentioned by #10 , especially copying of the eigen files.

kevinkit avatar Jul 25 '17 17:07 kevinkit

main() in your kinect_fusion.cpp is NOT used. The python code in testing directly calls other functions, but not the main().

yuxng avatar Jul 25 '17 18:07 yuxng

Yes, this issue can be closed

JackHenry1992 avatar Jul 26 '17 01:07 JackHenry1992

@kevinkit @yuxng That solution is good! Thanks!

mafan avatar Jul 27 '17 09:07 mafan