diff --git a/armer/armer.py b/armer/armer.py
index 6c6a544..b46d9e3 100644
--- a/armer/armer.py
+++ b/armer/armer.py
@@ -306,7 +306,7 @@ def global_collision_check(self, robot: ROSRobot):
debug=True
)
end = timeit.default_timer()
- print(f"[KD Setup] full collision check: {1/(end-start)} hz")
+ # print(f"[KD Setup] full collision check: {1/(end-start)} hz")
# print(f"[Check Links] -> {check_links}")
# Alternative Method
@@ -323,7 +323,7 @@ def global_collision_check(self, robot: ROSRobot):
check_links = check_links
)
end = timeit.default_timer()
- print(f"[Actual Link Check] full collision check: {1/(end-start)} hz")
+ # print(f"[Actual Link Check] full collision check: {1/(end-start)} hz")
if col_link_id >= 0:
rospy.logwarn(f"Global Collision Check -> Robot [{robot.name}] in collision with link {robot.collision_sliced_links[col_link_id].name}")
@@ -435,7 +435,7 @@ def update_dynamic_objects(self, robot: ROSRobot) -> None:
else:
# Check if the current robot has any newly added objects to add to the backend
# NOTE: this loop is run everytime at the moment (not an issue with limited shapes but needs better optimisation for scale)
- for dynamic_obj in robot.dynamic_collision_dict.values():
+ for dynamic_obj in robot.dynamic_collision_dict.copy().values():
if dynamic_obj.is_added == False:
rospy.loginfo(f"Adding Dynamic Object: {dynamic_obj}")
dynamic_obj.id = self.backend.add(dynamic_obj.shape)
diff --git a/armer/cython/collision_handler.cpp b/armer/cython/collision_handler.cpp
index 63934be..0966e50 100644
--- a/armer/cython/collision_handler.cpp
+++ b/armer/cython/collision_handler.cpp
@@ -1218,15 +1218,6 @@ static CYTHON_INLINE float __PYX_NAN() {
#include
#include
#include
-#include
-
- /* Using NumPy API declarations from "numpy/__init__.cython-30.pxd" */
-
-#include "numpy/arrayobject.h"
-#include "numpy/ndarrayobject.h"
-#include "numpy/ndarraytypes.h"
-#include "numpy/arrayscalars.h"
-#include "numpy/ufuncobject.h"
#include
#ifdef _OPENMP
#include
@@ -1490,34 +1481,10 @@ static int __pyx_clineno = 0;
static const char * __pyx_cfilenm = __FILE__;
static const char *__pyx_filename;
-/* Header.proto */
-#if !defined(CYTHON_CCOMPLEX)
- #if defined(__cplusplus)
- #define CYTHON_CCOMPLEX 1
- #elif (defined(_Complex_I) && !defined(_MSC_VER)) || ((defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_COMPLEX__))
- #define CYTHON_CCOMPLEX 1
- #else
- #define CYTHON_CCOMPLEX 0
- #endif
-#endif
-#if CYTHON_CCOMPLEX
- #ifdef __cplusplus
- #include
- #else
- #include
- #endif
-#endif
-#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
- #undef _Complex_I
- #define _Complex_I 1.0fj
-#endif
-
/* #### Code section: filename_table ### */
static const char *__pyx_f[] = {
"armer/cython/collision_handler.pyx",
- "__init__.cython-30.pxd",
- "type.pxd",
};
/* #### Code section: utility_code_proto_before_types ### */
/* ForceInitThreads.proto */
@@ -1526,268 +1493,10 @@ static const char *__pyx_f[] = {
#endif
/* #### Code section: numeric_typedefs ### */
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":731
- * # in Cython to enable them only on the right systems.
- *
- * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
- * ctypedef npy_int16 int16_t
- * ctypedef npy_int32 int32_t
- */
-typedef npy_int8 __pyx_t_5numpy_int8_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":732
- *
- * ctypedef npy_int8 int8_t
- * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
- * ctypedef npy_int32 int32_t
- * ctypedef npy_int64 int64_t
- */
-typedef npy_int16 __pyx_t_5numpy_int16_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":733
- * ctypedef npy_int8 int8_t
- * ctypedef npy_int16 int16_t
- * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
- * ctypedef npy_int64 int64_t
- * #ctypedef npy_int96 int96_t
- */
-typedef npy_int32 __pyx_t_5numpy_int32_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":734
- * ctypedef npy_int16 int16_t
- * ctypedef npy_int32 int32_t
- * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
- * #ctypedef npy_int96 int96_t
- * #ctypedef npy_int128 int128_t
- */
-typedef npy_int64 __pyx_t_5numpy_int64_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":738
- * #ctypedef npy_int128 int128_t
- *
- * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
- * ctypedef npy_uint16 uint16_t
- * ctypedef npy_uint32 uint32_t
- */
-typedef npy_uint8 __pyx_t_5numpy_uint8_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":739
- *
- * ctypedef npy_uint8 uint8_t
- * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
- * ctypedef npy_uint32 uint32_t
- * ctypedef npy_uint64 uint64_t
- */
-typedef npy_uint16 __pyx_t_5numpy_uint16_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":740
- * ctypedef npy_uint8 uint8_t
- * ctypedef npy_uint16 uint16_t
- * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
- * ctypedef npy_uint64 uint64_t
- * #ctypedef npy_uint96 uint96_t
- */
-typedef npy_uint32 __pyx_t_5numpy_uint32_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":741
- * ctypedef npy_uint16 uint16_t
- * ctypedef npy_uint32 uint32_t
- * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
- * #ctypedef npy_uint96 uint96_t
- * #ctypedef npy_uint128 uint128_t
- */
-typedef npy_uint64 __pyx_t_5numpy_uint64_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":745
- * #ctypedef npy_uint128 uint128_t
- *
- * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
- * ctypedef npy_float64 float64_t
- * #ctypedef npy_float80 float80_t
- */
-typedef npy_float32 __pyx_t_5numpy_float32_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":746
- *
- * ctypedef npy_float32 float32_t
- * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
- * #ctypedef npy_float80 float80_t
- * #ctypedef npy_float128 float128_t
- */
-typedef npy_float64 __pyx_t_5numpy_float64_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":755
- * # The int types are mapped a bit surprising --
- * # numpy.int corresponds to 'l' and numpy.long to 'q'
- * ctypedef npy_long int_t # <<<<<<<<<<<<<<
- * ctypedef npy_longlong long_t
- * ctypedef npy_longlong longlong_t
- */
-typedef npy_long __pyx_t_5numpy_int_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":756
- * # numpy.int corresponds to 'l' and numpy.long to 'q'
- * ctypedef npy_long int_t
- * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
- * ctypedef npy_longlong longlong_t
- *
- */
-typedef npy_longlong __pyx_t_5numpy_long_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":757
- * ctypedef npy_long int_t
- * ctypedef npy_longlong long_t
- * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
- *
- * ctypedef npy_ulong uint_t
- */
-typedef npy_longlong __pyx_t_5numpy_longlong_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":759
- * ctypedef npy_longlong longlong_t
- *
- * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
- * ctypedef npy_ulonglong ulong_t
- * ctypedef npy_ulonglong ulonglong_t
- */
-typedef npy_ulong __pyx_t_5numpy_uint_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":760
- *
- * ctypedef npy_ulong uint_t
- * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
- * ctypedef npy_ulonglong ulonglong_t
- *
- */
-typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":761
- * ctypedef npy_ulong uint_t
- * ctypedef npy_ulonglong ulong_t
- * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
- *
- * ctypedef npy_intp intp_t
- */
-typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":763
- * ctypedef npy_ulonglong ulonglong_t
- *
- * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
- * ctypedef npy_uintp uintp_t
- *
- */
-typedef npy_intp __pyx_t_5numpy_intp_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":764
- *
- * ctypedef npy_intp intp_t
- * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
- *
- * ctypedef npy_double float_t
- */
-typedef npy_uintp __pyx_t_5numpy_uintp_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":766
- * ctypedef npy_uintp uintp_t
- *
- * ctypedef npy_double float_t # <<<<<<<<<<<<<<
- * ctypedef npy_double double_t
- * ctypedef npy_longdouble longdouble_t
- */
-typedef npy_double __pyx_t_5numpy_float_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":767
- *
- * ctypedef npy_double float_t
- * ctypedef npy_double double_t # <<<<<<<<<<<<<<
- * ctypedef npy_longdouble longdouble_t
- *
- */
-typedef npy_double __pyx_t_5numpy_double_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":768
- * ctypedef npy_double float_t
- * ctypedef npy_double double_t
- * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
- *
- * ctypedef npy_cfloat cfloat_t
- */
-typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
-
-/* "collision_handler.pyx":10
- * cnp.import_array()
- * DTYPE = np.float64
- * ctypedef cnp.float64_t DTYPE_t # <<<<<<<<<<<<<<
- *
- * cdef extern from "" namespace "std":
- */
-typedef __pyx_t_5numpy_float64_t __pyx_t_17collision_handler_DTYPE_t;
/* #### Code section: complex_type_declarations ### */
-/* Declarations.proto */
-#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
- #ifdef __cplusplus
- typedef ::std::complex< float > __pyx_t_float_complex;
- #else
- typedef float _Complex __pyx_t_float_complex;
- #endif
-#else
- typedef struct { float real, imag; } __pyx_t_float_complex;
-#endif
-static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
-
-/* Declarations.proto */
-#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
- #ifdef __cplusplus
- typedef ::std::complex< double > __pyx_t_double_complex;
- #else
- typedef double _Complex __pyx_t_double_complex;
- #endif
-#else
- typedef struct { double real, imag; } __pyx_t_double_complex;
-#endif
-static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
-
/* #### Code section: type_declarations ### */
/*--- Type declarations ---*/
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":770
- * ctypedef npy_longdouble longdouble_t
- *
- * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
- * ctypedef npy_cdouble cdouble_t
- * ctypedef npy_clongdouble clongdouble_t
- */
-typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":771
- *
- * ctypedef npy_cfloat cfloat_t
- * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
- * ctypedef npy_clongdouble clongdouble_t
- *
- */
-typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":772
- * ctypedef npy_cfloat cfloat_t
- * ctypedef npy_cdouble cdouble_t
- * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
- *
- * ctypedef npy_cdouble complex_t
- */
-typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":774
- * ctypedef npy_clongdouble clongdouble_t
- *
- * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
- *
- * cdef inline object PyArray_MultiIterNew1(a):
- */
-typedef npy_cdouble __pyx_t_5numpy_complex_t;
/* #### Code section: utility_code_proto ### */
/* --- Runtime support code (head) --- */
@@ -1934,40 +1643,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, P
/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);
-/* GetTopmostException.proto */
-#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
-static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
-#endif
-
-/* SaveResetException.proto */
-#if CYTHON_FAST_THREAD_STATE
-#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
-static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
-#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
-static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
-#else
-#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
-#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
-#endif
-
-/* GetException.proto */
-#if CYTHON_FAST_THREAD_STATE
-#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
-static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
-#else
-static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
-#endif
-
-/* PyObjectCall.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
-#else
-#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
-#endif
-
-/* RaiseException.proto */
-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
-
/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
(__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
@@ -2004,12 +1679,6 @@ static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
#endif
-/* PySequenceContains.proto */
-static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
- int result = PySequence_Contains(seq, item);
- return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
-}
-
/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#if !CYTHON_VECTORCALL
@@ -2045,6 +1714,13 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args,
#endif
#endif
+/* PyObjectCall.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
+#else
+#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
+#endif
+
/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
@@ -2066,9 +1742,6 @@ static CYTHON_INLINE int __Pyx_IterFinish(void);
/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
-/* ExtTypeTest.proto */
-static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
-
/* TupleAndListFromArray.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
@@ -2164,80 +1837,11 @@ static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict,
return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}
-/* TypeImport.proto */
-#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_5
-#define __PYX_HAVE_RT_ImportType_proto_3_0_5
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
-#include
-#endif
-#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
-#define __PYX_GET_STRUCT_ALIGNMENT_3_0_5(s) alignof(s)
-#else
-#define __PYX_GET_STRUCT_ALIGNMENT_3_0_5(s) sizeof(void*)
-#endif
-enum __Pyx_ImportType_CheckSize_3_0_5 {
- __Pyx_ImportType_CheckSize_Error_3_0_5 = 0,
- __Pyx_ImportType_CheckSize_Warn_3_0_5 = 1,
- __Pyx_ImportType_CheckSize_Ignore_3_0_5 = 2
-};
-static PyTypeObject *__Pyx_ImportType_3_0_5(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_5 check_size);
-#endif
-
-/* Import.proto */
-static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
-
-/* ImportDottedModule.proto */
-static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple);
-#if PY_MAJOR_VERSION >= 3
-static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple);
-#endif
-
-/* PyDictVersioning.proto */
-#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
-#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
-#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
-#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
- (version_var) = __PYX_GET_DICT_VERSION(dict);\
- (cache_var) = (value);
-#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
- static PY_UINT64_T __pyx_dict_version = 0;\
- static PyObject *__pyx_dict_cached_value = NULL;\
- if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
- (VAR) = __pyx_dict_cached_value;\
- } else {\
- (VAR) = __pyx_dict_cached_value = (LOOKUP);\
- __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
- }\
+/* PySequenceContains.proto */
+static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
+ int result = PySequence_Contains(seq, item);
+ return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}
-static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
-static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
-static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
-#else
-#define __PYX_GET_DICT_VERSION(dict) (0)
-#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
-#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
-#endif
-
-/* GetModuleGlobalName.proto */
-#if CYTHON_USE_DICT_VERSIONS
-#define __Pyx_GetModuleGlobalName(var, name) do {\
- static PY_UINT64_T __pyx_dict_version = 0;\
- static PyObject *__pyx_dict_cached_value = NULL;\
- (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
- (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
- __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
-} while(0)
-#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\
- PY_UINT64_T __pyx_dict_version;\
- PyObject *__pyx_dict_cached_value;\
- (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
-} while(0)
-static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
-#else
-#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
-#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
-static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
-#endif
/* IncludeStructmemberH.proto */
#include
@@ -2387,6 +1991,32 @@ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
PyObject *module, PyObject *globals,
PyObject* code);
+/* PyDictVersioning.proto */
+#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
+#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
+#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
+#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
+ (version_var) = __PYX_GET_DICT_VERSION(dict);\
+ (cache_var) = (value);
+#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
+ static PY_UINT64_T __pyx_dict_version = 0;\
+ static PyObject *__pyx_dict_cached_value = NULL;\
+ if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
+ (VAR) = __pyx_dict_cached_value;\
+ } else {\
+ (VAR) = __pyx_dict_cached_value = (LOOKUP);\
+ __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
+ }\
+}
+static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
+static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
+static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
+#else
+#define __PYX_GET_DICT_VERSION(dict) (0)
+#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
+#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
+#endif
+
/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
@@ -2420,113 +2050,12 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line,
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif
-/* RealImag.proto */
-#if CYTHON_CCOMPLEX
- #ifdef __cplusplus
- #define __Pyx_CREAL(z) ((z).real())
- #define __Pyx_CIMAG(z) ((z).imag())
- #else
- #define __Pyx_CREAL(z) (__real__(z))
- #define __Pyx_CIMAG(z) (__imag__(z))
- #endif
-#else
- #define __Pyx_CREAL(z) ((z).real)
- #define __Pyx_CIMAG(z) ((z).imag)
-#endif
-#if defined(__cplusplus) && CYTHON_CCOMPLEX\
- && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
- #define __Pyx_SET_CREAL(z,x) ((z).real(x))
- #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
-#else
- #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
- #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
-#endif
-
-/* Arithmetic.proto */
-#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
- #define __Pyx_c_eq_float(a, b) ((a)==(b))
- #define __Pyx_c_sum_float(a, b) ((a)+(b))
- #define __Pyx_c_diff_float(a, b) ((a)-(b))
- #define __Pyx_c_prod_float(a, b) ((a)*(b))
- #define __Pyx_c_quot_float(a, b) ((a)/(b))
- #define __Pyx_c_neg_float(a) (-(a))
- #ifdef __cplusplus
- #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
- #define __Pyx_c_conj_float(z) (::std::conj(z))
- #if 1
- #define __Pyx_c_abs_float(z) (::std::abs(z))
- #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
- #endif
- #else
- #define __Pyx_c_is_zero_float(z) ((z)==0)
- #define __Pyx_c_conj_float(z) (conjf(z))
- #if 1
- #define __Pyx_c_abs_float(z) (cabsf(z))
- #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
- #endif
- #endif
-#else
- static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
- static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
- #if 1
- static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
- #endif
-#endif
-
-/* Arithmetic.proto */
-#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
- #define __Pyx_c_eq_double(a, b) ((a)==(b))
- #define __Pyx_c_sum_double(a, b) ((a)+(b))
- #define __Pyx_c_diff_double(a, b) ((a)-(b))
- #define __Pyx_c_prod_double(a, b) ((a)*(b))
- #define __Pyx_c_quot_double(a, b) ((a)/(b))
- #define __Pyx_c_neg_double(a) (-(a))
- #ifdef __cplusplus
- #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
- #define __Pyx_c_conj_double(z) (::std::conj(z))
- #if 1
- #define __Pyx_c_abs_double(z) (::std::abs(z))
- #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
- #endif
- #else
- #define __Pyx_c_is_zero_double(z) ((z)==0)
- #define __Pyx_c_conj_double(z) (conj(z))
- #if 1
- #define __Pyx_c_abs_double(z) (cabs(z))
- #define __Pyx_c_pow_double(a, b) (cpow(a, b))
- #endif
- #endif
-#else
- static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
- static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
- #if 1
- static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
- #endif
-#endif
-
/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
-/* CIntToPy.proto */
-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
-
/* FormatTypeName.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject *__Pyx_TypeName;
@@ -2540,6 +2069,9 @@ typedef const char *__Pyx_TypeName;
#define __Pyx_DECREF_TypeName(obj)
#endif
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
+
/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
@@ -2568,13 +2100,6 @@ static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
/* #### Code section: module_declarations ### */
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self); /* proto*/
-static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self); /* proto*/
-static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self); /* proto*/
-static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self); /* proto*/
-static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self); /* proto*/
-static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self); /* proto*/
-static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self); /* proto*/
/* Module declarations from "libc.math" */
@@ -2586,25 +2111,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p
/* Module declarations from "cython" */
-/* Module declarations from "libc.stdio" */
-
-/* Module declarations from "__builtin__" */
-
-/* Module declarations from "cpython.type" */
-
-/* Module declarations from "cpython" */
-
-/* Module declarations from "cpython.object" */
-
-/* Module declarations from "cpython.ref" */
-
-/* Module declarations from "numpy" */
-
-/* Module declarations from "numpy" */
-static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/
-
/* Module declarations from "collision_handler" */
-static PyObject *__pyx_f_17collision_handler_closest_dist_query(PyObject *, PyObject *, int, PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_17collision_handler_col_check(PyObject *, PyObject *, int, PyObject *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_17collision_handler_global_check(PyObject *, PyObject *, int, PyObject *, int, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_17collision_handler_test(int, int, int __pyx_skip_dispatch); /*proto*/
@@ -2617,57 +2124,39 @@ int __pyx_module_is_main_collision_handler = 0;
/* Implementation of "collision_handler" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_range;
-static PyObject *__pyx_builtin_ImportError;
/* #### Code section: string_decls ### */
-static const char __pyx_k__3[] = "*";
-static const char __pyx_k_np[] = "np";
-static const char __pyx_k__12[] = "?";
+static const char __pyx_k__7[] = "?";
static const char __pyx_k_copy[] = "copy";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "name";
-static const char __pyx_k_spec[] = "__spec__";
static const char __pyx_k_test[] = "test";
static const char __pyx_k_val1[] = "val1";
static const char __pyx_k_val2[] = "val2";
-static const char __pyx_k_DTYPE[] = "DTYPE";
-static const char __pyx_k_numpy[] = "numpy";
static const char __pyx_k_range[] = "range";
-static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_test_2[] = "__test__";
-static const char __pyx_k_float64[] = "float64";
-static const char __pyx_k_col_dict[] = "col_dict";
static const char __pyx_k_col_check[] = "col_check";
static const char __pyx_k_collision[] = "collision";
static const char __pyx_k_len_links[] = "len_links";
static const char __pyx_k_len_robots[] = "len_robots";
static const char __pyx_k_robot_name[] = "robot_name";
-static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_check_links[] = "check_links";
static const char __pyx_k_global_dict[] = "global_dict";
static const char __pyx_k_robot_links[] = "robot_links";
static const char __pyx_k_robot_names[] = "robot_names";
static const char __pyx_k_global_check[] = "global_check";
-static const char __pyx_k_initializing[] = "_initializing";
static const char __pyx_k_is_coroutine[] = "_is_coroutine";
static const char __pyx_k_overlap_dict[] = "overlap_dict";
static const char __pyx_k_sliced_links[] = "sliced_links";
static const char __pyx_k_closest_point[] = "closest_point";
-static const char __pyx_k_col_link_names[] = "col_link_names";
-static const char __pyx_k_sliced_link_name[] = "sliced_link_name";
-static const char __pyx_k_col_link_name_len[] = "col_link_name_len";
static const char __pyx_k_collision_handler[] = "collision_handler";
static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
-static const char __pyx_k_closest_dist_query[] = "closest_dist_query";
-static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
static const char __pyx_k_armer_cython_collision_handler_p[] = "armer/cython/collision_handler.pyx";
-static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
/* #### Code section: decls ### */
-static PyObject *__pyx_pf_17collision_handler_closest_dist_query(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sliced_link_name, PyObject *__pyx_v_col_link_names, int __pyx_v_col_link_name_len, PyObject *__pyx_v_col_dict, PyObject *__pyx_v_overlap_dict); /* proto */
-static PyObject *__pyx_pf_17collision_handler_2col_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sliced_links, PyObject *__pyx_v_check_links, int __pyx_v_len_links, PyObject *__pyx_v_global_dict); /* proto */
-static PyObject *__pyx_pf_17collision_handler_4global_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_robot_name, PyObject *__pyx_v_robot_names, int __pyx_v_len_robots, PyObject *__pyx_v_robot_links, int __pyx_v_len_links, PyObject *__pyx_v_global_dict, PyObject *__pyx_v_overlap_dict, PyObject *__pyx_v_check_links); /* proto */
-static PyObject *__pyx_pf_17collision_handler_6test(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_val1, int __pyx_v_val2); /* proto */
+static PyObject *__pyx_pf_17collision_handler_col_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sliced_links, PyObject *__pyx_v_check_links, int __pyx_v_len_links, PyObject *__pyx_v_global_dict); /* proto */
+static PyObject *__pyx_pf_17collision_handler_2global_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_robot_name, PyObject *__pyx_v_robot_names, int __pyx_v_len_robots, PyObject *__pyx_v_robot_links, int __pyx_v_len_links, PyObject *__pyx_v_global_dict, PyObject *__pyx_v_overlap_dict, PyObject *__pyx_v_check_links); /* proto */
+static PyObject *__pyx_pf_17collision_handler_4test(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_val1, int __pyx_v_val2); /* proto */
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
typedef struct {
@@ -2707,93 +2196,41 @@ typedef struct {
#endif
#if CYTHON_USE_MODULE_STATE
#endif
- #if CYTHON_USE_MODULE_STATE
- #endif
- #if CYTHON_USE_MODULE_STATE
- #endif
- PyTypeObject *__pyx_ptype_7cpython_4type_type;
- #if CYTHON_USE_MODULE_STATE
- #endif
- #if CYTHON_USE_MODULE_STATE
- #endif
- #if CYTHON_USE_MODULE_STATE
- #endif
- #if CYTHON_USE_MODULE_STATE
- #endif
- #if CYTHON_USE_MODULE_STATE
- #endif
- PyTypeObject *__pyx_ptype_5numpy_dtype;
- PyTypeObject *__pyx_ptype_5numpy_flatiter;
- PyTypeObject *__pyx_ptype_5numpy_broadcast;
- PyTypeObject *__pyx_ptype_5numpy_ndarray;
- PyTypeObject *__pyx_ptype_5numpy_generic;
- PyTypeObject *__pyx_ptype_5numpy_number;
- PyTypeObject *__pyx_ptype_5numpy_integer;
- PyTypeObject *__pyx_ptype_5numpy_signedinteger;
- PyTypeObject *__pyx_ptype_5numpy_unsignedinteger;
- PyTypeObject *__pyx_ptype_5numpy_inexact;
- PyTypeObject *__pyx_ptype_5numpy_floating;
- PyTypeObject *__pyx_ptype_5numpy_complexfloating;
- PyTypeObject *__pyx_ptype_5numpy_flexible;
- PyTypeObject *__pyx_ptype_5numpy_character;
- PyTypeObject *__pyx_ptype_5numpy_ufunc;
- #if CYTHON_USE_MODULE_STATE
- #endif
- PyObject *__pyx_n_s_DTYPE;
- PyObject *__pyx_n_s_ImportError;
- PyObject *__pyx_n_s__12;
- PyObject *__pyx_n_s__3;
+ PyObject *__pyx_n_s__7;
PyObject *__pyx_kp_s_armer_cython_collision_handler_p;
PyObject *__pyx_n_s_asyncio_coroutines;
PyObject *__pyx_n_s_check_links;
PyObject *__pyx_n_s_cline_in_traceback;
- PyObject *__pyx_n_s_closest_dist_query;
PyObject *__pyx_n_s_closest_point;
PyObject *__pyx_n_s_col_check;
- PyObject *__pyx_n_s_col_dict;
- PyObject *__pyx_n_s_col_link_name_len;
- PyObject *__pyx_n_s_col_link_names;
PyObject *__pyx_n_s_collision;
PyObject *__pyx_n_s_collision_handler;
PyObject *__pyx_n_s_copy;
- PyObject *__pyx_n_s_float64;
PyObject *__pyx_n_s_global_check;
PyObject *__pyx_n_s_global_dict;
- PyObject *__pyx_n_s_import;
- PyObject *__pyx_n_s_initializing;
PyObject *__pyx_n_s_is_coroutine;
PyObject *__pyx_n_s_len_links;
PyObject *__pyx_n_s_len_robots;
PyObject *__pyx_n_s_main;
PyObject *__pyx_n_s_name;
PyObject *__pyx_n_s_name_2;
- PyObject *__pyx_n_s_np;
- PyObject *__pyx_n_s_numpy;
- PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
- PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
PyObject *__pyx_n_s_overlap_dict;
PyObject *__pyx_n_s_range;
PyObject *__pyx_n_s_robot_links;
PyObject *__pyx_n_s_robot_name;
PyObject *__pyx_n_s_robot_names;
- PyObject *__pyx_n_s_sliced_link_name;
PyObject *__pyx_n_s_sliced_links;
- PyObject *__pyx_n_s_spec;
PyObject *__pyx_n_s_test;
PyObject *__pyx_n_s_test_2;
PyObject *__pyx_n_s_val1;
PyObject *__pyx_n_s_val2;
PyObject *__pyx_int_0;
PyObject *__pyx_tuple_;
- PyObject *__pyx_tuple__2;
- PyObject *__pyx_tuple__4;
- PyObject *__pyx_tuple__6;
- PyObject *__pyx_tuple__8;
- PyObject *__pyx_tuple__10;
- PyObject *__pyx_codeobj__5;
- PyObject *__pyx_codeobj__7;
- PyObject *__pyx_codeobj__9;
- PyObject *__pyx_codeobj__11;
+ PyObject *__pyx_tuple__3;
+ PyObject *__pyx_tuple__5;
+ PyObject *__pyx_codeobj__2;
+ PyObject *__pyx_codeobj__4;
+ PyObject *__pyx_codeobj__6;
} __pyx_mstate;
#if CYTHON_USE_MODULE_STATE
@@ -2836,77 +2273,41 @@ static int __pyx_m_clear(PyObject *m) {
#ifdef __Pyx_FusedFunction_USED
Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
#endif
- Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
- Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_dtype);
- Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flatiter);
- Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_broadcast);
- Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ndarray);
- Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_generic);
- Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_number);
- Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_integer);
- Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_signedinteger);
- Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_unsignedinteger);
- Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_inexact);
- Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_floating);
- Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_complexfloating);
- Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flexible);
- Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_character);
- Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ufunc);
- Py_CLEAR(clear_module_state->__pyx_n_s_DTYPE);
- Py_CLEAR(clear_module_state->__pyx_n_s_ImportError);
- Py_CLEAR(clear_module_state->__pyx_n_s__12);
- Py_CLEAR(clear_module_state->__pyx_n_s__3);
+ Py_CLEAR(clear_module_state->__pyx_n_s__7);
Py_CLEAR(clear_module_state->__pyx_kp_s_armer_cython_collision_handler_p);
Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
Py_CLEAR(clear_module_state->__pyx_n_s_check_links);
Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
- Py_CLEAR(clear_module_state->__pyx_n_s_closest_dist_query);
Py_CLEAR(clear_module_state->__pyx_n_s_closest_point);
Py_CLEAR(clear_module_state->__pyx_n_s_col_check);
- Py_CLEAR(clear_module_state->__pyx_n_s_col_dict);
- Py_CLEAR(clear_module_state->__pyx_n_s_col_link_name_len);
- Py_CLEAR(clear_module_state->__pyx_n_s_col_link_names);
Py_CLEAR(clear_module_state->__pyx_n_s_collision);
Py_CLEAR(clear_module_state->__pyx_n_s_collision_handler);
Py_CLEAR(clear_module_state->__pyx_n_s_copy);
- Py_CLEAR(clear_module_state->__pyx_n_s_float64);
Py_CLEAR(clear_module_state->__pyx_n_s_global_check);
Py_CLEAR(clear_module_state->__pyx_n_s_global_dict);
- Py_CLEAR(clear_module_state->__pyx_n_s_import);
- Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
Py_CLEAR(clear_module_state->__pyx_n_s_len_links);
Py_CLEAR(clear_module_state->__pyx_n_s_len_robots);
Py_CLEAR(clear_module_state->__pyx_n_s_main);
Py_CLEAR(clear_module_state->__pyx_n_s_name);
Py_CLEAR(clear_module_state->__pyx_n_s_name_2);
- Py_CLEAR(clear_module_state->__pyx_n_s_np);
- Py_CLEAR(clear_module_state->__pyx_n_s_numpy);
- Py_CLEAR(clear_module_state->__pyx_kp_s_numpy_core_multiarray_failed_to);
- Py_CLEAR(clear_module_state->__pyx_kp_s_numpy_core_umath_failed_to_impor);
Py_CLEAR(clear_module_state->__pyx_n_s_overlap_dict);
Py_CLEAR(clear_module_state->__pyx_n_s_range);
Py_CLEAR(clear_module_state->__pyx_n_s_robot_links);
Py_CLEAR(clear_module_state->__pyx_n_s_robot_name);
Py_CLEAR(clear_module_state->__pyx_n_s_robot_names);
- Py_CLEAR(clear_module_state->__pyx_n_s_sliced_link_name);
Py_CLEAR(clear_module_state->__pyx_n_s_sliced_links);
- Py_CLEAR(clear_module_state->__pyx_n_s_spec);
Py_CLEAR(clear_module_state->__pyx_n_s_test);
Py_CLEAR(clear_module_state->__pyx_n_s_test_2);
Py_CLEAR(clear_module_state->__pyx_n_s_val1);
Py_CLEAR(clear_module_state->__pyx_n_s_val2);
Py_CLEAR(clear_module_state->__pyx_int_0);
Py_CLEAR(clear_module_state->__pyx_tuple_);
- Py_CLEAR(clear_module_state->__pyx_tuple__2);
- Py_CLEAR(clear_module_state->__pyx_tuple__4);
- Py_CLEAR(clear_module_state->__pyx_tuple__6);
- Py_CLEAR(clear_module_state->__pyx_tuple__8);
- Py_CLEAR(clear_module_state->__pyx_tuple__10);
- Py_CLEAR(clear_module_state->__pyx_codeobj__5);
- Py_CLEAR(clear_module_state->__pyx_codeobj__7);
- Py_CLEAR(clear_module_state->__pyx_codeobj__9);
- Py_CLEAR(clear_module_state->__pyx_codeobj__11);
+ Py_CLEAR(clear_module_state->__pyx_tuple__3);
+ Py_CLEAR(clear_module_state->__pyx_tuple__5);
+ Py_CLEAR(clear_module_state->__pyx_codeobj__2);
+ Py_CLEAR(clear_module_state->__pyx_codeobj__4);
+ Py_CLEAR(clear_module_state->__pyx_codeobj__6);
return 0;
}
#endif
@@ -2927,77 +2328,41 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
#ifdef __Pyx_FusedFunction_USED
Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
#endif
- Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
- Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_dtype);
- Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flatiter);
- Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_broadcast);
- Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ndarray);
- Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_generic);
- Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_number);
- Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_integer);
- Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_signedinteger);
- Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_unsignedinteger);
- Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_inexact);
- Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_floating);
- Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_complexfloating);
- Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flexible);
- Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_character);
- Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ufunc);
- Py_VISIT(traverse_module_state->__pyx_n_s_DTYPE);
- Py_VISIT(traverse_module_state->__pyx_n_s_ImportError);
- Py_VISIT(traverse_module_state->__pyx_n_s__12);
- Py_VISIT(traverse_module_state->__pyx_n_s__3);
+ Py_VISIT(traverse_module_state->__pyx_n_s__7);
Py_VISIT(traverse_module_state->__pyx_kp_s_armer_cython_collision_handler_p);
Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
Py_VISIT(traverse_module_state->__pyx_n_s_check_links);
Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
- Py_VISIT(traverse_module_state->__pyx_n_s_closest_dist_query);
Py_VISIT(traverse_module_state->__pyx_n_s_closest_point);
Py_VISIT(traverse_module_state->__pyx_n_s_col_check);
- Py_VISIT(traverse_module_state->__pyx_n_s_col_dict);
- Py_VISIT(traverse_module_state->__pyx_n_s_col_link_name_len);
- Py_VISIT(traverse_module_state->__pyx_n_s_col_link_names);
Py_VISIT(traverse_module_state->__pyx_n_s_collision);
Py_VISIT(traverse_module_state->__pyx_n_s_collision_handler);
Py_VISIT(traverse_module_state->__pyx_n_s_copy);
- Py_VISIT(traverse_module_state->__pyx_n_s_float64);
Py_VISIT(traverse_module_state->__pyx_n_s_global_check);
Py_VISIT(traverse_module_state->__pyx_n_s_global_dict);
- Py_VISIT(traverse_module_state->__pyx_n_s_import);
- Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
Py_VISIT(traverse_module_state->__pyx_n_s_len_links);
Py_VISIT(traverse_module_state->__pyx_n_s_len_robots);
Py_VISIT(traverse_module_state->__pyx_n_s_main);
Py_VISIT(traverse_module_state->__pyx_n_s_name);
Py_VISIT(traverse_module_state->__pyx_n_s_name_2);
- Py_VISIT(traverse_module_state->__pyx_n_s_np);
- Py_VISIT(traverse_module_state->__pyx_n_s_numpy);
- Py_VISIT(traverse_module_state->__pyx_kp_s_numpy_core_multiarray_failed_to);
- Py_VISIT(traverse_module_state->__pyx_kp_s_numpy_core_umath_failed_to_impor);
Py_VISIT(traverse_module_state->__pyx_n_s_overlap_dict);
Py_VISIT(traverse_module_state->__pyx_n_s_range);
Py_VISIT(traverse_module_state->__pyx_n_s_robot_links);
Py_VISIT(traverse_module_state->__pyx_n_s_robot_name);
Py_VISIT(traverse_module_state->__pyx_n_s_robot_names);
- Py_VISIT(traverse_module_state->__pyx_n_s_sliced_link_name);
Py_VISIT(traverse_module_state->__pyx_n_s_sliced_links);
- Py_VISIT(traverse_module_state->__pyx_n_s_spec);
Py_VISIT(traverse_module_state->__pyx_n_s_test);
Py_VISIT(traverse_module_state->__pyx_n_s_test_2);
Py_VISIT(traverse_module_state->__pyx_n_s_val1);
Py_VISIT(traverse_module_state->__pyx_n_s_val2);
Py_VISIT(traverse_module_state->__pyx_int_0);
Py_VISIT(traverse_module_state->__pyx_tuple_);
- Py_VISIT(traverse_module_state->__pyx_tuple__2);
- Py_VISIT(traverse_module_state->__pyx_tuple__4);
- Py_VISIT(traverse_module_state->__pyx_tuple__6);
- Py_VISIT(traverse_module_state->__pyx_tuple__8);
- Py_VISIT(traverse_module_state->__pyx_tuple__10);
- Py_VISIT(traverse_module_state->__pyx_codeobj__5);
- Py_VISIT(traverse_module_state->__pyx_codeobj__7);
- Py_VISIT(traverse_module_state->__pyx_codeobj__9);
- Py_VISIT(traverse_module_state->__pyx_codeobj__11);
+ Py_VISIT(traverse_module_state->__pyx_tuple__3);
+ Py_VISIT(traverse_module_state->__pyx_tuple__5);
+ Py_VISIT(traverse_module_state->__pyx_codeobj__2);
+ Py_VISIT(traverse_module_state->__pyx_codeobj__4);
+ Py_VISIT(traverse_module_state->__pyx_codeobj__6);
return 0;
}
#endif
@@ -3038,1896 +2403,44 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
#endif
#if CYTHON_USE_MODULE_STATE
#endif
-#if CYTHON_USE_MODULE_STATE
-#endif
-#if CYTHON_USE_MODULE_STATE
-#endif
-#define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type
-#if CYTHON_USE_MODULE_STATE
-#endif
-#if CYTHON_USE_MODULE_STATE
-#endif
-#if CYTHON_USE_MODULE_STATE
-#endif
-#if CYTHON_USE_MODULE_STATE
-#endif
-#if CYTHON_USE_MODULE_STATE
-#endif
-#define __pyx_ptype_5numpy_dtype __pyx_mstate_global->__pyx_ptype_5numpy_dtype
-#define __pyx_ptype_5numpy_flatiter __pyx_mstate_global->__pyx_ptype_5numpy_flatiter
-#define __pyx_ptype_5numpy_broadcast __pyx_mstate_global->__pyx_ptype_5numpy_broadcast
-#define __pyx_ptype_5numpy_ndarray __pyx_mstate_global->__pyx_ptype_5numpy_ndarray
-#define __pyx_ptype_5numpy_generic __pyx_mstate_global->__pyx_ptype_5numpy_generic
-#define __pyx_ptype_5numpy_number __pyx_mstate_global->__pyx_ptype_5numpy_number
-#define __pyx_ptype_5numpy_integer __pyx_mstate_global->__pyx_ptype_5numpy_integer
-#define __pyx_ptype_5numpy_signedinteger __pyx_mstate_global->__pyx_ptype_5numpy_signedinteger
-#define __pyx_ptype_5numpy_unsignedinteger __pyx_mstate_global->__pyx_ptype_5numpy_unsignedinteger
-#define __pyx_ptype_5numpy_inexact __pyx_mstate_global->__pyx_ptype_5numpy_inexact
-#define __pyx_ptype_5numpy_floating __pyx_mstate_global->__pyx_ptype_5numpy_floating
-#define __pyx_ptype_5numpy_complexfloating __pyx_mstate_global->__pyx_ptype_5numpy_complexfloating
-#define __pyx_ptype_5numpy_flexible __pyx_mstate_global->__pyx_ptype_5numpy_flexible
-#define __pyx_ptype_5numpy_character __pyx_mstate_global->__pyx_ptype_5numpy_character
-#define __pyx_ptype_5numpy_ufunc __pyx_mstate_global->__pyx_ptype_5numpy_ufunc
-#if CYTHON_USE_MODULE_STATE
-#endif
-#define __pyx_n_s_DTYPE __pyx_mstate_global->__pyx_n_s_DTYPE
-#define __pyx_n_s_ImportError __pyx_mstate_global->__pyx_n_s_ImportError
-#define __pyx_n_s__12 __pyx_mstate_global->__pyx_n_s__12
-#define __pyx_n_s__3 __pyx_mstate_global->__pyx_n_s__3
-#define __pyx_kp_s_armer_cython_collision_handler_p __pyx_mstate_global->__pyx_kp_s_armer_cython_collision_handler_p
-#define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
-#define __pyx_n_s_check_links __pyx_mstate_global->__pyx_n_s_check_links
-#define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
-#define __pyx_n_s_closest_dist_query __pyx_mstate_global->__pyx_n_s_closest_dist_query
-#define __pyx_n_s_closest_point __pyx_mstate_global->__pyx_n_s_closest_point
-#define __pyx_n_s_col_check __pyx_mstate_global->__pyx_n_s_col_check
-#define __pyx_n_s_col_dict __pyx_mstate_global->__pyx_n_s_col_dict
-#define __pyx_n_s_col_link_name_len __pyx_mstate_global->__pyx_n_s_col_link_name_len
-#define __pyx_n_s_col_link_names __pyx_mstate_global->__pyx_n_s_col_link_names
-#define __pyx_n_s_collision __pyx_mstate_global->__pyx_n_s_collision
-#define __pyx_n_s_collision_handler __pyx_mstate_global->__pyx_n_s_collision_handler
-#define __pyx_n_s_copy __pyx_mstate_global->__pyx_n_s_copy
-#define __pyx_n_s_float64 __pyx_mstate_global->__pyx_n_s_float64
-#define __pyx_n_s_global_check __pyx_mstate_global->__pyx_n_s_global_check
-#define __pyx_n_s_global_dict __pyx_mstate_global->__pyx_n_s_global_dict
-#define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
-#define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing
-#define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
-#define __pyx_n_s_len_links __pyx_mstate_global->__pyx_n_s_len_links
-#define __pyx_n_s_len_robots __pyx_mstate_global->__pyx_n_s_len_robots
-#define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
-#define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
-#define __pyx_n_s_name_2 __pyx_mstate_global->__pyx_n_s_name_2
-#define __pyx_n_s_np __pyx_mstate_global->__pyx_n_s_np
-#define __pyx_n_s_numpy __pyx_mstate_global->__pyx_n_s_numpy
-#define __pyx_kp_s_numpy_core_multiarray_failed_to __pyx_mstate_global->__pyx_kp_s_numpy_core_multiarray_failed_to
-#define __pyx_kp_s_numpy_core_umath_failed_to_impor __pyx_mstate_global->__pyx_kp_s_numpy_core_umath_failed_to_impor
-#define __pyx_n_s_overlap_dict __pyx_mstate_global->__pyx_n_s_overlap_dict
-#define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range
-#define __pyx_n_s_robot_links __pyx_mstate_global->__pyx_n_s_robot_links
-#define __pyx_n_s_robot_name __pyx_mstate_global->__pyx_n_s_robot_name
-#define __pyx_n_s_robot_names __pyx_mstate_global->__pyx_n_s_robot_names
-#define __pyx_n_s_sliced_link_name __pyx_mstate_global->__pyx_n_s_sliced_link_name
-#define __pyx_n_s_sliced_links __pyx_mstate_global->__pyx_n_s_sliced_links
-#define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec
-#define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
-#define __pyx_n_s_test_2 __pyx_mstate_global->__pyx_n_s_test_2
-#define __pyx_n_s_val1 __pyx_mstate_global->__pyx_n_s_val1
-#define __pyx_n_s_val2 __pyx_mstate_global->__pyx_n_s_val2
-#define __pyx_int_0 __pyx_mstate_global->__pyx_int_0
-#define __pyx_tuple_ __pyx_mstate_global->__pyx_tuple_
-#define __pyx_tuple__2 __pyx_mstate_global->__pyx_tuple__2
-#define __pyx_tuple__4 __pyx_mstate_global->__pyx_tuple__4
-#define __pyx_tuple__6 __pyx_mstate_global->__pyx_tuple__6
-#define __pyx_tuple__8 __pyx_mstate_global->__pyx_tuple__8
-#define __pyx_tuple__10 __pyx_mstate_global->__pyx_tuple__10
-#define __pyx_codeobj__5 __pyx_mstate_global->__pyx_codeobj__5
-#define __pyx_codeobj__7 __pyx_mstate_global->__pyx_codeobj__7
-#define __pyx_codeobj__9 __pyx_mstate_global->__pyx_codeobj__9
-#define __pyx_codeobj__11 __pyx_mstate_global->__pyx_codeobj__11
-/* #### Code section: module_code ### */
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":245
- *
- * @property
- * cdef inline PyObject* base(self) nogil: # <<<<<<<<<<<<<<
- * """Returns a borrowed reference to the object owning the data/memory.
- * """
- */
-
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) {
- PyObject *__pyx_r;
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":248
- * """Returns a borrowed reference to the object owning the data/memory.
- * """
- * return PyArray_BASE(self) # <<<<<<<<<<<<<<
- *
- * @property
- */
- __pyx_r = PyArray_BASE(__pyx_v_self);
- goto __pyx_L0;
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":245
- *
- * @property
- * cdef inline PyObject* base(self) nogil: # <<<<<<<<<<<<<<
- * """Returns a borrowed reference to the object owning the data/memory.
- * """
- */
-
- /* function exit code */
- __pyx_L0:;
- return __pyx_r;
-}
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":251
- *
- * @property
- * cdef inline dtype descr(self): # <<<<<<<<<<<<<<
- * """Returns an owned reference to the dtype of the array.
- * """
- */
-
-static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self) {
- PyArray_Descr *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyArray_Descr *__pyx_t_1;
- __Pyx_RefNannySetupContext("descr", 1);
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":254
- * """Returns an owned reference to the dtype of the array.
- * """
- * return PyArray_DESCR(self) # <<<<<<<<<<<<<<
- *
- * @property
- */
- __Pyx_XDECREF((PyObject *)__pyx_r);
- __pyx_t_1 = PyArray_DESCR(__pyx_v_self);
- __Pyx_INCREF((PyObject *)((PyArray_Descr *)__pyx_t_1));
- __pyx_r = ((PyArray_Descr *)__pyx_t_1);
- goto __pyx_L0;
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":251
- *
- * @property
- * cdef inline dtype descr(self): # <<<<<<<<<<<<<<
- * """Returns an owned reference to the dtype of the array.
- * """
- */
-
- /* function exit code */
- __pyx_L0:;
- __Pyx_XGIVEREF((PyObject *)__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":257
- *
- * @property
- * cdef inline int ndim(self) nogil: # <<<<<<<<<<<<<<
- * """Returns the number of dimensions in the array.
- * """
- */
-
-static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self) {
- int __pyx_r;
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":260
- * """Returns the number of dimensions in the array.
- * """
- * return PyArray_NDIM(self) # <<<<<<<<<<<<<<
- *
- * @property
- */
- __pyx_r = PyArray_NDIM(__pyx_v_self);
- goto __pyx_L0;
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":257
- *
- * @property
- * cdef inline int ndim(self) nogil: # <<<<<<<<<<<<<<
- * """Returns the number of dimensions in the array.
- * """
- */
-
- /* function exit code */
- __pyx_L0:;
- return __pyx_r;
-}
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":263
- *
- * @property
- * cdef inline npy_intp *shape(self) nogil: # <<<<<<<<<<<<<<
- * """Returns a pointer to the dimensions/shape of the array.
- * The number of elements matches the number of dimensions of the array (ndim).
- */
-
-static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self) {
- npy_intp *__pyx_r;
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":268
- * Can return NULL for 0-dimensional arrays.
- * """
- * return PyArray_DIMS(self) # <<<<<<<<<<<<<<
- *
- * @property
- */
- __pyx_r = PyArray_DIMS(__pyx_v_self);
- goto __pyx_L0;
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":263
- *
- * @property
- * cdef inline npy_intp *shape(self) nogil: # <<<<<<<<<<<<<<
- * """Returns a pointer to the dimensions/shape of the array.
- * The number of elements matches the number of dimensions of the array (ndim).
- */
-
- /* function exit code */
- __pyx_L0:;
- return __pyx_r;
-}
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":271
- *
- * @property
- * cdef inline npy_intp *strides(self) nogil: # <<<<<<<<<<<<<<
- * """Returns a pointer to the strides of the array.
- * The number of elements matches the number of dimensions of the array (ndim).
- */
-
-static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self) {
- npy_intp *__pyx_r;
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":275
- * The number of elements matches the number of dimensions of the array (ndim).
- * """
- * return PyArray_STRIDES(self) # <<<<<<<<<<<<<<
- *
- * @property
- */
- __pyx_r = PyArray_STRIDES(__pyx_v_self);
- goto __pyx_L0;
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":271
- *
- * @property
- * cdef inline npy_intp *strides(self) nogil: # <<<<<<<<<<<<<<
- * """Returns a pointer to the strides of the array.
- * The number of elements matches the number of dimensions of the array (ndim).
- */
-
- /* function exit code */
- __pyx_L0:;
- return __pyx_r;
-}
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":278
- *
- * @property
- * cdef inline npy_intp size(self) nogil: # <<<<<<<<<<<<<<
- * """Returns the total size (in number of elements) of the array.
- * """
- */
-
-static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self) {
- npy_intp __pyx_r;
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":281
- * """Returns the total size (in number of elements) of the array.
- * """
- * return PyArray_SIZE(self) # <<<<<<<<<<<<<<
- *
- * @property
- */
- __pyx_r = PyArray_SIZE(__pyx_v_self);
- goto __pyx_L0;
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":278
- *
- * @property
- * cdef inline npy_intp size(self) nogil: # <<<<<<<<<<<<<<
- * """Returns the total size (in number of elements) of the array.
- * """
- */
-
- /* function exit code */
- __pyx_L0:;
- return __pyx_r;
-}
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":284
- *
- * @property
- * cdef inline char* data(self) nogil: # <<<<<<<<<<<<<<
- * """The pointer to the data buffer as a char*.
- * This is provided for legacy reasons to avoid direct struct field access.
- */
-
-static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self) {
- char *__pyx_r;
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":290
- * of `PyArray_DATA()` instead, which returns a 'void*'.
- * """
- * return PyArray_BYTES(self) # <<<<<<<<<<<<<<
- *
- * ctypedef unsigned char npy_bool
- */
- __pyx_r = PyArray_BYTES(__pyx_v_self);
- goto __pyx_L0;
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":284
- *
- * @property
- * cdef inline char* data(self) nogil: # <<<<<<<<<<<<<<
- * """The pointer to the data buffer as a char*.
- * This is provided for legacy reasons to avoid direct struct field access.
- */
-
- /* function exit code */
- __pyx_L0:;
- return __pyx_r;
-}
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":776
- * ctypedef npy_cdouble complex_t
- *
- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(1, a)
- *
- */
-
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 1);
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":777
- *
- * cdef inline object PyArray_MultiIterNew1(a):
- * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<<
- *
- * cdef inline object PyArray_MultiIterNew2(a, b):
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 777, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":776
- * ctypedef npy_cdouble complex_t
- *
- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(1, a)
- *
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":779
- * return PyArray_MultiIterNew(1, a)
- *
- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(2, a, b)
- *
- */
-
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 1);
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":780
- *
- * cdef inline object PyArray_MultiIterNew2(a, b):
- * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<<
- *
- * cdef inline object PyArray_MultiIterNew3(a, b, c):
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 780, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":779
- * return PyArray_MultiIterNew(1, a)
- *
- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(2, a, b)
- *
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":782
- * return PyArray_MultiIterNew(2, a, b)
- *
- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(3, a, b, c)
- *
- */
-
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 1);
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":783
- *
- * cdef inline object PyArray_MultiIterNew3(a, b, c):
- * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<<
- *
- * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 783, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":782
- * return PyArray_MultiIterNew(2, a, b)
- *
- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(3, a, b, c)
- *
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":785
- * return PyArray_MultiIterNew(3, a, b, c)
- *
- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(4, a, b, c, d)
- *
- */
-
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 1);
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":786
- *
- * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
- * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<<
- *
- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 786, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":785
- * return PyArray_MultiIterNew(3, a, b, c)
- *
- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(4, a, b, c, d)
- *
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":788
- * return PyArray_MultiIterNew(4, a, b, c, d)
- *
- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(5, a, b, c, d, e)
- *
- */
-
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 1);
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":789
- *
- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
- * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<<
- *
- * cdef inline tuple PyDataType_SHAPE(dtype d):
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 789, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":788
- * return PyArray_MultiIterNew(4, a, b, c, d)
- *
- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(5, a, b, c, d, e)
- *
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":791
- * return PyArray_MultiIterNew(5, a, b, c, d, e)
- *
- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
- * if PyDataType_HASSUBARRAY(d):
- * return d.subarray.shape
- */
-
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- __Pyx_RefNannySetupContext("PyDataType_SHAPE", 1);
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":792
- *
- * cdef inline tuple PyDataType_SHAPE(dtype d):
- * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
- * return d.subarray.shape
- * else:
- */
- __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d);
- if (__pyx_t_1) {
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":793
- * cdef inline tuple PyDataType_SHAPE(dtype d):
- * if PyDataType_HASSUBARRAY(d):
- * return d.subarray.shape # <<<<<<<<<<<<<<
- * else:
- * return ()
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
- __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
- goto __pyx_L0;
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":792
- *
- * cdef inline tuple PyDataType_SHAPE(dtype d):
- * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
- * return d.subarray.shape
- * else:
- */
- }
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":795
- * return d.subarray.shape
- * else:
- * return () # <<<<<<<<<<<<<<
- *
- *
- */
- /*else*/ {
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(__pyx_empty_tuple);
- __pyx_r = __pyx_empty_tuple;
- goto __pyx_L0;
- }
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":791
- * return PyArray_MultiIterNew(5, a, b, c, d, e)
- *
- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
- * if PyDataType_HASSUBARRAY(d):
- * return d.subarray.shape
- */
-
- /* function exit code */
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":970
- * int _import_umath() except -1
- *
- * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
- * Py_INCREF(base) # important to do this before stealing the reference below!
- * PyArray_SetBaseObject(arr, base)
- */
-
-static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":971
- *
- * cdef inline void set_array_base(ndarray arr, object base):
- * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
- * PyArray_SetBaseObject(arr, base)
- *
- */
- Py_INCREF(__pyx_v_base);
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":972
- * cdef inline void set_array_base(ndarray arr, object base):
- * Py_INCREF(base) # important to do this before stealing the reference below!
- * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
- *
- * cdef inline object get_array_base(ndarray arr):
- */
- (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":970
- * int _import_umath() except -1
- *
- * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
- * Py_INCREF(base) # important to do this before stealing the reference below!
- * PyArray_SetBaseObject(arr, base)
- */
-
- /* function exit code */
-}
-
-/* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":974
- * PyArray_SetBaseObject(arr, base)
- *
- * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
- * base = PyArray_BASE(arr)
- * if base is NULL:
- */
-
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
- PyObject *__pyx_v_base;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- __Pyx_RefNannySetupContext("get_array_base", 1);
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":975
- *
- * cdef inline object get_array_base(ndarray arr):
- * base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
- * if base is NULL:
- * return None
- */
- __pyx_v_base = PyArray_BASE(__pyx_v_arr);
-
- /* "../../../../../../usr/local/lib/python3.8/dist-packages/numpy/__init__.cython-30.pxd":976
- * cdef inline object get_array_base(ndarray arr):
- * base = PyArray_BASE(arr)
- * if base is NULL: # <<<<<<<<<<<<<<
- * return None
- * return
Raw output: collision_handler.cpp
+001: from libc.math cimport log
-
__pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_4) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
002: from libcpp.list cimport list as cpplist
003: from libcpp.string cimport string
004: cimport cython
005:
-+006: import numpy as np
- __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_numpy, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_2) < 0) __PYX_ERR(0, 6, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
007: cimport numpy as cnp
-+008: cnp.import_array()
- __pyx_t_3 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 8, __pyx_L1_error)
-
+009: DTYPE = np.float64
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_float64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_DTYPE, __pyx_t_4) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
010: ctypedef cnp.float64_t DTYPE_t
+ 006: cdef extern from "<vector>" namespace "std":
+ 007: cdef cppclass vector[T]:
+ 008: void push_back(T&) nogil
+ 009: size_t size()
+ 010: T& operator[](size_t)
011:
- 012: cdef extern from "<vector>" namespace "std":
- 013: cdef cppclass vector[T]:
- 014: void push_back(T&) nogil
- 015: size_t size()
- 016: T& operator[](size_t)
- 017:
- 018: @cython.wraparound(False)
-+019: cpdef dict closest_dist_query(str sliced_link_name,
-static PyObject *__pyx_pw_17collision_handler_1closest_dist_query(PyObject *__pyx_self,
-#if CYTHON_METH_FASTCALL
-PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
-#else
-PyObject *__pyx_args, PyObject *__pyx_kwds
-#endif
-); /*proto*/
-static PyObject *__pyx_f_17collision_handler_closest_dist_query(PyObject *__pyx_v_sliced_link_name, PyObject *__pyx_v_col_link_names, int __pyx_v_col_link_name_len, PyObject *__pyx_v_col_dict, PyObject *__pyx_v_overlap_dict, CYTHON_UNUSED int __pyx_skip_dispatch) {
- int __pyx_v_col_link_idx;
- PyArrayObject *__pyx_v_dist = 0;
- PyObject *__pyx_v_c_obj_list = 0;
- PyObject *__pyx_v_slice_obj_list = 0;
- PyObject *__pyx_v_out_dict = 0;
- PyObject *__pyx_v_link = 0;
- CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
- PyObject *__pyx_r = NULL;
-/* … */
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_6);
- __Pyx_XDECREF(__pyx_t_8);
- __Pyx_XDECREF(__pyx_t_9);
- __Pyx_XDECREF(__pyx_t_11);
- __Pyx_AddTraceback("collision_handler.closest_dist_query", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XDECREF((PyObject *)__pyx_v_dist);
- __Pyx_XDECREF(__pyx_v_c_obj_list);
- __Pyx_XDECREF(__pyx_v_slice_obj_list);
- __Pyx_XDECREF(__pyx_v_out_dict);
- __Pyx_XDECREF(__pyx_v_link);
- __Pyx_XDECREF(__pyx_v__);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_17collision_handler_1closest_dist_query(PyObject *__pyx_self,
-#if CYTHON_METH_FASTCALL
-PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
-#else
-PyObject *__pyx_args, PyObject *__pyx_kwds
-#endif
-); /*proto*/
-static PyMethodDef __pyx_mdef_17collision_handler_1closest_dist_query = {"closest_dist_query", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_17collision_handler_1closest_dist_query, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
-static PyObject *__pyx_pw_17collision_handler_1closest_dist_query(PyObject *__pyx_self,
-#if CYTHON_METH_FASTCALL
-PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
-#else
-PyObject *__pyx_args, PyObject *__pyx_kwds
-#endif
-) {
- PyObject *__pyx_v_sliced_link_name = 0;
- PyObject *__pyx_v_col_link_names = 0;
- int __pyx_v_col_link_name_len;
- PyObject *__pyx_v_col_dict = 0;
- PyObject *__pyx_v_overlap_dict = 0;
- #if !CYTHON_METH_FASTCALL
- CYTHON_UNUSED Py_ssize_t __pyx_nargs;
- #endif
- CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("closest_dist_query (wrapper)", 0);
- #if !CYTHON_METH_FASTCALL
- #if CYTHON_ASSUME_SAFE_MACROS
- __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
- #else
- __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
- #endif
- #endif
- __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
- {
- PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sliced_link_name,&__pyx_n_s_col_link_names,&__pyx_n_s_col_link_name_len,&__pyx_n_s_col_dict,&__pyx_n_s_overlap_dict,0};
- PyObject* values[5] = {0,0,0,0,0};
- if (__pyx_kwds) {
- Py_ssize_t kw_args;
- switch (__pyx_nargs) {
- case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
- CYTHON_FALLTHROUGH;
- case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
- CYTHON_FALLTHROUGH;
- case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
- CYTHON_FALLTHROUGH;
- case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
- CYTHON_FALLTHROUGH;
- case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
- CYTHON_FALLTHROUGH;
- case 0: break;
- default: goto __pyx_L5_argtuple_error;
- }
- kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
- switch (__pyx_nargs) {
- case 0:
- if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sliced_link_name)) != 0)) {
- (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
- kw_args--;
- }
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 19, __pyx_L3_error)
- else goto __pyx_L5_argtuple_error;
- CYTHON_FALLTHROUGH;
- case 1:
- if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_col_link_names)) != 0)) {
- (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
- kw_args--;
- }
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 19, __pyx_L3_error)
- else {
- __Pyx_RaiseArgtupleInvalid("closest_dist_query", 1, 5, 5, 1); __PYX_ERR(0, 19, __pyx_L3_error)
- }
- CYTHON_FALLTHROUGH;
- case 2:
- if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_col_link_name_len)) != 0)) {
- (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
- kw_args--;
- }
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 19, __pyx_L3_error)
- else {
- __Pyx_RaiseArgtupleInvalid("closest_dist_query", 1, 5, 5, 2); __PYX_ERR(0, 19, __pyx_L3_error)
- }
- CYTHON_FALLTHROUGH;
- case 3:
- if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_col_dict)) != 0)) {
- (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
- kw_args--;
- }
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 19, __pyx_L3_error)
- else {
- __Pyx_RaiseArgtupleInvalid("closest_dist_query", 1, 5, 5, 3); __PYX_ERR(0, 19, __pyx_L3_error)
- }
- CYTHON_FALLTHROUGH;
- case 4:
- if (likely((values[4] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_overlap_dict)) != 0)) {
- (void)__Pyx_Arg_NewRef_FASTCALL(values[4]);
- kw_args--;
- }
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 19, __pyx_L3_error)
- else {
- __Pyx_RaiseArgtupleInvalid("closest_dist_query", 1, 5, 5, 4); __PYX_ERR(0, 19, __pyx_L3_error)
- }
- }
- if (unlikely(kw_args > 0)) {
- const Py_ssize_t kwd_pos_args = __pyx_nargs;
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "closest_dist_query") < 0)) __PYX_ERR(0, 19, __pyx_L3_error)
- }
- } else if (unlikely(__pyx_nargs != 5)) {
- goto __pyx_L5_argtuple_error;
- } else {
- values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
- values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
- values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
- values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
- values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
- }
- __pyx_v_sliced_link_name = ((PyObject*)values[0]);
- __pyx_v_col_link_names = ((PyObject*)values[1]);
- __pyx_v_col_link_name_len = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_col_link_name_len == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 21, __pyx_L3_error)
- __pyx_v_col_dict = ((PyObject*)values[3]);
- __pyx_v_overlap_dict = ((PyObject*)values[4]);
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("closest_dist_query", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 19, __pyx_L3_error)
- __pyx_L6_skip:;
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L3_error:;
- {
- Py_ssize_t __pyx_temp;
- for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
- __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
- }
- }
- __Pyx_AddTraceback("collision_handler.closest_dist_query", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sliced_link_name), (&PyString_Type), 1, "sliced_link_name", 1))) __PYX_ERR(0, 19, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_col_link_names), (&PyList_Type), 1, "col_link_names", 1))) __PYX_ERR(0, 20, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_col_dict), (&PyDict_Type), 1, "col_dict", 1))) __PYX_ERR(0, 22, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_overlap_dict), (&PyDict_Type), 1, "overlap_dict", 1))) __PYX_ERR(0, 23, __pyx_L1_error)
- __pyx_r = __pyx_pf_17collision_handler_closest_dist_query(__pyx_self, __pyx_v_sliced_link_name, __pyx_v_col_link_names, __pyx_v_col_link_name_len, __pyx_v_col_dict, __pyx_v_overlap_dict);
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-
- /* function exit code */
- goto __pyx_L0;
- __pyx_L1_error:;
- __pyx_r = NULL;
- __pyx_L0:;
- {
- Py_ssize_t __pyx_temp;
- for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
- __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
- }
- }
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_17collision_handler_closest_dist_query(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sliced_link_name, PyObject *__pyx_v_col_link_names, int __pyx_v_col_link_name_len, PyObject *__pyx_v_col_dict, PyObject *__pyx_v_overlap_dict) {
- PyObject *__pyx_r = NULL;
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_17collision_handler_closest_dist_query(__pyx_v_sliced_link_name, __pyx_v_col_link_names, __pyx_v_col_link_name_len, __pyx_v_col_dict, __pyx_v_overlap_dict, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("collision_handler.closest_dist_query", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-/* … */
- __pyx_tuple__4 = PyTuple_Pack(5, __pyx_n_s_sliced_link_name, __pyx_n_s_col_link_names, __pyx_n_s_col_link_name_len, __pyx_n_s_col_dict, __pyx_n_s_overlap_dict); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 19, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__4);
- __Pyx_GIVEREF(__pyx_tuple__4);
-/* … */
- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_17collision_handler_1closest_dist_query, 0, __pyx_n_s_closest_dist_query, NULL, __pyx_n_s_collision_handler, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 19, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_closest_dist_query, __pyx_t_4) < 0) __PYX_ERR(0, 19, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_armer_cython_collision_handler_p, __pyx_n_s_closest_dist_query, 19, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 19, __pyx_L1_error)
-
020: list col_link_names,
- 021: int col_link_name_len,
- 022: dict col_dict,
- 023: dict overlap_dict):
- 024:
- 025: cdef int col_link_idx
- 026: cdef cnp.ndarray dist
- 027: cdef list c_obj_list
- 028: cdef list slice_obj_list
- 029: # cdef list out_list
- 030: # cdef vector[float] dist_list
- 031: # cdef vector[vector[DTYPE_t]] out_list
-+032: cdef dict out_dict = {}
- __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_out_dict = ((PyObject*)__pyx_t_1);
- __pyx_t_1 = 0;
-
033: # cdef float temp
- 034: cdef str link
- 035:
- 036: # Method definition
- 037: # push_back_main = out_list.push_back
- 038: # push_back = dist_list.push_back
-+039: for col_link_idx in range(col_link_name_len):
- __pyx_t_2 = __pyx_v_col_link_name_len;
- __pyx_t_3 = __pyx_t_2;
- for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
- __pyx_v_col_link_idx = __pyx_t_4;
-
040: # Only add to output list if within the following criteria
-+041: link = col_link_names[col_link_idx]
- if (unlikely(__pyx_v_col_link_names == Py_None)) {
- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 41, __pyx_L1_error)
- }
- __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_col_link_names, __pyx_v_col_link_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 41, __pyx_L1_error)
- __Pyx_XDECREF_SET(__pyx_v_link, ((PyObject*)__pyx_t_1));
- __pyx_t_1 = 0;
-
+042: c_obj_list = col_dict[link]
- if (unlikely(__pyx_v_col_dict == Py_None)) {
- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 42, __pyx_L1_error)
- }
- __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_col_dict, __pyx_v_link); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(0, 42, __pyx_L1_error)
- __Pyx_XDECREF_SET(__pyx_v_c_obj_list, ((PyObject*)__pyx_t_1));
- __pyx_t_1 = 0;
-
+043: slice_obj_list = col_dict[sliced_link_name]
- if (unlikely(__pyx_v_col_dict == Py_None)) {
- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 43, __pyx_L1_error)
- }
- __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_col_dict, __pyx_v_sliced_link_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(0, 43, __pyx_L1_error)
- __Pyx_XDECREF_SET(__pyx_v_slice_obj_list, ((PyObject*)__pyx_t_1));
- __pyx_t_1 = 0;
-
+044: if c_obj_list == [] or slice_obj_list == []:
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyObject_RichCompare(__pyx_v_c_obj_list, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 44, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 44, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (!__pyx_t_7) {
- } else {
- __pyx_t_5 = __pyx_t_7;
- goto __pyx_L6_bool_binop_done;
- }
- __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 44, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_slice_obj_list, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 44, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_5 = __pyx_t_7;
- __pyx_L6_bool_binop_done:;
- if (__pyx_t_5) {
-/* … */
- }
-
+045: continue
- goto __pyx_L3_continue;
-
046:
-+047: if link in overlap_dict[sliced_link_name]:
- if (unlikely(__pyx_v_overlap_dict == Py_None)) {
- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 47, __pyx_L1_error)
- }
- __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_overlap_dict, __pyx_v_sliced_link_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_link, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 47, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__pyx_t_5) {
-/* … */
- }
-
+048: continue
- goto __pyx_L3_continue;
-
049:
- 050: # if col_link_names[col_link_idx] not in overlap_dict[sliced_link_name]:
- 051: # Calculate the closest point distance between first shape available
-+052: _, _, dist = slice_obj_list[0].closest_point(c_obj_list[0])
- if (unlikely(__pyx_v_slice_obj_list == Py_None)) {
- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 52, __pyx_L1_error)
- }
- __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_slice_obj_list, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 52, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_closest_point); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 52, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (unlikely(__pyx_v_c_obj_list == Py_None)) {
- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 52, __pyx_L1_error)
- }
- __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_c_obj_list, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 52, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_9 = NULL;
- __pyx_t_10 = 0;
- #if CYTHON_UNPACK_METHODS
- if (likely(PyMethod_Check(__pyx_t_8))) {
- __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
- if (likely(__pyx_t_9)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
- __Pyx_INCREF(__pyx_t_9);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_8, function);
- __pyx_t_10 = 1;
- }
- }
- #endif
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
- __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- }
- if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
- PyObject* sequence = __pyx_t_1;
- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
- if (unlikely(size != 3)) {
- if (size > 3) __Pyx_RaiseTooManyValuesError(3);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 52, __pyx_L1_error)
- }
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0);
- __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
- __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2);
- } else {
- __pyx_t_8 = PyList_GET_ITEM(sequence, 0);
- __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
- __pyx_t_9 = PyList_GET_ITEM(sequence, 2);
- }
- __Pyx_INCREF(__pyx_t_8);
- __Pyx_INCREF(__pyx_t_6);
- __Pyx_INCREF(__pyx_t_9);
- #else
- __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 52, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 52, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_9 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 52, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- #endif
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- } else {
- Py_ssize_t index = -1;
- __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 52, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11);
- index = 0; __pyx_t_8 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_8)) goto __pyx_L9_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_8);
- index = 1; __pyx_t_6 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_6)) goto __pyx_L9_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_6);
- index = 2; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L9_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_9);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 3) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
- __pyx_t_12 = NULL;
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- goto __pyx_L10_unpacking_done;
- __pyx_L9_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __pyx_t_12 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 52, __pyx_L1_error)
- __pyx_L10_unpacking_done:;
- }
- if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 52, __pyx_L1_error)
- __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_8);
- __pyx_t_8 = 0;
- __Pyx_DECREF_SET(__pyx_v__, __pyx_t_6);
- __pyx_t_6 = 0;
- __Pyx_XDECREF_SET(__pyx_v_dist, ((PyArrayObject *)__pyx_t_9));
- __pyx_t_9 = 0;
-
053: # out_dict[col_link_names[col_link_idx]] = dist[2]
- 054: # out_list.push_back(dist[2])
-+055: out_dict[link] = dist
- if (unlikely((PyDict_SetItem(__pyx_v_out_dict, __pyx_v_link, ((PyObject *)__pyx_v_dist)) < 0))) __PYX_ERR(0, 55, __pyx_L1_error)
- __pyx_L3_continue:;
- }
-
056:
-+057: return out_dict
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(__pyx_v_out_dict);
- __pyx_r = __pyx_v_out_dict;
- goto __pyx_L0;
-
058:
- 059: # Ignore negative indice checking (i.e., a[-1])
- 060: @cython.wraparound(False)
-+061: cpdef int col_check(list sliced_links, list check_links, int len_links, dict global_dict):
-static PyObject *__pyx_pw_17collision_handler_3col_check(PyObject *__pyx_self,
+ 012: # Ignore negative indice checking (i.e., a[-1])
+ 013: @cython.wraparound(False)
++014: cpdef int col_check(list sliced_links, list check_links, int len_links, dict global_dict):
+static PyObject *__pyx_pw_17collision_handler_1col_check(PyObject *__pyx_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@@ -898,15 +434,15 @@
}
/* Python wrapper */
-static PyObject *__pyx_pw_17collision_handler_3col_check(PyObject *__pyx_self,
+static PyObject *__pyx_pw_17collision_handler_1col_check(PyObject *__pyx_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
-static PyMethodDef __pyx_mdef_17collision_handler_3col_check = {"col_check", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_17collision_handler_3col_check, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
-static PyObject *__pyx_pw_17collision_handler_3col_check(PyObject *__pyx_self,
+static PyMethodDef __pyx_mdef_17collision_handler_1col_check = {"col_check", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_17collision_handler_1col_check, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_17collision_handler_1col_check(PyObject *__pyx_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@@ -956,7 +492,7 @@
(void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
kw_args--;
}
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 61, __pyx_L3_error)
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 14, __pyx_L3_error)
else goto __pyx_L5_argtuple_error;
CYTHON_FALLTHROUGH;
case 1:
@@ -964,9 +500,9 @@
(void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
kw_args--;
}
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 61, __pyx_L3_error)
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 14, __pyx_L3_error)
else {
- __Pyx_RaiseArgtupleInvalid("col_check", 1, 4, 4, 1); __PYX_ERR(0, 61, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("col_check", 1, 4, 4, 1); __PYX_ERR(0, 14, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 2:
@@ -974,9 +510,9 @@
(void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
kw_args--;
}
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 61, __pyx_L3_error)
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 14, __pyx_L3_error)
else {
- __Pyx_RaiseArgtupleInvalid("col_check", 1, 4, 4, 2); __PYX_ERR(0, 61, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("col_check", 1, 4, 4, 2); __PYX_ERR(0, 14, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 3:
@@ -984,14 +520,14 @@
(void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
kw_args--;
}
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 61, __pyx_L3_error)
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 14, __pyx_L3_error)
else {
- __Pyx_RaiseArgtupleInvalid("col_check", 1, 4, 4, 3); __PYX_ERR(0, 61, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("col_check", 1, 4, 4, 3); __PYX_ERR(0, 14, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
const Py_ssize_t kwd_pos_args = __pyx_nargs;
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "col_check") < 0)) __PYX_ERR(0, 61, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "col_check") < 0)) __PYX_ERR(0, 14, __pyx_L3_error)
}
} else if (unlikely(__pyx_nargs != 4)) {
goto __pyx_L5_argtuple_error;
@@ -1003,12 +539,12 @@
}
__pyx_v_sliced_links = ((PyObject*)values[0]);
__pyx_v_check_links = ((PyObject*)values[1]);
- __pyx_v_len_links = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_len_links == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 61, __pyx_L3_error)
+ __pyx_v_len_links = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_len_links == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 14, __pyx_L3_error)
__pyx_v_global_dict = ((PyObject*)values[3]);
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("col_check", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 61, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("col_check", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 14, __pyx_L3_error)
__pyx_L6_skip:;
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
@@ -1022,10 +558,10 @@
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sliced_links), (&PyList_Type), 1, "sliced_links", 1))) __PYX_ERR(0, 61, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_check_links), (&PyList_Type), 1, "check_links", 1))) __PYX_ERR(0, 61, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_global_dict), (&PyDict_Type), 1, "global_dict", 1))) __PYX_ERR(0, 61, __pyx_L1_error)
- __pyx_r = __pyx_pf_17collision_handler_2col_check(__pyx_self, __pyx_v_sliced_links, __pyx_v_check_links, __pyx_v_len_links, __pyx_v_global_dict);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sliced_links), (&PyList_Type), 1, "sliced_links", 1))) __PYX_ERR(0, 14, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_check_links), (&PyList_Type), 1, "check_links", 1))) __PYX_ERR(0, 14, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_global_dict), (&PyDict_Type), 1, "global_dict", 1))) __PYX_ERR(0, 14, __pyx_L1_error)
+ __pyx_r = __pyx_pf_17collision_handler_col_check(__pyx_self, __pyx_v_sliced_links, __pyx_v_check_links, __pyx_v_len_links, __pyx_v_global_dict);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
@@ -1045,11 +581,11 @@
return __pyx_r;
}
-static PyObject *__pyx_pf_17collision_handler_2col_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sliced_links, PyObject *__pyx_v_check_links, int __pyx_v_len_links, PyObject *__pyx_v_global_dict) {
+static PyObject *__pyx_pf_17collision_handler_col_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sliced_links, PyObject *__pyx_v_check_links, int __pyx_v_len_links, PyObject *__pyx_v_global_dict) {
PyObject *__pyx_r = NULL;
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_17collision_handler_col_check(__pyx_v_sliced_links, __pyx_v_check_links, __pyx_v_len_links, __pyx_v_global_dict, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 61, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_17collision_handler_col_check(__pyx_v_sliced_links, __pyx_v_check_links, __pyx_v_len_links, __pyx_v_global_dict, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 14, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
@@ -1066,129 +602,129 @@
return __pyx_r;
}
/* … */
- __pyx_tuple__6 = PyTuple_Pack(4, __pyx_n_s_sliced_links, __pyx_n_s_check_links, __pyx_n_s_len_links, __pyx_n_s_global_dict); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 61, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__6);
- __Pyx_GIVEREF(__pyx_tuple__6);
+ __pyx_tuple_ = PyTuple_Pack(4, __pyx_n_s_sliced_links, __pyx_n_s_check_links, __pyx_n_s_len_links, __pyx_n_s_global_dict); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 14, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple_);
+ __Pyx_GIVEREF(__pyx_tuple_);
/* … */
- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_17collision_handler_3col_check, 0, __pyx_n_s_col_check, NULL, __pyx_n_s_collision_handler, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 61, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_col_check, __pyx_t_4) < 0) __PYX_ERR(0, 61, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__6, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_armer_cython_collision_handler_p, __pyx_n_s_col_check, 61, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(0, 61, __pyx_L1_error)
-
062:
- 063: cdef int s_idx
- 064: cdef int e_idx
- 065: cdef int eval_link_list_len
- 066: cdef int col_list_len
- 067: cdef int chk_list_len
- 068: cdef list t_link_names
- 069: cdef list col_list
- 070: cdef list c_check_list
- 071:
-+072: for s_idx in range(len_links):
+ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_17collision_handler_1col_check, 0, __pyx_n_s_col_check, NULL, __pyx_n_s_collision_handler, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_col_check, __pyx_t_2) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_armer_cython_collision_handler_p, __pyx_n_s_col_check, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 14, __pyx_L1_error)
+
015:
+ 016: cdef int s_idx
+ 017: cdef int e_idx
+ 018: cdef int eval_link_list_len
+ 019: cdef int col_list_len
+ 020: cdef int chk_list_len
+ 021: cdef list t_link_names
+ 022: cdef list col_list
+ 023: cdef list c_check_list
+ 024:
++025: for s_idx in range(len_links):
__pyx_t_1 = __pyx_v_len_links;
__pyx_t_2 = __pyx_t_1;
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
__pyx_v_s_idx = __pyx_t_3;
-
073: # Get the current current slice link's collision objects to check against
-+074: col_list = list(sliced_links[s_idx].collision)
+
026: # Get the current current slice link's collision objects to check against
+
+027: col_list = list(sliced_links[s_idx].collision)
if (unlikely(__pyx_v_sliced_links == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 74, __pyx_L1_error)
+ __PYX_ERR(0, 27, __pyx_L1_error)
}
- __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_sliced_links, __pyx_v_s_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_sliced_links, __pyx_v_s_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_collision); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 74, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_collision); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PySequence_ListKeepNew(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PySequence_ListKeepNew(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_XDECREF_SET(__pyx_v_col_list, ((PyObject*)__pyx_t_4));
__pyx_t_4 = 0;
-
+075: col_list_len = len(col_list)
-
__pyx_t_6 = __Pyx_PyList_GET_SIZE(__pyx_v_col_list); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 75, __pyx_L1_error)
+
+028: col_list_len = len(col_list)
+
__pyx_t_6 = __Pyx_PyList_GET_SIZE(__pyx_v_col_list); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 28, __pyx_L1_error)
__pyx_v_col_list_len = __pyx_t_6;
-
076:
-
077: # Get target links as list
-
+078: t_link_names = check_links[s_idx]
+
029:
+
030: # Get target links as list
+
+031: t_link_names = check_links[s_idx]
if (unlikely(__pyx_v_check_links == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 78, __pyx_L1_error)
+ __PYX_ERR(0, 31, __pyx_L1_error)
}
- __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_check_links, __pyx_v_s_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_check_links, __pyx_v_s_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 31, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_4))) __PYX_ERR(0, 78, __pyx_L1_error)
+ if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_4))) __PYX_ERR(0, 31, __pyx_L1_error)
__Pyx_XDECREF_SET(__pyx_v_t_link_names, ((PyObject*)__pyx_t_4));
__pyx_t_4 = 0;
-
+079: eval_link_list_len = len(t_link_names)
+
+032: eval_link_list_len = len(t_link_names)
if (unlikely(__pyx_v_t_link_names == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
- __PYX_ERR(0, 79, __pyx_L1_error)
+ __PYX_ERR(0, 32, __pyx_L1_error)
}
- __pyx_t_6 = __Pyx_PyList_GET_SIZE(__pyx_v_t_link_names); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 79, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyList_GET_SIZE(__pyx_v_t_link_names); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 32, __pyx_L1_error)
__pyx_v_eval_link_list_len = __pyx_t_6;
-
+080: for e_idx in range(eval_link_list_len):
+
+033: for e_idx in range(eval_link_list_len):
__pyx_t_7 = __pyx_v_eval_link_list_len;
__pyx_t_8 = __pyx_t_7;
for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
__pyx_v_e_idx = __pyx_t_9;
-
081: # Extract the evaluation robot link's collision object list for checking
-
+082: c_check_list = global_dict[t_link_names[e_idx]]
+
034: # Extract the evaluation robot link's collision object list for checking
+
+035: c_check_list = global_dict[t_link_names[e_idx]]
if (unlikely(__pyx_v_global_dict == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 82, __pyx_L1_error)
+ __PYX_ERR(0, 35, __pyx_L1_error)
}
if (unlikely(__pyx_v_t_link_names == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 82, __pyx_L1_error)
+ __PYX_ERR(0, 35, __pyx_L1_error)
}
- __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_t_link_names, __pyx_v_e_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_t_link_names, __pyx_v_e_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 35, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_global_dict, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 82, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_global_dict, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 35, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (!(likely(PyList_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_5))) __PYX_ERR(0, 82, __pyx_L1_error)
+ if (!(likely(PyList_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_5))) __PYX_ERR(0, 35, __pyx_L1_error)
__Pyx_XDECREF_SET(__pyx_v_c_check_list, ((PyObject*)__pyx_t_5));
__pyx_t_5 = 0;
-
+083: chk_list_len = len(c_check_list)
+
+036: chk_list_len = len(c_check_list)
if (unlikely(__pyx_v_c_check_list == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
- __PYX_ERR(0, 83, __pyx_L1_error)
+ __PYX_ERR(0, 36, __pyx_L1_error)
}
- __pyx_t_6 = __Pyx_PyList_GET_SIZE(__pyx_v_c_check_list); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 83, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyList_GET_SIZE(__pyx_v_c_check_list); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 36, __pyx_L1_error)
__pyx_v_chk_list_len = __pyx_t_6;
-
084:
-
+085: for chk_idx in range(chk_list_len):
+
037:
+
+038: for chk_idx in range(chk_list_len):
__pyx_t_10 = __pyx_v_chk_list_len;
__pyx_t_11 = __pyx_t_10;
for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
__pyx_v_chk_idx = __pyx_t_12;
-
+086: obj = c_check_list[chk_idx]
+
+039: obj = c_check_list[chk_idx]
if (unlikely(__pyx_v_c_check_list == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 86, __pyx_L1_error)
+ __PYX_ERR(0, 39, __pyx_L1_error)
}
- __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_c_check_list, __pyx_v_chk_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 86, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_c_check_list, __pyx_v_chk_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 39, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_XDECREF_SET(__pyx_v_obj, __pyx_t_5);
__pyx_t_5 = 0;
-
087:
-
+088: for col_idx in range(col_list_len):
+
040:
+
+041: for col_idx in range(col_list_len):
__pyx_t_13 = __pyx_v_col_list_len;
__pyx_t_14 = __pyx_t_13;
for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
__pyx_v_col_idx = __pyx_t_15;
-
+089: t_obj = col_list[col_idx]
-
__pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_col_list, __pyx_v_col_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 89, __pyx_L1_error)
+
+042: t_obj = col_list[col_idx]
+
__pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_col_list, __pyx_v_col_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 42, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_XDECREF_SET(__pyx_v_t_obj, __pyx_t_5);
__pyx_t_5 = 0;
-
090:
-
091: # Get the distance for comparison
-
092: # print(f"obj: {t_obj}")
-
+093: d, _, _ = t_obj.closest_point(obj)
-
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_t_obj, __pyx_n_s_closest_point); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error)
+
043:
+
044: # Get the distance for comparison
+
045: # print(f"obj: {t_obj}")
+
+046: d, _, _ = t_obj.closest_point(obj)
+
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_t_obj, __pyx_n_s_closest_point); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_16 = NULL;
__pyx_t_17 = 0;
@@ -1208,7 +744,7 @@
PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_v_obj};
__pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_17, 1+__pyx_t_17);
__Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
- if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 93, __pyx_L1_error)
+ if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 46, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
@@ -1218,7 +754,7 @@
if (unlikely(size != 3)) {
if (size > 3) __Pyx_RaiseTooManyValuesError(3);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 93, __pyx_L1_error)
+ __PYX_ERR(0, 46, __pyx_L1_error)
}
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
@@ -1234,17 +770,17 @@
__Pyx_INCREF(__pyx_t_16);
__Pyx_INCREF(__pyx_t_18);
#else
- __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error)
+ __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_16 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 93, __pyx_L1_error)
+ __pyx_t_16 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 46, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_16);
- __pyx_t_18 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 93, __pyx_L1_error)
+ __pyx_t_18 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 46, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_18);
#endif
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
} else {
Py_ssize_t index = -1;
- __pyx_t_19 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 93, __pyx_L1_error)
+ __pyx_t_19 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 46, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_19);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_20 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_19);
@@ -1254,7 +790,7 @@
__Pyx_GOTREF(__pyx_t_16);
index = 2; __pyx_t_18 = __pyx_t_20(__pyx_t_19); if (unlikely(!__pyx_t_18)) goto __pyx_L11_unpacking_failed;
__Pyx_GOTREF(__pyx_t_18);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_19), 3) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_19), 3) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
__pyx_t_20 = NULL;
__Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
goto __pyx_L12_unpacking_done;
@@ -1262,7 +798,7 @@
__Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
__pyx_t_20 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 93, __pyx_L1_error)
+ __PYX_ERR(0, 46, __pyx_L1_error)
__pyx_L12_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_4);
@@ -1271,16 +807,16 @@
__pyx_t_16 = 0;
__Pyx_DECREF_SET(__pyx_v__, __pyx_t_18);
__pyx_t_18 = 0;
-
094: # print(f"d is: {d}")
-
+095: if d is not None and d <= 0:
+
047: # print(f"d is: {d}")
+
+048: if d is not None and d <= 0:
__pyx_t_22 = (__pyx_v_d != Py_None);
if (__pyx_t_22) {
} else {
__pyx_t_21 = __pyx_t_22;
goto __pyx_L14_bool_binop_done;
}
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_d, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 95, __pyx_L1_error)
- __pyx_t_22 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_22 < 0))) __PYX_ERR(0, 95, __pyx_L1_error)
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_d, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 48, __pyx_L1_error)
+ __pyx_t_22 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_22 < 0))) __PYX_ERR(0, 48, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_21 = __pyx_t_22;
__pyx_L14_bool_binop_done:;
@@ -1291,20 +827,20 @@
}
}
}
-
096: # Returns the link idx in collision
-
+097: return s_idx
+
049: # Returns the link idx in collision
+
+050: return s_idx
__pyx_r = __pyx_v_s_idx;
goto __pyx_L0;
-
098:
-
099: # Got here without issue
-
+100: return -1
+
051:
+
052: # Got here without issue
+
+053: return -1
__pyx_r = -1;
goto __pyx_L0;
-
101:
-
102: # Ignore negative indice checking (i.e., a[-1])
-
103: @cython.wraparound(False)
-
+104: cpdef int global_check(str robot_name,
-
static PyObject *__pyx_pw_17collision_handler_5global_check(PyObject *__pyx_self,
+
054:
+
055: # Ignore negative indice checking (i.e., a[-1])
+
056: @cython.wraparound(False)
+
+057: cpdef int global_check(str robot_name,
+
static PyObject *__pyx_pw_17collision_handler_3global_check(PyObject *__pyx_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@@ -1358,15 +894,15 @@
}
/* Python wrapper */
-static PyObject *__pyx_pw_17collision_handler_5global_check(PyObject *__pyx_self,
+static PyObject *__pyx_pw_17collision_handler_3global_check(PyObject *__pyx_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
-static PyMethodDef __pyx_mdef_17collision_handler_5global_check = {"global_check", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_17collision_handler_5global_check, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
-static PyObject *__pyx_pw_17collision_handler_5global_check(PyObject *__pyx_self,
+static PyMethodDef __pyx_mdef_17collision_handler_3global_check = {"global_check", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_17collision_handler_3global_check, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_17collision_handler_3global_check(PyObject *__pyx_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@@ -1428,7 +964,7 @@
(void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
kw_args--;
}
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 104, __pyx_L3_error)
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 57, __pyx_L3_error)
else goto __pyx_L5_argtuple_error;
CYTHON_FALLTHROUGH;
case 1:
@@ -1436,9 +972,9 @@
(void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
kw_args--;
}
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 104, __pyx_L3_error)
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 57, __pyx_L3_error)
else {
- __Pyx_RaiseArgtupleInvalid("global_check", 1, 8, 8, 1); __PYX_ERR(0, 104, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("global_check", 1, 8, 8, 1); __PYX_ERR(0, 57, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 2:
@@ -1446,9 +982,9 @@
(void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
kw_args--;
}
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 104, __pyx_L3_error)
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 57, __pyx_L3_error)
else {
- __Pyx_RaiseArgtupleInvalid("global_check", 1, 8, 8, 2); __PYX_ERR(0, 104, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("global_check", 1, 8, 8, 2); __PYX_ERR(0, 57, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 3:
@@ -1456,9 +992,9 @@
(void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
kw_args--;
}
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 104, __pyx_L3_error)
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 57, __pyx_L3_error)
else {
- __Pyx_RaiseArgtupleInvalid("global_check", 1, 8, 8, 3); __PYX_ERR(0, 104, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("global_check", 1, 8, 8, 3); __PYX_ERR(0, 57, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 4:
@@ -1466,9 +1002,9 @@
(void)__Pyx_Arg_NewRef_FASTCALL(values[4]);
kw_args--;
}
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 104, __pyx_L3_error)
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 57, __pyx_L3_error)
else {
- __Pyx_RaiseArgtupleInvalid("global_check", 1, 8, 8, 4); __PYX_ERR(0, 104, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("global_check", 1, 8, 8, 4); __PYX_ERR(0, 57, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 5:
@@ -1476,9 +1012,9 @@
(void)__Pyx_Arg_NewRef_FASTCALL(values[5]);
kw_args--;
}
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 104, __pyx_L3_error)
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 57, __pyx_L3_error)
else {
- __Pyx_RaiseArgtupleInvalid("global_check", 1, 8, 8, 5); __PYX_ERR(0, 104, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("global_check", 1, 8, 8, 5); __PYX_ERR(0, 57, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 6:
@@ -1486,9 +1022,9 @@
(void)__Pyx_Arg_NewRef_FASTCALL(values[6]);
kw_args--;
}
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 104, __pyx_L3_error)
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 57, __pyx_L3_error)
else {
- __Pyx_RaiseArgtupleInvalid("global_check", 1, 8, 8, 6); __PYX_ERR(0, 104, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("global_check", 1, 8, 8, 6); __PYX_ERR(0, 57, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 7:
@@ -1496,14 +1032,14 @@
(void)__Pyx_Arg_NewRef_FASTCALL(values[7]);
kw_args--;
}
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 104, __pyx_L3_error)
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 57, __pyx_L3_error)
else {
- __Pyx_RaiseArgtupleInvalid("global_check", 1, 8, 8, 7); __PYX_ERR(0, 104, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("global_check", 1, 8, 8, 7); __PYX_ERR(0, 57, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
const Py_ssize_t kwd_pos_args = __pyx_nargs;
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "global_check") < 0)) __PYX_ERR(0, 104, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "global_check") < 0)) __PYX_ERR(0, 57, __pyx_L3_error)
}
} else if (unlikely(__pyx_nargs != 8)) {
goto __pyx_L5_argtuple_error;
@@ -1519,16 +1055,16 @@
}
__pyx_v_robot_name = ((PyObject*)values[0]);
__pyx_v_robot_names = ((PyObject*)values[1]);
- __pyx_v_len_robots = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_len_robots == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 106, __pyx_L3_error)
+ __pyx_v_len_robots = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_len_robots == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 59, __pyx_L3_error)
__pyx_v_robot_links = ((PyObject*)values[3]);
- __pyx_v_len_links = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_len_links == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L3_error)
+ __pyx_v_len_links = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_len_links == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 61, __pyx_L3_error)
__pyx_v_global_dict = ((PyObject*)values[5]);
__pyx_v_overlap_dict = ((PyObject*)values[6]);
__pyx_v_check_links = ((PyObject*)values[7]);
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("global_check", 1, 8, 8, __pyx_nargs); __PYX_ERR(0, 104, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("global_check", 1, 8, 8, __pyx_nargs); __PYX_ERR(0, 57, __pyx_L3_error)
__pyx_L6_skip:;
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
@@ -1542,13 +1078,13 @@
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_robot_name), (&PyString_Type), 1, "robot_name", 1))) __PYX_ERR(0, 104, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_robot_names), (&PyList_Type), 1, "robot_names", 1))) __PYX_ERR(0, 105, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_robot_links), (&PyList_Type), 1, "robot_links", 1))) __PYX_ERR(0, 107, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_global_dict), (&PyDict_Type), 1, "global_dict", 1))) __PYX_ERR(0, 109, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_overlap_dict), (&PyDict_Type), 1, "overlap_dict", 1))) __PYX_ERR(0, 110, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_check_links), (&PyList_Type), 1, "check_links", 1))) __PYX_ERR(0, 111, __pyx_L1_error)
- __pyx_r = __pyx_pf_17collision_handler_4global_check(__pyx_self, __pyx_v_robot_name, __pyx_v_robot_names, __pyx_v_len_robots, __pyx_v_robot_links, __pyx_v_len_links, __pyx_v_global_dict, __pyx_v_overlap_dict, __pyx_v_check_links);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_robot_name), (&PyString_Type), 1, "robot_name", 1))) __PYX_ERR(0, 57, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_robot_names), (&PyList_Type), 1, "robot_names", 1))) __PYX_ERR(0, 58, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_robot_links), (&PyList_Type), 1, "robot_links", 1))) __PYX_ERR(0, 60, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_global_dict), (&PyDict_Type), 1, "global_dict", 1))) __PYX_ERR(0, 62, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_overlap_dict), (&PyDict_Type), 1, "overlap_dict", 1))) __PYX_ERR(0, 63, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_check_links), (&PyList_Type), 1, "check_links", 1))) __PYX_ERR(0, 64, __pyx_L1_error)
+ __pyx_r = __pyx_pf_17collision_handler_2global_check(__pyx_self, __pyx_v_robot_name, __pyx_v_robot_names, __pyx_v_len_robots, __pyx_v_robot_links, __pyx_v_len_links, __pyx_v_global_dict, __pyx_v_overlap_dict, __pyx_v_check_links);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
@@ -1568,11 +1104,11 @@
return __pyx_r;
}
-static PyObject *__pyx_pf_17collision_handler_4global_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_robot_name, PyObject *__pyx_v_robot_names, int __pyx_v_len_robots, PyObject *__pyx_v_robot_links, int __pyx_v_len_links, PyObject *__pyx_v_global_dict, PyObject *__pyx_v_overlap_dict, PyObject *__pyx_v_check_links) {
+static PyObject *__pyx_pf_17collision_handler_2global_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_robot_name, PyObject *__pyx_v_robot_names, int __pyx_v_len_robots, PyObject *__pyx_v_robot_links, int __pyx_v_len_links, PyObject *__pyx_v_global_dict, PyObject *__pyx_v_overlap_dict, PyObject *__pyx_v_check_links) {
PyObject *__pyx_r = NULL;
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_17collision_handler_global_check(__pyx_v_robot_name, __pyx_v_robot_names, __pyx_v_len_robots, __pyx_v_robot_links, __pyx_v_len_links, __pyx_v_global_dict, __pyx_v_overlap_dict, __pyx_v_check_links, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 104, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_17collision_handler_global_check(__pyx_v_robot_name, __pyx_v_robot_names, __pyx_v_len_robots, __pyx_v_robot_links, __pyx_v_len_links, __pyx_v_global_dict, __pyx_v_overlap_dict, __pyx_v_check_links, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 57, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
@@ -1589,70 +1125,70 @@
return __pyx_r;
}
/* … */
- __pyx_tuple__8 = PyTuple_Pack(8, __pyx_n_s_robot_name, __pyx_n_s_robot_names, __pyx_n_s_len_robots, __pyx_n_s_robot_links, __pyx_n_s_len_links, __pyx_n_s_global_dict, __pyx_n_s_overlap_dict, __pyx_n_s_check_links); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 104, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__8);
- __Pyx_GIVEREF(__pyx_tuple__8);
+ __pyx_tuple__3 = PyTuple_Pack(8, __pyx_n_s_robot_name, __pyx_n_s_robot_names, __pyx_n_s_len_robots, __pyx_n_s_robot_links, __pyx_n_s_len_links, __pyx_n_s_global_dict, __pyx_n_s_overlap_dict, __pyx_n_s_check_links); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 57, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__3);
+ __Pyx_GIVEREF(__pyx_tuple__3);
/* … */
- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_17collision_handler_5global_check, 0, __pyx_n_s_global_check, NULL, __pyx_n_s_collision_handler, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_global_check, __pyx_t_4) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(8, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__8, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_armer_cython_collision_handler_p, __pyx_n_s_global_check, 104, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 104, __pyx_L1_error)
-
105: list robot_names,
-
106: int len_robots,
-
107: list robot_links,
-
108: int len_links,
-
109: dict global_dict,
-
110: dict overlap_dict,
-
111: list check_links):
-
112: cdef list c_ignore_list
-
113: cdef list c_check_list
-
114: cdef list col_list
-
115:
-
116: cdef str r_name
-
117: cdef str l_name
-
118: cdef str t_l_name
-
119:
-
120: cdef int r_idx
-
121: cdef int col_idx
-
122: cdef int chk_idx
-
123: cdef int l_idx
-
124:
-
125: cdef int col_list_len
-
126: cdef int chk_list_len
-
127:
-
128: # Iterate through all instantiated robots
-
129: # - there may be more than one robot, so loop through each
-
130: # - for the current robot, we want to evaluate one of the sliced links over the current dictionary of links
-
131: # - example, panda robot slice link 1 is panda_hand
-
+132: for r_idx in range(len_robots):
+ __pyx_t_2 =
__Pyx_CyFunction_New(&__pyx_mdef_17collision_handler_3global_check, 0, __pyx_n_s_global_check, NULL, __pyx_n_s_collision_handler, __pyx_d, ((PyObject *)__pyx_codeobj__4));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
+
__Pyx_GOTREF(__pyx_t_2);
+ if (
PyDict_SetItem(__pyx_d, __pyx_n_s_global_check, __pyx_t_2) < 0)
__PYX_ERR(0, 57, __pyx_L1_error)
+
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_codeobj__4 = (PyObject*)
__Pyx_PyCode_New(8, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__3, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_armer_cython_collision_handler_p, __pyx_n_s_global_check, 57, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 57, __pyx_L1_error)
+
058: list robot_names,
+
059: int len_robots,
+
060: list robot_links,
+
061: int len_links,
+
062: dict global_dict,
+
063: dict overlap_dict,
+
064: list check_links):
+
065: cdef list c_ignore_list
+
066: cdef list c_check_list
+
067: cdef list col_list
+
068:
+
069: cdef str r_name
+
070: cdef str l_name
+
071: cdef str t_l_name
+
072:
+
073: cdef int r_idx
+
074: cdef int col_idx
+
075: cdef int chk_idx
+
076: cdef int l_idx
+
077:
+
078: cdef int col_list_len
+
079: cdef int chk_list_len
+
080:
+
081: # Iterate through all instantiated robots
+
082: # - there may be more than one robot, so loop through each
+
083: # - for the current robot, we want to evaluate one of the sliced links over the current dictionary of links
+
084: # - example, panda robot slice link 1 is panda_hand
+
+085: for r_idx in range(len_robots):
__pyx_t_1 = __pyx_v_len_robots;
__pyx_t_2 = __pyx_t_1;
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
__pyx_v_r_idx = __pyx_t_3;
-
133: # Get the robot name for evaluation
-
+134: r_name = robot_names[r_idx]
+
086: # Get the robot name for evaluation
+
+087: r_name = robot_names[r_idx]
if (unlikely(__pyx_v_robot_names == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 134, __pyx_L1_error)
+ __PYX_ERR(0, 87, __pyx_L1_error)
}
- __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_robot_names, __pyx_v_r_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 134, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_robot_names, __pyx_v_r_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 87, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (!(likely(PyString_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_4))) __PYX_ERR(0, 134, __pyx_L1_error)
+ if (!(likely(PyString_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_4))) __PYX_ERR(0, 87, __pyx_L1_error)
__Pyx_XDECREF_SET(__pyx_v_r_name, ((PyObject*)__pyx_t_4));
__pyx_t_4 = 0;
-
135: # DEBUGGING
-
136: # print(f"NEW robot: {robot_names[idx]}" )
-
137:
-
138: # Loop though the global dictionary of links for robot in evaluation
-
+139: for l_name in global_dict[r_name].copy():
+
088: # DEBUGGING
+
089: # print(f"NEW robot: {robot_names[idx]}" )
+
090:
+
091: # Loop though the global dictionary of links for robot in evaluation
+
+092: for l_name in global_dict[r_name].copy():
if (unlikely(__pyx_v_global_dict == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 139, __pyx_L1_error)
+ __PYX_ERR(0, 92, __pyx_L1_error)
}
- __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_global_dict, __pyx_v_r_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 139, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_global_dict, __pyx_v_r_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 92, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_copy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_copy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 92, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
@@ -1673,7 +1209,7 @@
PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
__pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error)
+ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
@@ -1682,9 +1218,9 @@
__pyx_t_8 = 0;
__pyx_t_9 = NULL;
} else {
- __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error)
+ __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 92, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 139, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 92, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
for (;;) {
@@ -1693,28 +1229,28 @@
{
Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
#if !CYTHON_ASSUME_SAFE_MACROS
- if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 139, __pyx_L1_error)
+ if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 92, __pyx_L1_error)
#endif
if (__pyx_t_8 >= __pyx_temp) break;
}
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 139, __pyx_L1_error)
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 92, __pyx_L1_error)
#else
- __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
} else {
{
Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
#if !CYTHON_ASSUME_SAFE_MACROS
- if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 139, __pyx_L1_error)
+ if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 92, __pyx_L1_error)
#endif
if (__pyx_t_8 >= __pyx_temp) break;
}
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 139, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 92, __pyx_L1_error)
#else
- __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
}
@@ -1724,40 +1260,40 @@
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else __PYX_ERR(0, 139, __pyx_L1_error)
+ else __PYX_ERR(0, 92, __pyx_L1_error)
}
break;
}
__Pyx_GOTREF(__pyx_t_4);
}
- if (!(likely(PyString_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_4))) __PYX_ERR(0, 139, __pyx_L1_error)
+ if (!(likely(PyString_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_4))) __PYX_ERR(0, 92, __pyx_L1_error)
__Pyx_XDECREF_SET(__pyx_v_l_name, ((PyObject*)__pyx_t_4));
__pyx_t_4 = 0;
/* … */
}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
-
140: # DEBUGGING
-
141: # print(f"r_name: {r_name} | l_name: {l_name}")
-
142:
-
143: # Extract the evaluation robot link's collision object list for checking
-
+144: c_check_list = global_dict[r_name][l_name]
+
093: # DEBUGGING
+
094: # print(f"r_name: {r_name} | l_name: {l_name}")
+
095:
+
096: # Extract the evaluation robot link's collision object list for checking
+
+097: c_check_list = global_dict[r_name][l_name]
if (unlikely(__pyx_v_global_dict == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 144, __pyx_L1_error)
+ __PYX_ERR(0, 97, __pyx_L1_error)
}
- __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_global_dict, __pyx_v_r_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 144, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_global_dict, __pyx_v_r_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_v_l_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_v_l_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 97, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (!(likely(PyList_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_5))) __PYX_ERR(0, 144, __pyx_L1_error)
+ if (!(likely(PyList_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_5))) __PYX_ERR(0, 97, __pyx_L1_error)
__Pyx_XDECREF_SET(__pyx_v_c_check_list, ((PyObject*)__pyx_t_5));
__pyx_t_5 = 0;
-
145:
-
146: # Handle self checking and populate overlap links for ignoring
-
+147: if robot_name == r_name and l_name in overlap_dict:
-
__pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_robot_name, __pyx_v_r_name, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 147, __pyx_L1_error)
+
098:
+
099: # Handle self checking and populate overlap links for ignoring
+
+100: if robot_name == r_name and l_name in overlap_dict:
+
__pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_robot_name, __pyx_v_r_name, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 100, __pyx_L1_error)
if (__pyx_t_11) {
} else {
__pyx_t_10 = __pyx_t_11;
@@ -1765,144 +1301,144 @@
}
if (unlikely(__pyx_v_overlap_dict == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
- __PYX_ERR(0, 147, __pyx_L1_error)
+ __PYX_ERR(0, 100, __pyx_L1_error)
}
- __pyx_t_11 = (__Pyx_PyDict_ContainsTF(__pyx_v_l_name, __pyx_v_overlap_dict, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 147, __pyx_L1_error)
+ __pyx_t_11 = (__Pyx_PyDict_ContainsTF(__pyx_v_l_name, __pyx_v_overlap_dict, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 100, __pyx_L1_error)
__pyx_t_10 = __pyx_t_11;
__pyx_L8_bool_binop_done:;
if (__pyx_t_10) {
/* … */
goto __pyx_L7;
}
-
+148: c_ignore_list = overlap_dict[l_name]
+
+101: c_ignore_list = overlap_dict[l_name]
if (unlikely(__pyx_v_overlap_dict == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 148, __pyx_L1_error)
+ __PYX_ERR(0, 101, __pyx_L1_error)
}
- __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_overlap_dict, __pyx_v_l_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_overlap_dict, __pyx_v_l_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 101, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- if (!(likely(PyList_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_5))) __PYX_ERR(0, 148, __pyx_L1_error)
+ if (!(likely(PyList_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_5))) __PYX_ERR(0, 101, __pyx_L1_error)
__Pyx_XDECREF_SET(__pyx_v_c_ignore_list, ((PyObject*)__pyx_t_5));
__pyx_t_5 = 0;
-
149: else:
-
+150: c_ignore_list = []
+
102: else:
+
+103: c_ignore_list = []
/*else*/ {
- __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 150, __pyx_L1_error)
+ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 103, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_XDECREF_SET(__pyx_v_c_ignore_list, ((PyObject*)__pyx_t_5));
__pyx_t_5 = 0;
}
__pyx_L7:;
-
151:
-
152: # Local checking of evaluation robot's link with robot's target links
-
153: # NOTE: target links are defined as those links of particular note for checking
-
154: # speed up achived by limiting this list
-
155: # (search space from end-effector down to base_link, sliced as needed)
-
+156: for l_idx in range(len_links):
+
104:
+
105: # Local checking of evaluation robot's link with robot's target links
+
106: # NOTE: target links are defined as those links of particular note for checking
+
107: # speed up achived by limiting this list
+
108: # (search space from end-effector down to base_link, sliced as needed)
+
+109: for l_idx in range(len_links):
__pyx_t_7 = __pyx_v_len_links;
__pyx_t_12 = __pyx_t_7;
for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
__pyx_v_l_idx = __pyx_t_13;
-
+157: link = robot_links[l_idx]
+
+110: link = robot_links[l_idx]
if (unlikely(__pyx_v_robot_links == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 157, __pyx_L1_error)
+ __PYX_ERR(0, 110, __pyx_L1_error)
}
- __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_robot_links, __pyx_v_l_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_robot_links, __pyx_v_l_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 110, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_XDECREF_SET(__pyx_v_link, __pyx_t_5);
__pyx_t_5 = 0;
-
+158: t_l_name = link.name
-
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_link, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 158, __pyx_L1_error)
+
+111: t_l_name = link.name
+
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_link, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 111, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- if (!(likely(PyString_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_5))) __PYX_ERR(0, 158, __pyx_L1_error)
+ if (!(likely(PyString_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_5))) __PYX_ERR(0, 111, __pyx_L1_error)
__Pyx_XDECREF_SET(__pyx_v_t_l_name, ((PyObject*)__pyx_t_5));
__pyx_t_5 = 0;
-
159: # DEBUGGING
-
160: # print(f"checking {t_l_name}")
-
161:
-
162: # TEST (break out if not one of the defined target links)
-
+163: if l_name not in check_links[l_idx]:
+
112: # DEBUGGING
+
113: # print(f"checking {t_l_name}")
+
114:
+
115: # TEST (break out if not one of the defined target links)
+
+116: if l_name not in check_links[l_idx]:
if (unlikely(__pyx_v_check_links == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 163, __pyx_L1_error)
+ __PYX_ERR(0, 116, __pyx_L1_error)
}
- __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_check_links, __pyx_v_l_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 163, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_check_links, __pyx_v_l_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 116, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_l_name, __pyx_t_5, Py_NE)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 163, __pyx_L1_error)
+ __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_l_name, __pyx_t_5, Py_NE)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 116, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_10) {
/* … */
}
-
+164: break
+
+117: break
goto __pyx_L11_break;
-
165:
-
166: # Skip to next target link if it is to be ignored
-
+167: if t_l_name in c_ignore_list:
-
__pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_t_l_name, __pyx_v_c_ignore_list, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 167, __pyx_L1_error)
+
118:
+
119: # Skip to next target link if it is to be ignored
+
+120: if t_l_name in c_ignore_list:
+
__pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_t_l_name, __pyx_v_c_ignore_list, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 120, __pyx_L1_error)
if (__pyx_t_10) {
/* … */
}
-
+168: continue
+
+121: continue
goto __pyx_L10_continue;
-
169:
-
170: # Skip to next target link if it is the same link as current being checked
-
+171: if t_l_name == l_name:
-
__pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_t_l_name, __pyx_v_l_name, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 171, __pyx_L1_error)
+
122:
+
123: # Skip to next target link if it is the same link as current being checked
+
+124: if t_l_name == l_name:
+
__pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_t_l_name, __pyx_v_l_name, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 124, __pyx_L1_error)
if (__pyx_t_10) {
/* … */
}
-
+172: continue
+
+125: continue
goto __pyx_L10_continue;
-
173:
-
174: # Evaluate current link's collision shapes
-
+175: chk_list_len = len(c_check_list)
+
126:
+
127: # Evaluate current link's collision shapes
+
+128: chk_list_len = len(c_check_list)
if (unlikely(__pyx_v_c_check_list == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
- __PYX_ERR(0, 175, __pyx_L1_error)
+ __PYX_ERR(0, 128, __pyx_L1_error)
}
- __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_c_check_list); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 175, __pyx_L1_error)
+ __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_c_check_list); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 128, __pyx_L1_error)
__pyx_v_chk_list_len = __pyx_t_14;
-
+176: for chk_idx in range(chk_list_len):
+
+129: for chk_idx in range(chk_list_len):
__pyx_t_15 = __pyx_v_chk_list_len;
__pyx_t_16 = __pyx_t_15;
for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) {
__pyx_v_chk_idx = __pyx_t_17;
-
+177: obj = c_check_list[chk_idx]
+
+130: obj = c_check_list[chk_idx]
if (unlikely(__pyx_v_c_check_list == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 177, __pyx_L1_error)
+ __PYX_ERR(0, 130, __pyx_L1_error)
}
- __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_c_check_list, __pyx_v_chk_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 177, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_c_check_list, __pyx_v_chk_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 130, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_XDECREF_SET(__pyx_v_obj, __pyx_t_5);
__pyx_t_5 = 0;
-
+178: col_list = list(link.collision)
-
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_link, __pyx_n_s_collision); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 178, __pyx_L1_error)
+
+131: col_list = list(link.collision)
+
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_link, __pyx_n_s_collision); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = __Pyx_PySequence_ListKeepNew(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 178, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PySequence_ListKeepNew(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_XDECREF_SET(__pyx_v_col_list, ((PyObject*)__pyx_t_4));
__pyx_t_4 = 0;
-
+179: col_list_len = len(col_list)
-
__pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_col_list); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 179, __pyx_L1_error)
+
+132: col_list_len = len(col_list)
+
__pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_col_list); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 132, __pyx_L1_error)
__pyx_v_col_list_len = __pyx_t_14;
-
+180: for col_idx in range(col_list_len):
+
+133: for col_idx in range(col_list_len):
__pyx_t_18 = __pyx_v_col_list_len;
__pyx_t_19 = __pyx_t_18;
for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) {
__pyx_v_col_idx = __pyx_t_20;
-
+181: t_obj = col_list[col_idx]
-
__pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_col_list, __pyx_v_col_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 181, __pyx_L1_error)
+
+134: t_obj = col_list[col_idx]
+
__pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_col_list, __pyx_v_col_idx, int, 1, __Pyx_PyInt_From_int, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 134, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_XDECREF_SET(__pyx_v_t_obj, __pyx_t_4);
__pyx_t_4 = 0;
-
182:
-
183: # Get the distance for comparison
-
184: # print(f"obj: {t_obj}")
-
+185: d, _, _ = t_obj.closest_point(obj)
-
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_t_obj, __pyx_n_s_closest_point); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 185, __pyx_L1_error)
+
135:
+
136: # Get the distance for comparison
+
137: # print(f"obj: {t_obj}")
+
+138: d, _, _ = t_obj.closest_point(obj)
+
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_t_obj, __pyx_n_s_closest_point); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 138, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_21 = NULL;
__pyx_t_22 = 0;
@@ -1922,7 +1458,7 @@
PyObject *__pyx_callargs[2] = {__pyx_t_21, __pyx_v_obj};
__pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_22, 1+__pyx_t_22);
__Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error)
+ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
@@ -1932,7 +1468,7 @@
if (unlikely(size != 3)) {
if (size > 3) __Pyx_RaiseTooManyValuesError(3);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 185, __pyx_L1_error)
+ __PYX_ERR(0, 138, __pyx_L1_error)
}
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
@@ -1948,17 +1484,17 @@
__Pyx_INCREF(__pyx_t_21);
__Pyx_INCREF(__pyx_t_23);
#else
- __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 185, __pyx_L1_error)
+ __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 138, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_21 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 185, __pyx_L1_error)
+ __pyx_t_21 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 138, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_21);
- __pyx_t_23 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 185, __pyx_L1_error)
+ __pyx_t_23 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 138, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_23);
#endif
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
Py_ssize_t index = -1;
- __pyx_t_24 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 185, __pyx_L1_error)
+ __pyx_t_24 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 138, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_24);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_25 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_24);
@@ -1968,7 +1504,7 @@
__Pyx_GOTREF(__pyx_t_21);
index = 2; __pyx_t_23 = __pyx_t_25(__pyx_t_24); if (unlikely(!__pyx_t_23)) goto __pyx_L19_unpacking_failed;
__Pyx_GOTREF(__pyx_t_23);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_25(__pyx_t_24), 3) < 0) __PYX_ERR(0, 185, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_25(__pyx_t_24), 3) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
__pyx_t_25 = NULL;
__Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
goto __pyx_L20_unpacking_done;
@@ -1976,7 +1512,7 @@
__Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
__pyx_t_25 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 185, __pyx_L1_error)
+ __PYX_ERR(0, 138, __pyx_L1_error)
__pyx_L20_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_5);
@@ -1985,16 +1521,16 @@
__pyx_t_21 = 0;
__Pyx_DECREF_SET(__pyx_v__, __pyx_t_23);
__pyx_t_23 = 0;
-
186: # print(f"d is: {d}")
-
+187: if d is not None and d <= 0:
+
139: # print(f"d is: {d}")
+
+140: if d is not None and d <= 0:
__pyx_t_11 = (__pyx_v_d != Py_None);
if (__pyx_t_11) {
} else {
__pyx_t_10 = __pyx_t_11;
goto __pyx_L22_bool_binop_done;
}
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_d, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L1_error)
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 187, __pyx_L1_error)
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_d, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 140, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_10 = __pyx_t_11;
__pyx_L22_bool_binop_done:;
@@ -2006,19 +1542,19 @@
__pyx_L10_continue:;
}
__pyx_L11_break:;
-
188: # Returns the link idx in collision
-
+189: return l_idx
+
141: # Returns the link idx in collision
+
+142: return l_idx
__pyx_r = __pyx_v_l_idx;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
goto __pyx_L0;
-
190:
-
191: # Got here without issue
-
+192: return -1
+
143:
+
144: # Got here without issue
+
+145: return -1
__pyx_r = -1;
goto __pyx_L0;
-
193:
-
+194: cpdef int test (int val1, int val2):
-
static PyObject *__pyx_pw_17collision_handler_7test(PyObject *__pyx_self,
+
146:
+
+147: cpdef int test (int val1, int val2):
+
static PyObject *__pyx_pw_17collision_handler_5test(PyObject *__pyx_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@@ -2034,15 +1570,15 @@
}
/* Python wrapper */
-static PyObject *__pyx_pw_17collision_handler_7test(PyObject *__pyx_self,
+static PyObject *__pyx_pw_17collision_handler_5test(PyObject *__pyx_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
-static PyMethodDef __pyx_mdef_17collision_handler_7test = {"test", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_17collision_handler_7test, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
-static PyObject *__pyx_pw_17collision_handler_7test(PyObject *__pyx_self,
+static PyMethodDef __pyx_mdef_17collision_handler_5test = {"test", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_17collision_handler_5test, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_17collision_handler_5test(PyObject *__pyx_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@@ -2086,7 +1622,7 @@
(void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
kw_args--;
}
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 194, __pyx_L3_error)
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L3_error)
else goto __pyx_L5_argtuple_error;
CYTHON_FALLTHROUGH;
case 1:
@@ -2094,14 +1630,14 @@
(void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
kw_args--;
}
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 194, __pyx_L3_error)
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L3_error)
else {
- __Pyx_RaiseArgtupleInvalid("test", 1, 2, 2, 1); __PYX_ERR(0, 194, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("test", 1, 2, 2, 1); __PYX_ERR(0, 147, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
const Py_ssize_t kwd_pos_args = __pyx_nargs;
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "test") < 0)) __PYX_ERR(0, 194, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "test") < 0)) __PYX_ERR(0, 147, __pyx_L3_error)
}
} else if (unlikely(__pyx_nargs != 2)) {
goto __pyx_L5_argtuple_error;
@@ -2109,12 +1645,12 @@
values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
}
- __pyx_v_val1 = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_val1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 194, __pyx_L3_error)
- __pyx_v_val2 = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_val2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 194, __pyx_L3_error)
+ __pyx_v_val1 = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_val1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L3_error)
+ __pyx_v_val2 = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_val2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L3_error)
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("test", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 194, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("test", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 147, __pyx_L3_error)
__pyx_L6_skip:;
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
@@ -2128,7 +1664,7 @@
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_17collision_handler_6test(__pyx_self, __pyx_v_val1, __pyx_v_val2);
+ __pyx_r = __pyx_pf_17collision_handler_4test(__pyx_self, __pyx_v_val1, __pyx_v_val2);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
@@ -2144,11 +1680,11 @@
return __pyx_r;
}
-static PyObject *__pyx_pf_17collision_handler_6test(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_val1, int __pyx_v_val2) {
+static PyObject *__pyx_pf_17collision_handler_4test(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_val1, int __pyx_v_val2) {
PyObject *__pyx_r = NULL;
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_17collision_handler_test(__pyx_v_val1, __pyx_v_val2, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 194, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_17collision_handler_test(__pyx_v_val1, __pyx_v_val2, 0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
@@ -2165,15 +1701,15 @@
return __pyx_r;
}
/* … */
- __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_val1, __pyx_n_s_val2); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 194, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__10);
- __Pyx_GIVEREF(__pyx_tuple__10);
+ __pyx_tuple__5 = PyTuple_Pack(2, __pyx_n_s_val1, __pyx_n_s_val2); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 147, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__5);
+ __Pyx_GIVEREF(__pyx_tuple__5);
/* … */
- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_17collision_handler_7test, 0, __pyx_n_s_test, NULL, __pyx_n_s_collision_handler, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 194, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_4) < 0) __PYX_ERR(0, 194, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
+195: return val1 + val2
+ __pyx_t_2 =
__Pyx_CyFunction_New(&__pyx_mdef_17collision_handler_5test, 0, __pyx_n_s_test, NULL, __pyx_n_s_collision_handler, __pyx_d, ((PyObject *)__pyx_codeobj__6));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
+
__Pyx_GOTREF(__pyx_t_2);
+ if (
PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0)
__PYX_ERR(0, 147, __pyx_L1_error)
+
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+148: return val1 + val2
__pyx_r = (__pyx_v_val1 + __pyx_v_val2);
goto __pyx_L0;