Comments (4)
Thanks for spotting the issues.
They should be fixed by the commits
31c4437
2565cf0
Cheers,
Rainer
On 03.04.2012 17:37, Sunglok Choi wrote:
Hi. I finally compiled and tested 'g2o' in my Windows native development environment, MSVC 2008 with Qt SDK and libQGLViewer.
I found the following problems in the current version for Windows. Since I cannot access 'g2o' repository, I cannot apply my solutions to work 'g2o' correctly in Windows. Even though the problems and solutions are trivial, please apply solutions to 'g2o' for further Windows users' convenience.
[Compile Error 1] 'usleep()' functions in 'g2o/examples/slam2d/slam2d_g2o.cpp' and 'g2o/apps/g2o_viewer/g2o_viewer.cpp'
Solution:
#ifdef _WINDOWSinclude<windows.h>
#else
include<unistd.h>
#endif
#ifdef _WINDOWS
Sleep(10); // [msec]
#else
usleep(10000); // [usec]
#endif[Compile Error 2] Missing GLU-related definitions in 'g2o/examples/slam2d/draw_helper.cpp'
Solution:
#ifdef _WINDOWS
#include<gl/GLU.h>
#endif[Compile Error 3] Missing 'M_PI' definitions in 'g2o/examples/slam2d/draw_helper.cpp'
Solutions:
#define _USE_MATH_DEFINES
#includeFinally, I found more bugs especially in 'examples', and I will report them later.
Reply to this email directly or view it on GitHub:
#1
from g2o.
Thank you for your rapid respond! I believe that 'g2o' will be one of the most important tool in robotics and computer vision.
In the header file "cmath" in MSVC, mathematical constants such as 'M_PI' and 'M_E' are disabled initially. Therefore, to avoid the above [Compile Error 3] in MSVC, I recommend that add "#define _USE_MATH_DEFINES" before including "cmath".
Please refer the below webpage for further information.
http://binglongx.wordpress.com/2011/03/21/_use_math_defines-m_pi-undeclared-identifier-and-math-constants-in-cc/
http://stackoverflow.com/questions/806145/how-do-i-access-math-constants-eg-m-pi-in-visual-c-2008
from g2o.
We added _USE_MATH_DEFINES to the top-level CMakeLists.txt such that it should be defined.
Currently, I do not have MSVC available for testing.
from g2o.
I perform the test in MSVC. It works well! Thanks.
from g2o.
Related Issues (20)
- g2o issues with ROS2 humble . HOT 4
- LGPL3+ for csparse_extension: still up to date? HOT 1
- Cannot link g2o to ROS project, after building successfully from source and installing to default system paths HOT 2
- How to clear g2o optimizer after optimization to avoid memory leak HOT 3
- Inconsistent results for pnp solver HOT 1
- How can I delete or deactivate an edge during the optimization HOT 3
- How can I print a variable in the ComputeError() in the terminal? HOT 3
- Looks like bug in optimization_algorithm_levenberg.cpp HOT 1
- [error] [optimizable_graph.cpp:483] virtual bool HOT 1
- opt.edges().empty() Function g2o::HyperGraph::edges has no address, possibly due to compiler optimizations. HOT 1
- E: Unable to locate package libg2o-core-dev HOT 1
- Same codes but g2o files are not. HOT 6
- Please help me with the rosdep error. I installed libg2o. But still get this error. What should I do? HOT 2
- Problem related to freeglut library while setting G2O_USE_OPENGL off in CMAKE HOT 1
- Prerequisite reading materials and pathway to learning to use the g20 library HOT 4
- In computeEdgeSE3Gradient, why the jacobians of dte/dtj is related to Rj
- Need to specify at least OSX 10.15 with CMAKE_OSX_DEPLOYMENT_TARGET
- [build error] HOT 1
- [g2opy] Error when loading .g2o file using optimizer.load() function HOT 1
- Build error on ubuntu 20.04 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from g2o.