qcr / gtsam-quadrics Goto Github PK
View Code? Open in Web Editor NEWAn extension of gtsam to provide support for optimizing quadric landmarks
License: BSD 3-Clause "New" or "Revised" License
An extension of gtsam to provide support for optimizing quadric landmarks
License: BSD 3-Clause "New" or "Revised" License
Hi, Thanks for sharing your work.
while I compiled the code, I encountered a problem, listed as follows:
_> zh@zh:~/Documents/quadricslam/build$ make
[ 12%] Building CXX object CMakeFiles/quadricslam.dir/quadricslam/base/Utilities.cpp.o
[ 25%] Building CXX object CMakeFiles/quadricslam.dir/quadricslam/geometry/ConstrainedDualQuadric.cpp.o
/home/zh/Documents/quadricslam/quadricslam/geometry/ConstrainedDualQuadric.cpp: In member function ‘bool gtsam::ConstrainedDualQuadric::contains(const gtsam::Pose3&) const’:
/home/zh/Documents/quadricslam/quadricslam/geometry/ConstrainedDualQuadric.cpp:134:64: error: ‘const Point3 {aka const class Eigen::Matrix<double, 3, 1>}’ has no member named ‘vector’
Vector4 cameraPoint = (Vector4() << cameraPose.translation().vector(), 1.0).finished();
^~~~~~
CMakeFiles/quadricslam.dir/build.make:94: recipe for target 'CMakeFiles/quadricslam.dir/quadricslam/geometry/ConstrainedDualQuadric.cpp.o' failed
make[2]: *** [CMakeFiles/quadricslam.dir/quadricslam/geometry/ConstrainedDualQuadric.cpp.o] Error 1
CMakeFiles/Makefile2:379: recipe for target 'CMakeFiles/quadricslam.dir/all' failed
make[1]: *** [CMakeFiles/quadricslam.dir/all] Error 2
Makefile:159: recipe for target 'all' failed
make: *** [all] Error 2_
All the dependencies have been installed correctly. But I can't solve this problem.
Please give me some advice, thank you!
Hi,
After installing using
I get the following errors on the example code on the github page:
pose_key = int(gtsam.symbol(ord('x'), 0))
results in:
TypeError: symbol(): incompatible function arguments. The following argument types are supported:
1. (chr: str, index: int) -> int
After removing the ord() I get another error:
bbox_noise = gtsam.noiseModel_Diagonal.Sigmas(np.array([10]*4, dtype=np.float))
results in
AttributeError: module 'gtsam' has no attribute 'noiseModel_Diagonal'
Replacing noiseModel_Diagonal with noiseModel.Diagonal, I get one more error:
graph.add(bbf)
which results in
TypeError: add(): incompatible function arguments. The following argument types are supported:
1. (self: gtsam.gtsam.NonlinearFactorGraph, factor: gtsam::NonlinearFactor) -> None
I'd be grateful for your help.
Goal is to make pip install gtsam_quadrics
work as suggested in README.
This is the target of the next release.
Hi, thanks for sharing.
When I make test the project, an error occurred :
make check
Scanning dependencies of target quadricslam
[ 5%] Building CXX object CMakeFiles/quadricslam.dir/quadricslam/base/Utilities.cpp.o
[ 10%] Building CXX object CMakeFiles/quadricslam.dir/quadricslam/geometry/ConstrainedDualQuadric.cpp.o
/mnt/sdb1/hao/project/quadricslam/quadricslam/geometry/ConstrainedDualQuadric.cpp: In member function bool gtsam::ConstrainedDualQuadric::contains(const gtsam::Pose3&) const’:
/mnt/sdb1/hao/project/quadricslam/quadricslam/geometry/ConstrainedDualQuadric.cpp:134:64: error: ‘const Point3 {aka const class Eigen::Matrix<double, 3, 1>}’ has no member named ‘vector’
Vector4 cameraPoint = (Vector4() << cameraPose.translation().vector(), 1.0).finished();
^
CMakeFiles/quadricslam.dir/build.make:86: recipe for target 'CMakeFiles/quadricslam.dir/quadricslam/geometry/ConstrainedDualQuadric.cpp.o' failed
make[3]: *** [CMakeFiles/quadricslam.dir/quadricslam/geometry/ConstrainedDualQuadric.cpp.o] Error 1
CMakeFiles/Makefile2:328: recipe for target 'CMakeFiles/quadricslam.dir/all' failed
make[2]: *** [CMakeFiles/quadricslam.dir/all] Error 2
CMakeFiles/Makefile2:377: recipe for target 'CMakeFiles/check.dir/rule' failed
make[1]: *** [CMakeFiles/check.dir/rule] Error 2
Makefile:290: recipe for target 'check' failed
make: *** [check] Error 2
Any suggestions about it?
Thanks again!
Hello,
@lachlan-nicholson I tried to test it on TUM dataset. It did not work as impressive as in paper. I wanted to know if you can publish the noise parameters and/or wrapper for TUM dataset.
Thanks
p = gtsam.Point2()
gives error and says gtsam doesn't containt the attribute Point2
.
Processing /home/xechariah/Projects/gtsam-quadrics-0.1.1
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: gtsam-quadrics
Building wheel for gtsam-quadrics (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for gtsam-quadrics (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [46 lines of output]
Warning: 'classifiers' should be a list, got type 'tuple'
running bdist_wheel
running build
running build_ext
cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -G Ninja -B build/temp.linux-x86_64-3.8 -S /home/xechariah/Projects/gtsam-quadrics-0.1.1
-- 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
CMake Error at CMakeLists.txt:21 (add_subdirectory):
The source directory
/home/xechariah/Projects/gtsam-quadrics-0.1.1/gtsam
does not contain a CMakeLists.txt file.
CMake Error at CMakeLists.txt:34 (include):
include could not find load file:
/home/xechariah/Projects/gtsam-quadrics-0.1.1/gtsam/wrap/cmake/GtwrapUtils.cmake
CMake Error at CMakeLists.txt:35 (include):
include could not find load file:
/home/xechariah/Projects/gtsam-quadrics-0.1.1/gtsam/wrap/cmake/PybindWrap.cmake
CMake Error at CMakeLists.txt:86 (gtsamAddTestsGlob):
Unknown CMake command "gtsamAddTestsGlob".
-- Configuring incomplete, errors occurred!
See also "/home/xechariah/Projects/gtsam-quadrics-0.1.1/build/temp.linux-x86_64-3.8/CMakeFiles/CMakeOutput.log".
error: command 'cmake' failed with exit status 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for gtsam-quadrics
Failed to build gtsam-quadrics
ERROR: Could not build wheels for gtsam-quadrics, which is required to install pyproject.toml-based projects
Goal is to make the conda install gtsam_quadrics
command work as suggested in the README.
Once #13 is resolved, this should be simple.
Hi. I am currently trying to test the realsense example script However, I noticed that when calling dual_conic.bounds() for data association in the script, the return value is always nan.
This causes the linear_sum_assignment() function from scipy unable to solve the optimization problem.
I tried to debug the issue, and I noticed that the problem might related to the input pose when calling gtsam_quadrics.QuadricCamera.project(quadric, pose, self.calibration). When the camera is not moving, the pose should be an identity matrix. When I replaced the pose with a manually defined value pasted from the simple_example script, the program work but cannot do any data association (of course).
I was wondering if the unchanging pose between frame is the cause of the problem? If so, how can we use the realsense.py script since when holding the camera, the movement should be continuous, and how can we achieve the result as you showed in the video? I was wondering if you can also share the source code from the paper so that we can reproduce the result?
Thanks! I`m looking forward to your reply.
I have already gtsam-4.1.0 installed on my computer with python binding?
How should I proceed to install gtsam_quadrics?
Hi,
Thanks for the nice work!
I wanted to use QuadricSLAM to estimate the camera pose.
I used the realsense.py example as a starting point.
However, the camera pose I got at the end of the while loop in realsense.py (line 544) is the same as the estimate by the openCV lib earlier (line 453) .
Does this repository provide methods to estimate the camera pose by the quadrics alone or improve the openCV camera pose ?
I don't know if I understood correctly, but I thought your paper mentioned that quadricslam was correcting for odometry errors.
Thanks.
Hi. In QuadricCamera.cpp, why the code "Eigen::Matrix<double, 16, 16> dXi_dX = -kron(Xi.transpose(), Xi); " has a negative sign.
In my opinion Xi = X.inverse(), so Xi = XiXXi , and then vec(Xi)=kron(Xi.transpose(),Xi)vec(X)
I intend to use gtsam-quadrics for pose detection of landmarks from a RealSense D435i camera, and I've been attempting to run examples/python/realsense.py
to better understand how to properly integrate the library. However, every time I move the camera to see more than one landmark, the script terminates with a gtsam::IndeterminantLinearSystemException
a few frames later:
Traceback (most recent call last):
File "gtsam-quadrics/examples/python/realsense.py", line 387, in <module>
isam.update(local_graph, local_estimate)
File "gtsam/gtsam.pyx", line 9529, in gtsam.gtsam.ISAM2.update
RuntimeError:
Indeterminant linear system detected while working near variable
8142508126285856849 (Symbol: q81).
Thrown when a linear system is ill-posed. The most common cause for this
error is having underconstrained variables. Mathematically, the system is
underdetermined. See the GTSAM Doxygen documentation at
http://borg.cc.gatech.edu/ on gtsam::IndeterminantLinearSystemException for
more information.
closing camera
The named symbol is usually one of the most recent pose estimates. This error occurs with commit e6128dc (with GTSAM 4.0.3), when realsense.py
was last updated. It also occurs with the gtsam-quadrics
PyPI package, if I patch the script to support GTSAM 4.1.
What could be causing the error? It always occurs, whether the camera is moved to view the additional landmarks or the additional landmarks are moved into the view of the stationary camera. I've checked the incoming local_estimate
s, but they doesn't show anything clearly unusual like NaNs.
Plugin would end up going in a new repository in this organisation: https://github.com/benchbot-addon
There seems to be an issue with the built wheels not being truly system independent. Example failure:
ben@ben-pc:~$ ipython3
Python 3.8.10 (default, Jun 22 2022, 20:18:18)
Type 'copyright', 'credits' or 'license' for more information
IPython 8.4.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import gtsam
In [2]: a = gtsam.Pose3()
In [3]: b = gtsam.Pose3()
In [4]: a.between(b)
Illegal instruction (core dumped)
Need to figure out what is going on here.
In the meantime, installation from a source distribution will get around the issue:
sudo apt install libboost-all-dev
)pip install gtsam_quadrics --no-binary :all:
In commit 7faa25d , is the truncated measurement model for the bonding box working correctly? Because when we run with it, the programs run. But in the limitations in the readme, it says that the truncated measurement model is future work.
Goal is for example to be independent of ROS.
We can then also add another example for using with ROS if necessary.
Hi,
I've been trying to use QuadricSLAM with one of my academic projects. I've been looking for the part of code that does quadric initialization for incremental solvers but I've been unable to locate it. It'll be really helpful if you can point me in the right direction.
-Akanksha
P.S. Thanks for the amazing work.
Hi,
After following the instructions in the "Building the C++ package with CMake" section I'm getting the following error:
CMake Error at doc/CMakeLists.txt:19 (add_custom_target):
add_custom_target cannot create target "doc" because another target with
the same name already exists. The existing target is a custom target
created in source directory
"<path to dir location>/gtsam-quadrics-master/gtsam/doc".
See documentation for policy CMP0002 for more details.
After removing the following lines from the CMakeLists.txt:
find_package(Doxygen)
if (DOXYGEN_FOUND)
add_subdirectory(doc)
endif()
The build passed successfully.
Am I'm missing something?
thanks
Hi, thanks for sharing.
When I try to cmake the project with "QSLAM_BUILD_PYTHON_WRAP = ON", the errors occurred:
hao@hao-2288H-V5:/mnt/sdb1/hao/project/quadricslam/build$ cmake ..
-- GTSAM include directory: /usr/local/lib/cmake/GTSAM/../../../include
CMake Error at CMakeLists.txt:38 (include):
include could not find load file:
GtsamCythonWrap
-- Wrote /mnt/sdb1/hao/project/quadricslam/build/QUADRICSLAMConfig.cmake
-- GTSAM include directory: /usr/local/lib/cmake/GTSAM/../../../include
CMake Error at CMakeLists.txt:128 (wrap_and_install_library_cython):
Unknown CMake command "wrap_and_install_library_cython".
-- Configuring incomplete, errors occurred!
See also "/mnt/sdb1/hao/project/quadricslam/build/CMakeFiles/CMakeOutput.log".
See also "/mnt/sdb1/hao/project/quadricslam/build/CMakeFiles/CMakeError.log".
Any suggestions about it?
Reproduce:
pip install -e .
with a local copy (works)Workaround: rm ./build/
between runs, but you lose your build cache which makes development tedious
Hi, thanks for the great work! I am trying to run my customized dataset using quadricslam, and I am not sure for visual odometry what coordinate system I should provide to quadricslam. I am using rtabmap_ros to generate odometry which it is right-handed for the camera frame where the x-axis points to the front, y-axis left and z-axis up, and for the world frame it is also right-hand where x- and y-axis represents the ground plane and z-axis up. I tried to use this convention but it seems to be incorrect. Can you explain what is the correct coordinate convention I should use? Thanks!
There are two functions in QuadricCamera.cpp
by name of QuadricCamera::project
. I am trying to use the 2nd definition in my code but getting error as follows:
TypeError: project(): incompatible function arguments. The following argument types are supported:
1. (quadric: gtsam_quadrics.ConstrainedDualQuadric, pose: gtsam.gtsam.Pose3, calibration: gtsam.gtsam.Cal3_S2) -> gtsam_quadrics.DualConic
Invoked with: 362.452 133.812 382.353 188.83
, R: [
-0.999557, -0.0141918, -0.0252936;
0.0152258, 0.485496, -0.8741;
0.024685, -0.874117, -0.485054
]
t: -0.6832 2.6909 1.7373
, Cal3_S2[
535.4, 0, 320.1;
0, 539.2, 247.6;
0, 0, 1
]
Want to use this definition
std::vector<Vector4> QuadricCamera::project(const AlignedBox2& box, const Pose3& pose, const boost::shared_ptr<Cal3_S2>& calibration) {
std::vector<Vector4> planes;
for (auto line : box.lines()) {
Vector4 plane = QuadricCamera::transformToImage(pose, calibration).transpose() * line;
planes.push_back(plane);
}
return planes;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.