Git Product home page Git Product logo

gtsam-quadrics's People

Contributors

btalb avatar lachlan-nicholson avatar nikosuenderhauf avatar suddrey-qut avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gtsam-quadrics's Issues

make error

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!

Error after (pip) installation

Hi,

After installing using

  1. pip3 install gtsam
  2. pip3 install gtsam_quadrics

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.

Release to PyPi

Goal is to make pip install gtsam_quadrics work as suggested in README.

This is the target of the next release.

Make error

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!

Error when executing `pip install .`

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

nan return value after calling dual_conic.bounds() in realsense.py example script

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.
image
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.

Installing with gtsam-4.1.0

I have already gtsam-4.1.0 installed on my computer with python binding?

How should I proceed to install gtsam_quadrics?

Camera pose estimate

Hi,

@nikosuenderhauf @btalb

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.

dC_dx problem

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)

`realsense.py` produces a `gtsam::IndeterminantLinearSystemException` with more than one landmark

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_estimates, but they doesn't show anything clearly unusual like NaNs.

Library crashes with "Illegal Instruction (core dumped)"

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:

  • ensure system dependencies are installed:
    • CMake >= 3.18 (follow instructions here)
    • Boost (sudo apt install libboost-all-dev)
  • use (note this will take a while):
    pip install gtsam_quadrics --no-binary :all:
    

Truncated bounding box measurement model

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.

Quadric Initialization for Incremental solvers

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.

Error during installation

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

Unknown CMake command "wrap_and_install_library_cython".

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?

Local rebuilds fail, but clean builds work

Reproduce:

  • run pip install -e . with a local copy (works)
  • run it again (crashes with unhelpful output)

Workaround: rm ./build/ between runs, but you lose your build cache which makes development tedious

What is the coordinate system for gtsam-quadrics?

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!

Python QuadricCamera.project() not working

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;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.