ethz-asl / ethzasl_ptam

Modified version of Parallel Tracking and Mapping (PTAM)
http://wiki.ros.org/ethzasl_ptam
235 stars 184 forks source link

No GUI during calibration although using NVIDIA graphics card #45

Open loong opened 10 years ago

loong commented 10 years ago

I am trying to run the calibration tool, but I can not see any GUI appearing. I have a Samsung NP450R4E Laptop with a NVIDIA graphics card (optimus). Here are some greps of my OpenGL setting:

long@long:~/Workspaces/catkin$ glxinfo | grep "OpenGL version"
OpenGL version string: 4.4.0 NVIDIA 331.38
long@long:~/Workspaces/catkin$ glxinfo | grep -i opengl
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 710M/PCIe/SSE2
OpenGL core profile version string: 4.3.0 NVIDIA 331.38
OpenGL core profile shading language version string: 4.30 NVIDIA via Cg compiler
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.4.0 NVIDIA 331.38
OpenGL shading language version string: 4.40 NVIDIA via Cg compiler
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:

And here is the dump of roslaunch:

SUMMARY
========

CLEAR PARAMETERS
 * /cameracalibrator/

PARAMETERS
 * /cameracalibrator/ARBuffer_height: 900
 * /cameracalibrator/ARBuffer_width: 1200
 * /cameracalibrator/AutoInitPixel: 20
 * /cameracalibrator/BundleMEstimator: Tukey
 * /cameracalibrator/Calibrator_BlurSigma: 1.0
 * /cameracalibrator/Calibrator_MeanGate: 10
 * /cameracalibrator/Calibrator_MinCornersForGrabbedImage: 20
 * /cameracalibrator/Calibrator_NoDistortion: 0
 * /cameracalibrator/Calibrator_Optimize: 0
 * /cameracalibrator/Calibrator_Show: 0
 * /cameracalibrator/Cam_cx: 0.50417
 * /cameracalibrator/Cam_cy: 0.51687
 * /cameracalibrator/Cam_fx: 0.795574
 * /cameracalibrator/Cam_fy: 1.25149
 * /cameracalibrator/Cam_s: 0.482014
 * /cameracalibrator/CameraCalibrator_CornerPatchSize: 20
 * /cameracalibrator/CameraCalibrator_MaxStepDistFraction: 0.3
 * /cameracalibrator/CandidateMinSTScore: 70
 * /cameracalibrator/FASTMethod: OAST16
 * /cameracalibrator/GLWindowMenu_Enable: True
 * /cameracalibrator/GLWindowMenu_mgvnMenuItemWidth: 90
 * /cameracalibrator/GLWindowMenu_mgvnMenuTextOffset: 20
 * /cameracalibrator/ImageSizeX: 640
 * /cameracalibrator/ImageSizeY: 480
 * /cameracalibrator/InitLevel: 1
 * /cameracalibrator/MaxKF: 15
 * /cameracalibrator/MaxKFDistWiggleMult: 1
 * /cameracalibrator/MaxPatchesPerFrame: 300
 * /cameracalibrator/MaxStereoInitLoops: 4
 * /cameracalibrator/MinTukeySigma: 0.4
 * /cameracalibrator/NoLevelZeroMapPoints: True
 * /cameracalibrator/TrackerMEstimator: Tukey
 * /cameracalibrator/TrackingQualityFoundPixels: 50
 * /cameracalibrator/UseKFPixelDist: True
 * /cameracalibrator/WiggleScale: 0.1
 * /cameracalibrator/gui: True
 * /cameracalibrator/parent_frame: world
 * /rosdistro: indigo
 * /rosversion: 1.11.7

NODES
  /
    cameracalibrator (ptam/cameracalibrator)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[cameracalibrator-1]: started with pid [26423]
GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/long/Workspaces/catkin/devel/lib/ptam/cameracalibrator...(no debugging symbols found)...done.
Starting program: /home/long/Workspaces/catkin/devel/lib/ptam/cameracalibrator image:=camera/image_raw pose:=pose __name:=cameracalibrator __log:=/home/long/.ros/log/a8fc0c54-172f-11e4-971f-24f5aa6f5f4f/cameracalibrator-1.log
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[ INFO] [1406645466.213345330]: starting CameraCalibrator with node name /cameracalibrator
  Welcome to CameraCalibrator 
  -------------------------------------- 
  Parallel tracking and mapping for Small AR workspaces
  Copyright (C) Isis Innovation Limited 2008 
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[New Thread 0x7fffe9b7b700 (LWP 26430)]
[New Thread 0x7fffe937a700 (LWP 26431)]
[New Thread 0x7fffe8b79700 (LWP 26432)]
[New Thread 0x7fffe3fff700 (LWP 26437)]
Gui is on
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]

Might there be a problem with NVIDIA Optimus?

stephanweiss commented 10 years ago

This looks like an NVIDIA issue. We had similar behaviours with ATI graphics cards and I know that the latest NVIDIA drivers are somehow buggy. Try to install optirun and run the node with it as described here (same goes for PTAM btw): https://wiki.ubuntu.com/Bumblebee

