-
Notifications
You must be signed in to change notification settings - Fork 768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Cal3DS2_k3 distortion model #1695
base: develop
Are you sure you want to change the base?
Conversation
Hello @dellaert @varunagrawal and, If possible, could you please let me know why Python CI failed? I'm not familiar with the way GTSAM binds with Python. |
Thanks ! I'll take a look. Also wondering whether we could simply expand Cal3DS2 somehow... |
I was going to suggest this. Adding the extra variable to |
I see the constructor issue. And there is another issue with adding k3 to, as it will change the dimension of the model. Seems like maybe the right way is to make This might be a bigger project than you had hoped for, though? |
@dellaert
I think the main reason you expect this might be a big project is that, I propose to just make a new calibration class which can takes arbitrary dimension of the k_ vector and have new style constructor on gtsam_unstable. |
@dellaert @varunagrawal
|
@demul I am not the maintainer, but the CI is fail on your PR. |
@talregev I can do C++ unit test on my PC using "make check" command. |
Can you tell me what os you have? |
@talregev My OS is WSL-Ubuntu18.04 and I installed libboost-dev/bionic,now 1.65.1.0ubuntu1 amd64 |
Thank you for your input. It seems the ci on your PR is fail due compilation error on unstable gtsam in the python script. The commands that I will write you, found here: # if you have missing dependencies. some of them are optional.
sudo apt-get -y install cmake build-essential pkg-config libpython3-dev python3-numpy libboost-all-dev ninja-build
sudo apt-get install -y wget libicu-dev python3-pip python3-setuptools
# install python dependencies. Assume you are on the root of the gtsam folder.
python3 -m pip install -r python/dev_requirements.txt
# run cmake command that will create a build dir. Assume you are on the root of the gtsam folder.
cmake . \
-B build \
-DCMAKE_BUILD_TYPE=Debug \
-DGTSAM_BUILD_TESTS=OFF \
-DGTSAM_BUILD_UNSTABLE=ON \
-DGTSAM_USE_QUATERNIONS=OFF \
-DGTSAM_WITH_TBB=OFF \
-DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF \
-DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF \
-DGTSAM_BUILD_PYTHON=ON \
-DGTSAM_UNSTABLE_BUILD_PYTHON=ON \
-DGTSAM_PYTHON_VERSION=3 \
-DPYTHON_EXECUTABLE:FILEPATH=$(which python) \
-DGTSAM_ALLOW_DEPRECATED_SINCE_V43=OFF \
-DCMAKE_INSTALL_PREFIX=gtsam_install
cmake --build build -j2
cmake --build build --target python-install
cmake --build build --target python-test
cmake --build build --target python-test-unstable
You can make a PR and update the readme file for other people that have strugle to compile gtsam with python and run the test. I hope this will help you. |
Thanks for your support!
should become
right? and my python version is Python 3.6.9 |
I managed to pass compilation phase by the latest commit i pushed. Can you help me please...? |
@demul The compilation error on macos ci was fix. |
Update from develop
@talregev |
@talregev |
@demul I think it just temporary fail of apt in ubuntu. You should ask for maintainers to run again your PR. |
@talregev @varunagrawal
|
@varunagrawal |
This PR add new Calibration class Cal3DS2_k3.
It's almost identical to the Cal3DS2 class, except that its radial distortion coefficients are not only k1, k2 but also k3.
This PR also add test cases for Cal3DS2_k3. (testCal3DS2_k3.cpp)
I've performed unit test on the docker image(https://github.com/borglab/gtsam/tree/develop/docker/ubuntu-gtsam) and passed.
It has been confirmed that it is well compatible and converge well with factors like "gtsam_unstable/slam/ProjectionFactorPPPC.h" on my custom example script.
Please let me know if this feature already existed, or if there is any suggestion for merge.