forked from Archive/PX4-Autopilot
EKF tests update SWIG usage and use latest containers
This commit is contained in:
parent
dd58e69549
commit
c5554cae96
|
@ -14,7 +14,10 @@ set_source_files_properties(../ecl_EKF.i PROPERTIES CPLUSPLUS ON)
|
|||
include_directories(../..)
|
||||
|
||||
# Add swig module
|
||||
swig_add_module(ecl_EKF python ../ecl_EKF.i)
|
||||
swig_add_library(ecl_EKF
|
||||
LANGUAGE python
|
||||
SOURCES ../ecl_EKF.i
|
||||
)
|
||||
swig_link_libraries(ecl_EKF ecl_EKF ${PYTHON_LIBRARIES})
|
||||
|
||||
# Files to install with Python
|
||||
|
|
|
@ -133,13 +133,13 @@ def test_converges_to_baro_altitude(altitude):
|
|||
Increase the altitude with a bang-bang acceleration profile to target
|
||||
altitude, then wait there for a while and make sure it converges
|
||||
"""
|
||||
# Due to hypothesis not interacting with pytest, cannot use fixture here
|
||||
ekf, time_usec = initialized_ekf()
|
||||
ekf = ecl_EKF.Ekf()
|
||||
|
||||
time_usec = 1000
|
||||
dt_usec = ecl_EKF.Ekf.FILTER_UPDATE_PERIOD_MS * 1000
|
||||
|
||||
# No samples, half are used for ramping up / down to the altitude
|
||||
n_samples = 200
|
||||
# Run for a while
|
||||
n_samples = 10000
|
||||
|
||||
# Compute smooth acceleration profile
|
||||
rampup_accel = altitude / (((n_samples // 2 // 2) * (dt_usec / 1e6))**2)
|
||||
|
|
|
@ -7,7 +7,7 @@ pipeline {
|
|||
stage('Linux GCC') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-base:2019-01-28'
|
||||
image 'px4io/px4-dev-base:2019-01-31'
|
||||
args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ pipeline {
|
|||
stage('Linux Clang') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-clang:2019-01-28'
|
||||
image 'px4io/px4-dev-clang:2019-01-31'
|
||||
args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ pipeline {
|
|||
stage('coverage') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ecl:2019-01-28'
|
||||
image 'px4io/px4-dev-ecl:2019-01-31'
|
||||
args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ pipeline {
|
|||
stage('EKF pytest') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ecl:2019-01-28'
|
||||
image 'px4io/px4-dev-ecl:2019-01-31'
|
||||
args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ pipeline {
|
|||
stage('test') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ecl:2019-01-28'
|
||||
image 'px4io/px4-dev-ecl:2019-01-31'
|
||||
args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
|
@ -137,27 +137,10 @@ pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
stage('test (asan)') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ecl:2019-01-28'
|
||||
args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'ccache -z'
|
||||
sh 'make distclean'
|
||||
sh 'make test_asan'
|
||||
sh 'ccache -s'
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
|
||||
stage('doxygen') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-base:2019-01-28'
|
||||
image 'px4io/px4-dev-base:2019-01-31'
|
||||
args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
|
@ -183,7 +166,7 @@ pipeline {
|
|||
stage('PX4/Firmware build') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-base:2019-01-28'
|
||||
image 'px4io/px4-dev-base:2019-01-31'
|
||||
args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
|
|
16
ecl.h
16
ecl.h
|
@ -67,19 +67,5 @@ using ecl_abstime = uint64_t;
|
|||
|
||||
#endif /* PX4_POSIX || PX4_NUTTX */
|
||||
|
||||
|
||||
#if defined(__PX4_QURT)
|
||||
|
||||
// Missing math.h defines
|
||||
#define ISFINITE(x) __builtin_isfinite(x)
|
||||
|
||||
#else /* !QuRT */
|
||||
|
||||
#include <cmath>
|
||||
#if defined(__cplusplus) && !defined(__PX4_NUTTX)
|
||||
#define ISFINITE(x) std::isfinite(x)
|
||||
#else
|
||||
#define ISFINITE(x) isfinite(x)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#define ISFINITE(x) __builtin_isfinite(x)
|
||||
|
|
Loading…
Reference in New Issue