Best, Stephan


From: Long Hoang [notifications@github.com] Sent: Tuesday, July 29, 2014 7:56 AM To: ethz-asl/ethzasl_ptam Subject: [ethzasl_ptam] No GUI during calibration although using NVIDIA graphics card (#45)

I am trying to run the calibration tool, but I can not see any GUI appearing. I have a Samsung NP450R4E Laptop with a NVIDIA graphics card (optimus). Here are some greps of my OpenGL setting:

long@long:~/Workspaces/catkin$ glxinfo | grep "OpenGL version" OpenGL version string: 4.4.0 NVIDIA 331.38

long@long:~/Workspaces/catkin$ glxinfo | grep -i opengl OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce 710M/PCIe/SSE2 OpenGL core profile version string: 4.3.0 NVIDIA 331.38 OpenGL core profile shading language version string: 4.30 NVIDIA via Cg compiler OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL core profile extensions: OpenGL version string: 4.4.0 NVIDIA 331.38 OpenGL shading language version string: 4.40 NVIDIA via Cg compiler OpenGL context flags: (none) OpenGL profile mask: (none) OpenGL extensions:

And here is the dump of roslaunch:

SUMMARY

CLEAR PARAMETERS

PARAMETERS

NODES / cameracalibrator (ptam/cameracalibrator)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found process[cameracalibrator-1]: started with pid [26423] GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /home/long/Workspaces/catkin/devel/lib/ptam/cameracalibrator...(no debugging symbols found)...done. Starting program: /home/long/Workspaces/catkin/devel/lib/ptam/cameracalibrator image:=camera/image_raw pose:=pose name:=cameracalibrator log:=/home/long/.ros/log/a8fc0c54-172f-11e4-971f-24f5aa6f5f4f/cameracalibrator-1.log [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device] [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device] [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device] [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device] [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device] [ INFO] [1406645466.213345330]: starting CameraCalibrator with node name /cameracalibrator Welcome to CameraCalibrator


Parallel tracking and mapping for Small AR workspaces Copyright (C) Isis Innovation Limited 2008 [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device] [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device] [New Thread 0x7fffe9b7b700 (LWP 26430)] [New Thread 0x7fffe937a700 (LWP 26431)] [New Thread 0x7fffe8b79700 (LWP 26432)] [New Thread 0x7fffe3fff700 (LWP 26437)] Gui is on [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device] [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device] [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device] [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device] [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device] [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]

Might there be a problem with NVIDIA Optimus?

— Reply to this email directly or view it on GitHubhttps://github.com/ethz-asl/ethzasl_ptam/issues/45.

loong commented 10 years ago

Even with optimus it didn't worked. I made sure that optimus is really running.

Finally, I pulled the original PTAM source code. With that build, I could run the calibration tool (with GUI) and even without using optimus.

I got the source here: www.robots.ox.ac.uk/~gk/PTAM/

And this blog post helped me a lot to get it build (there is an include missing in the code..) http://hustcalm.me/blog/2013/09/27/ptam-compilation-on-linux-howto/

stephanweiss commented 10 years ago

Thank you for the update, glad things work now for you.

Best, Stephan


From: Long Hoang [notifications@github.com] Sent: Thursday, July 31, 2014 1:07 AM To: ethz-asl/ethzasl_ptam Cc: Stephan Weiss Subject: Re: [ethzasl_ptam] No GUI during calibration although using NVIDIA graphics card (#45)

Even with optimus it didn't worked. I made sure that optimus is really running.

Finally, I pulled the original PTAM source code. With that build, I could run the calibration tool (with GUI) and even without using optimus.

I got the source here: www.robots.ox.ac.uk/~gk/PTAM/http://www.robots.ox.ac.uk/%7Egk/PTAM/

And this blog post helped me a lot to get it build (there is an include missing in the code..) http://hustcalm.me/blog/2013/09/27/ptam-compilation-on-linux-howto/

— Reply to this email directly or view it on GitHubhttps://github.com/ethz-asl/ethzasl_ptam/issues/45#issuecomment-50729103.

ziyangli commented 9 years ago

@mindworker I can also run the original PTAM, the problem is that the original PTAM can not open my bluefox camera. Do you have the same problem?

loong commented 9 years ago

@ziyangli: That might be the problem. I used a Playstation Eye (which I can get here in HK for around 19 Euros) it has an ov534 camera chip on it and 60fps. You can try to calibrate with the original PTAM code and then convert the calibration to a format ROS can use (I did that by hand, can't remember how, but I think it was not too hard)

ziyangli commented 9 years ago

@mindworker I finally managed to run ethzasl_ptam, it turned out that I did not give the correct image topic, I should use

      <remap from="image" to="your_camera/image_raw" />

instead of

      <remap from="image" to="/your_camera/image_raw" />

the backslash is the reason. I wonder if you are in the same situation.

As for the calibration format, please teach me when you remember, since I don't know how to do that at all :)