Merge branch 'develop' into feature/cython_wrapper
commit
0dd7dcdc9f
6
LICENSE
6
LICENSE
|
@ -4,11 +4,11 @@ LICENSE.BSD in this directory.
|
|||
GTSAM contains two third party libraries, with documentation of licensing and
|
||||
modifications as follows:
|
||||
|
||||
- CCOLAMD 2.73: Tim Davis' constrained column approximate minimum degree
|
||||
- CCOLAMD 2.9.3: Tim Davis' constrained column approximate minimum degree
|
||||
ordering library
|
||||
- Included unmodified in gtsam/3rdparty/CCOLAMD and gtsam/3rdparty/UFconfig
|
||||
- http://www.cise.ufl.edu/research/sparse
|
||||
- Licenced under LGPL v2.1, provided in gtsam/3rdparty/CCOLAMD/Doc/lesser.txt
|
||||
- http://faculty.cse.tamu.edu/davis/suitesparse.html
|
||||
- Licenced under BSD-3, provided in gtsam/3rdparty/CCOLAMD/Doc/License.txt
|
||||
- Eigen 3.2: General C++ matrix and linear algebra library
|
||||
- Modified with 3 patches that have been contributed back to the Eigen team:
|
||||
- http://eigen.tuxfamily.org/bz/show_bug.cgi?id=704 (Householder QR MKL selection)
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
# This is a sample build configuration for C++ – Make.
|
||||
# Check our guides at https://confluence.atlassian.com/x/5Q4SMw for more examples.
|
||||
# Only use spaces to indent your .yml configuration.
|
||||
# -----
|
||||
# You can specify a custom docker image from Docker Hub as your build environment.
|
||||
image: ilssim/cmake-boost-qt5
|
||||
|
||||
pipelines:
|
||||
default:
|
||||
- step:
|
||||
script: # Modify the commands below to build your repository.
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake ..
|
||||
- make
|
||||
- make check
|
Binary file not shown.
|
@ -15,7 +15,7 @@ Column 3, with 2 entries:
|
|||
row 1
|
||||
row 3
|
||||
|
||||
ccolamd version 2.9, Apr 1, 2016: OK.
|
||||
ccolamd version 2.9, May 4, 2016: OK.
|
||||
ccolamd: number of dense or empty rows ignored: 0
|
||||
ccolamd: number of dense or empty columns ignored: 0
|
||||
ccolamd: number of garbage collections performed: 0
|
||||
|
@ -38,7 +38,7 @@ Column 3, with 1 entries:
|
|||
row 4
|
||||
Column 4, with 0 entries:
|
||||
|
||||
csymamd version 2.9, Apr 1, 2016: OK.
|
||||
csymamd version 2.9, May 4, 2016: OK.
|
||||
csymamd: number of dense or empty rows ignored: 0
|
||||
csymamd: number of dense or empty columns ignored: 0
|
||||
csymamd: number of garbage collections performed: 0
|
||||
|
|
Binary file not shown.
|
@ -15,7 +15,7 @@ Column 3, with 2 entries:
|
|||
row 1
|
||||
row 3
|
||||
|
||||
ccolamd version 2.9, Apr 1, 2016: OK.
|
||||
ccolamd version 2.9, May 4, 2016: OK.
|
||||
ccolamd: number of dense or empty rows ignored: 0
|
||||
ccolamd: number of dense or empty columns ignored: 0
|
||||
ccolamd: number of garbage collections performed: 0
|
||||
|
@ -38,7 +38,7 @@ Column 3, with 1 entries:
|
|||
row 4
|
||||
Column 4, with 0 entries:
|
||||
|
||||
csymamd version 2.9, Apr 1, 2016: OK.
|
||||
csymamd version 2.9, May 4, 2016: OK.
|
||||
csymamd: number of dense or empty rows ignored: 0
|
||||
csymamd: number of dense or empty columns ignored: 0
|
||||
csymamd: number of garbage collections performed: 0
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
ccolamd 5-by-4 input matrix:
|
||||
Column 0, with 3 entries:
|
||||
row 0
|
||||
row 1
|
||||
row 4
|
||||
Column 1, with 2 entries:
|
||||
row 2
|
||||
row 4
|
||||
Column 2, with 4 entries:
|
||||
row 0
|
||||
row 1
|
||||
row 2
|
||||
row 3
|
||||
Column 3, with 2 entries:
|
||||
row 1
|
||||
row 3
|
||||
|
||||
ccolamd version 2.7, Jan 25, 2011: OK.
|
||||
ccolamd: number of dense or empty rows ignored: 0
|
||||
ccolamd: number of dense or empty columns ignored: 0
|
||||
ccolamd: number of garbage collections performed: 0
|
||||
ccolamd column ordering:
|
||||
1st column: 1
|
||||
2nd column: 0
|
||||
3rd column: 3
|
||||
4th column: 2
|
||||
|
||||
|
||||
csymamd 5-by-5 input matrix:
|
||||
Entries in strictly lower triangular part:
|
||||
Column 0, with 1 entries:
|
||||
row 1
|
||||
Column 1, with 2 entries:
|
||||
row 2
|
||||
row 3
|
||||
Column 2, with 0 entries:
|
||||
Column 3, with 1 entries:
|
||||
row 4
|
||||
Column 4, with 0 entries:
|
||||
|
||||
csymamd version 2.7, Jan 25, 2011: OK.
|
||||
csymamd: number of dense or empty rows ignored: 0
|
||||
csymamd: number of dense or empty columns ignored: 0
|
||||
csymamd: number of garbage collections performed: 0
|
||||
csymamd column ordering:
|
||||
1st row/column: 0
|
||||
2nd row/column: 2
|
||||
3rd row/column: 1
|
||||
4th row/column: 3
|
||||
5th row/column: 4
|
|
@ -1,50 +0,0 @@
|
|||
ccolamd 5-by-4 input matrix:
|
||||
Column 0, with 3 entries:
|
||||
row 0
|
||||
row 1
|
||||
row 4
|
||||
Column 1, with 2 entries:
|
||||
row 2
|
||||
row 4
|
||||
Column 2, with 4 entries:
|
||||
row 0
|
||||
row 1
|
||||
row 2
|
||||
row 3
|
||||
Column 3, with 2 entries:
|
||||
row 1
|
||||
row 3
|
||||
|
||||
ccolamd version 2.7, Jan 25, 2011: OK.
|
||||
ccolamd: number of dense or empty rows ignored: 0
|
||||
ccolamd: number of dense or empty columns ignored: 0
|
||||
ccolamd: number of garbage collections performed: 0
|
||||
ccolamd_l column ordering:
|
||||
1st column: 1
|
||||
2nd column: 0
|
||||
3rd column: 3
|
||||
4th column: 2
|
||||
|
||||
|
||||
csymamd_l 5-by-5 input matrix:
|
||||
Entries in strictly lower triangular part:
|
||||
Column 0, with 1 entries:
|
||||
row 1
|
||||
Column 1, with 2 entries:
|
||||
row 2
|
||||
row 3
|
||||
Column 2, with 0 entries:
|
||||
Column 3, with 1 entries:
|
||||
row 4
|
||||
Column 4, with 0 entries:
|
||||
|
||||
csymamd version 2.7, Jan 25, 2011: OK.
|
||||
csymamd: number of dense or empty rows ignored: 0
|
||||
csymamd: number of dense or empty columns ignored: 0
|
||||
csymamd: number of garbage collections performed: 0
|
||||
csymamd_l column ordering:
|
||||
1st row/column: 0
|
||||
2nd row/column: 2
|
||||
3rd row/column: 1
|
||||
4th row/column: 3
|
||||
5th row/column: 4
|
|
@ -1,3 +1,7 @@
|
|||
May 4, 2016: version 2.9.6
|
||||
|
||||
* minor changes to Makefile
|
||||
|
||||
Apr 1, 2016: version 2.9.5
|
||||
|
||||
* licensing simplified (no other change); refer to CCOLAMD/Doc/License.txt
|
||||
|
|
|
@ -6,16 +6,28 @@ http://www.suitesparse.com
|
|||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
CCOLAMD is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
CCOLAMD license: BSD 3-clause:
|
||||
|
||||
CCOLAMD is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the organizations to which the authors are
|
||||
affiliated, nor the names of its contributors may be used to endorse
|
||||
or promote products derived from this software without specific prior
|
||||
written permission.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this Module; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGE.
|
||||
|
|
|
@ -41,11 +41,11 @@ extern "C" {
|
|||
* #endif
|
||||
*/
|
||||
|
||||
#define CCOLAMD_DATE "Apr 1, 2016"
|
||||
#define CCOLAMD_DATE "May 4, 2016"
|
||||
#define CCOLAMD_VERSION_CODE(main,sub) ((main) * 1000 + (sub))
|
||||
#define CCOLAMD_MAIN_VERSION 2
|
||||
#define CCOLAMD_SUB_VERSION 9
|
||||
#define CCOLAMD_SUBSUB_VERSION 5
|
||||
#define CCOLAMD_SUBSUB_VERSION 6
|
||||
#define CCOLAMD_VERSION \
|
||||
CCOLAMD_VERSION_CODE(CCOLAMD_MAIN_VERSION,CCOLAMD_SUB_VERSION)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#-------------------------------------------------------------------------------
|
||||
|
||||
LIBRARY = libccolamd
|
||||
VERSION = 2.9.5
|
||||
VERSION = 2.9.6
|
||||
SO_VERSION = 2
|
||||
|
||||
default: library
|
||||
|
@ -32,6 +32,8 @@ ccolamd_l.o: $(SRC) $(INC)
|
|||
$(CC) $(CF) $(I) -c ../Source/ccolamd.c -DDLONG -o ccolamd_l.o
|
||||
|
||||
# creates libccolamd.a, a C-callable CCOLAMD library
|
||||
static: $(AR_TARGET)
|
||||
|
||||
$(AR_TARGET): $(OBJ)
|
||||
$(ARCHIVE) $@ $^
|
||||
- $(RANLIB) $@
|
||||
|
|
Binary file not shown.
|
@ -20,6 +20,10 @@ all:
|
|||
library:
|
||||
( cd Lib ; $(MAKE) )
|
||||
|
||||
# compile the static libraries only
|
||||
static:
|
||||
( cd Lib ; $(MAKE) static )
|
||||
|
||||
# remove object files, but keep the compiled programs and library archives
|
||||
clean:
|
||||
( cd Lib ; $(MAKE) clean )
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
/* ========================================================================== */
|
||||
/* === ccolamd_global.c ===================================================== */
|
||||
/* ========================================================================== */
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* CCOLAMD Copyright (C), Univ. of Florida. Authors: Timothy A. Davis,
|
||||
* Sivasankaran Rajamanickam, and Stefan Larimore
|
||||
* See License.txt for the Version 2.1 of the GNU Lesser General Public License
|
||||
* http://www.cise.ufl.edu/research/sparse
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
/* Global variables for CCOLAMD */
|
||||
|
||||
#ifndef NPRINT
|
||||
#ifdef MATLAB_MEX_FILE
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
typedef uint16_t char16_t;
|
||||
#include "mex.h"
|
||||
int (*ccolamd_printf) (const char *, ...) = mexPrintf ;
|
||||
#else
|
||||
#include <stdio.h>
|
||||
int (*ccolamd_printf) (const char *, ...) = printf ;
|
||||
#endif
|
||||
#else
|
||||
int (*ccolamd_printf) (const char *, ...) = ((void *) 0) ;
|
||||
#endif
|
||||
|
|
@ -7,7 +7,7 @@ export SUITESPARSE
|
|||
|
||||
# version of SuiteSparse_config is also version of SuiteSparse meta-package
|
||||
LIBRARY = libsuitesparseconfig
|
||||
VERSION = 4.5.2
|
||||
VERSION = 4.5.6
|
||||
SO_VERSION = 4
|
||||
|
||||
default: library
|
||||
|
@ -27,6 +27,8 @@ OBJ = SuiteSparse_config.o
|
|||
SuiteSparse_config.o: SuiteSparse_config.c SuiteSparse_config.h
|
||||
$(CC) $(CF) -c SuiteSparse_config.c
|
||||
|
||||
static: $(AR_TARGET)
|
||||
|
||||
$(AR_TARGET): $(OBJ)
|
||||
$(ARCHIVE) $(AR_TARGET) SuiteSparse_config.o
|
||||
$(RANLIB) $(AR_TARGET)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
SuiteSparse_config, 2016, Timothy A. Davis, http://www.suitesparse.com
|
||||
SuiteSparse_config, 2017, Timothy A. Davis, http://www.suitesparse.com
|
||||
(formerly the UFconfig package)
|
||||
|
||||
This directory contains a default SuiteSparse_config.mk file. It tries to
|
||||
|
|
|
@ -184,24 +184,24 @@ int SuiteSparse_divcomplex
|
|||
*
|
||||
* SuiteSparse contains the following packages:
|
||||
*
|
||||
* SuiteSparse_config version 4.5.2 (version always the same as SuiteSparse)
|
||||
* AMD version 2.4.5
|
||||
* BTF version 1.2.5
|
||||
* CAMD version 2.4.5
|
||||
* CCOLAMD version 2.9.5
|
||||
* CHOLMOD version 3.0.10
|
||||
* COLAMD version 2.9.5
|
||||
* CSparse version 3.1.8
|
||||
* CXSparse version 3.1.8
|
||||
* GPUQREngine version 1.0.4
|
||||
* KLU version 1.3.7
|
||||
* LDL version 2.2.5
|
||||
* RBio version 2.2.5
|
||||
* SPQR version 2.0.6
|
||||
* SuiteSparse_GPURuntime version 1.0.4
|
||||
* UMFPACK version 5.7.5
|
||||
* SuiteSparse_config version 4.5.6 (version always the same as SuiteSparse)
|
||||
* AMD version 2.4.6
|
||||
* BTF version 1.2.6
|
||||
* CAMD version 2.4.6
|
||||
* CCOLAMD version 2.9.6
|
||||
* CHOLMOD version 3.0.11
|
||||
* COLAMD version 2.9.6
|
||||
* CSparse version 3.1.9
|
||||
* CXSparse version 3.1.9
|
||||
* GPUQREngine version 1.0.5
|
||||
* KLU version 1.3.8
|
||||
* LDL version 2.2.6
|
||||
* RBio version 2.2.6
|
||||
* SPQR version 2.0.8
|
||||
* SuiteSparse_GPURuntime version 1.0.5
|
||||
* UMFPACK version 5.7.6
|
||||
* MATLAB_Tools various packages & M-files
|
||||
* xerbla version 1.0.2
|
||||
* xerbla version 1.0.3
|
||||
*
|
||||
* Other package dependencies:
|
||||
* BLAS required by CHOLMOD and UMFPACK
|
||||
|
@ -211,7 +211,6 @@ int SuiteSparse_divcomplex
|
|||
* they are compiled with GPU acceleration.
|
||||
*/
|
||||
|
||||
|
||||
int SuiteSparse_version /* returns SUITESPARSE_VERSION */
|
||||
(
|
||||
/* output, not defined on input. Not used if NULL. Returns
|
||||
|
@ -234,11 +233,11 @@ int SuiteSparse_version /* returns SUITESPARSE_VERSION */
|
|||
*/
|
||||
#define SUITESPARSE_HAS_VERSION_FUNCTION
|
||||
|
||||
#define SUITESPARSE_DATE "Apr 1, 2016"
|
||||
#define SUITESPARSE_DATE "Oct 3, 2017"
|
||||
#define SUITESPARSE_VER_CODE(main,sub) ((main) * 1000 + (sub))
|
||||
#define SUITESPARSE_MAIN_VERSION 4
|
||||
#define SUITESPARSE_SUB_VERSION 5
|
||||
#define SUITESPARSE_SUBSUB_VERSION 2
|
||||
#define SUITESPARSE_SUBSUB_VERSION 6
|
||||
#define SUITESPARSE_VERSION \
|
||||
SUITESPARSE_VER_CODE(SUITESPARSE_MAIN_VERSION,SUITESPARSE_SUB_VERSION)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# This file contains all configuration settings for all packages in SuiteSparse,
|
||||
# except for CSparse (which is stand-alone) and the packages in MATLAB_Tools.
|
||||
|
||||
SUITESPARSE_VERSION = 4.5.2
|
||||
SUITESPARSE_VERSION = 4.5.6
|
||||
|
||||
#===============================================================================
|
||||
# Options you can change without editing this file:
|
||||
|
@ -115,6 +115,7 @@ SUITESPARSE_VERSION = 4.5.2
|
|||
CC = icc -D_GNU_SOURCE
|
||||
CXX = $(CC)
|
||||
CFOPENMP = -qopenmp -I$(MKLROOT)/include
|
||||
LDFLAGS += -openmp
|
||||
endif
|
||||
ifneq ($(shell which ifort 2>/dev/null),)
|
||||
# use the Intel ifort compiler for Fortran codes
|
||||
|
@ -123,7 +124,7 @@ SUITESPARSE_VERSION = 4.5.2
|
|||
endif
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# code formatting (for Tcov only)
|
||||
# code formatting (for Tcov on Linux only)
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
PRETTY ?= grep -v "^\#" | indent -bl -nce -bli0 -i4 -sob -l120
|
||||
|
@ -224,7 +225,6 @@ SUITESPARSE_VERSION = 4.5.2
|
|||
CUDA_INC = -I$(CUDA_INC_PATH)
|
||||
NVCC = $(CUDA_PATH)/bin/nvcc
|
||||
NVCCFLAGS = -Xcompiler -fPIC -O3 \
|
||||
-gencode=arch=compute_20,code=sm_20 \
|
||||
-gencode=arch=compute_30,code=sm_30 \
|
||||
-gencode=arch=compute_35,code=sm_35 \
|
||||
-gencode=arch=compute_50,code=sm_50 \
|
||||
|
@ -305,8 +305,9 @@ SUITESPARSE_VERSION = 4.5.2
|
|||
|
||||
SPQR_CONFIG ?= $(GPU_CONFIG)
|
||||
|
||||
# to compile with Intel's TBB, use TBB=-ltbb SPQR_CONFIG=-DHAVE_TBB
|
||||
# to compile with Intel's TBB, use TBB=-ltbb -DSPQR_CONFIG=-DHAVE_TBB
|
||||
TBB ?=
|
||||
# TBB = -ltbb -DSPQR_CONFIG=-DHAVE_TBB
|
||||
|
||||
# TODO: this *mk file should auto-detect the presence of Intel's TBB,
|
||||
# and set the compiler flags accordingly.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
USE_FORTRAN = 0
|
||||
# USE_FORTRAN = 1
|
||||
|
||||
VERSION = 1.0.2
|
||||
VERSION = 1.0.3
|
||||
SO_VERSION = 1
|
||||
|
||||
default: library
|
||||
|
@ -35,6 +35,8 @@ ccode: all
|
|||
|
||||
fortran: all
|
||||
|
||||
static: $(AR_TARGET)
|
||||
|
||||
$(AR_TARGET): $(DEPENDS)
|
||||
$(COMPILE)
|
||||
$(ARCHIVE) $(AR_TARGET) xerbla.o
|
||||
|
|
|
@ -25,7 +25,6 @@ add_subdirectory(3rdparty)
|
|||
set (3rdparty_srcs
|
||||
${eigen_headers} # Set by 3rdparty/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/CCOLAMD/Source/ccolamd.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/CCOLAMD/Source/ccolamd_global.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/SuiteSparse_config/SuiteSparse_config.c)
|
||||
gtsam_assign_source_folders("${3rdparty_srcs}") # Create MSVC structure
|
||||
|
||||
|
@ -138,7 +137,7 @@ endif()
|
|||
|
||||
# make sure that ccolamd compiles even in face of warnings
|
||||
if(WIN32)
|
||||
set_source_files_properties(${3rdparty_srcs} PROPERTIES COMPILE_FLAGS "/w")
|
||||
set_source_files_properties(${3rdparty_srcs} PROPERTIES COMPILE_FLAGS "-w")
|
||||
else()
|
||||
set_source_files_properties(${3rdparty_srcs} PROPERTIES COMPILE_FLAGS "-Wno-error")
|
||||
endif()
|
||||
|
|
|
@ -190,7 +190,7 @@ public:
|
|||
}
|
||||
|
||||
/// use this macro instead of BOOST_CLASS_EXPORT for GenericValues
|
||||
#define GTSAM_VALUE_EXPORT(Type) BOOST_CLASS_EXPORT(GenericValue<Type>)
|
||||
#define GTSAM_VALUE_EXPORT(Type) BOOST_CLASS_EXPORT(gtsam::GenericValue<Type>)
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -378,6 +378,16 @@ Unit3 Pose3::bearing(const Point3& point, OptionalJacobian<2, 6> H1,
|
|||
}
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
Unit3 Pose3::bearing(const Pose3& pose, OptionalJacobian<2, 6> H1,
|
||||
OptionalJacobian<2, 6> H2) const {
|
||||
if (H2) {
|
||||
H2->setZero();
|
||||
return bearing(pose.translation(), H1, H2.cols<3>(3));
|
||||
}
|
||||
return bearing(pose.translation(), H1, boost::none);
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
boost::optional<Pose3> Pose3::Align(const std::vector<Point3Pair>& abPointPairs) {
|
||||
const size_t n = abPointPairs.size();
|
||||
|
|
|
@ -282,6 +282,15 @@ public:
|
|||
Unit3 bearing(const Point3& point, OptionalJacobian<2, 6> H1 = boost::none,
|
||||
OptionalJacobian<2, 3> H2 = boost::none) const;
|
||||
|
||||
/**
|
||||
* Calculate bearing to another pose
|
||||
* @param other 3D location and orientation of other body. The orientation
|
||||
* information is ignored.
|
||||
* @return bearing (Unit3)
|
||||
*/
|
||||
Unit3 bearing(const Pose3& pose, OptionalJacobian<2, 6> H1 = boost::none,
|
||||
OptionalJacobian<2, 6> H2 = boost::none) const;
|
||||
|
||||
/// @}
|
||||
/// @name Advanced Interface
|
||||
/// @{
|
||||
|
@ -353,6 +362,9 @@ struct traits<const Pose3> : public internal::LieGroup<Pose3> {};
|
|||
template <>
|
||||
struct Bearing<Pose3, Point3> : HasBearing<Pose3, Point3, Unit3> {};
|
||||
|
||||
template<>
|
||||
struct Bearing<Pose3, Pose3> : HasBearing<Pose3, Pose3, Unit3> {};
|
||||
|
||||
template <typename T>
|
||||
struct Range<Pose3, T> : HasRange<Pose3, T, double> {};
|
||||
|
||||
|
|
|
@ -708,6 +708,27 @@ TEST(Pose3, Bearing2) {
|
|||
EXPECT(assert_equal(expectedH2, actualH2));
|
||||
}
|
||||
|
||||
TEST(Pose3, PoseToPoseBearing) {
|
||||
Matrix expectedH1, actualH1, expectedH2, actualH2, H2block;
|
||||
EXPECT(assert_equal(Unit3(0,1,0), xl1.bearing(xl2, actualH1, actualH2), 1e-9));
|
||||
|
||||
// Check numerical derivatives
|
||||
expectedH1 = numericalDerivative21(bearing_proxy, xl1, l2);
|
||||
|
||||
// Since the second pose is treated as a point, the value calculated by
|
||||
// numericalDerivative22 only depends on the position of the pose. Here, we
|
||||
// calculate the Jacobian w.r.t. the second pose's position, and then augment
|
||||
// that with zeroes in the block that is w.r.t. the second pose's
|
||||
// orientation.
|
||||
H2block = numericalDerivative22(bearing_proxy, xl1, l2);
|
||||
expectedH2 = Matrix(2, 6);
|
||||
expectedH2.setZero();
|
||||
expectedH2.block<2, 3>(0, 3) = H2block;
|
||||
|
||||
EXPECT(assert_equal(expectedH1, actualH1));
|
||||
EXPECT(assert_equal(expectedH2, actualH2));
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
TEST( Pose3, unicycle )
|
||||
{
|
||||
|
|
|
@ -35,6 +35,8 @@ struct PreintegratedRotationParams {
|
|||
|
||||
PreintegratedRotationParams() : gyroscopeCovariance(I_3x3) {}
|
||||
|
||||
virtual ~PreintegratedRotationParams() {}
|
||||
|
||||
virtual void print(const std::string& s) const;
|
||||
virtual bool equals(const PreintegratedRotationParams& other, double tol=1e-9) const;
|
||||
|
||||
|
|
|
@ -53,6 +53,9 @@ void exportPose3(){
|
|||
// function pointers to desambiguate range() calls
|
||||
double (Pose3::*range1)(const Point3 &, OptionalJacobian<1,6>, OptionalJacobian<1,3>) const = &Pose3::range;
|
||||
double (Pose3::*range2)(const Pose3 &, OptionalJacobian<1,6>, OptionalJacobian<1,6>) const = &Pose3::range;
|
||||
// function pointers to desambiguate bearing() calls
|
||||
Unit3 (Pose3::*bearing1)(const Point3 &, OptionalJacobian<2,6>, OptionalJacobian<2,3>) const = &Pose3::bearing;
|
||||
Unit3 (Pose3::*bearing2)(const Pose3 &, OptionalJacobian<2,6>, OptionalJacobian<2,6>) const = &Pose3::bearing;
|
||||
|
||||
class_<Pose3>("Pose3")
|
||||
.def(init<>())
|
||||
|
@ -65,7 +68,6 @@ void exportPose3(){
|
|||
.def("equals", &Pose3::equals, equals_overloads(args("pose", "tol")))
|
||||
.def("identity", &Pose3::identity)
|
||||
.staticmethod("identity")
|
||||
.def("bearing", &Pose3::bearing)
|
||||
.def("matrix", &Pose3::matrix)
|
||||
.def("transform_from", &Pose3::transform_from,
|
||||
transform_from_overloads(args("point", "H1", "H2")))
|
||||
|
@ -88,5 +90,6 @@ void exportPose3(){
|
|||
.def("between", between2, between_overloads())
|
||||
.def("range", range1, range_overloads())
|
||||
.def("range", range2, range_overloads())
|
||||
.def("bearing", &Pose3::bearing, bearing_overloads());
|
||||
.def("bearing", bearing1, bearing_overloads())
|
||||
.def("bearing", bearing2, bearing_overloads());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue