ll7 / robot_sf_ll7

robot_sf in the ll7 namespace.
GNU General Public License v3.0
0 stars 1 forks source link

I probably have to upgrade numba. #3

Closed ll7 closed 4 months ago

ll7 commented 4 months ago

https://github.com/numba/numba/issues/834

tests/test_range_sensor.py ........F..                   [100%]

=========================== FAILURES ===========================
_____________________ test_no_pedestrians ______________________

    def test_no_pedestrians():
        out_ranges = np.array([10.0, 10.0])
        scanner_pos = (0.0, 0.0)
        max_scan_range = 10.0
        ped_positions = np.array([])
        ped_radius = 1.0
        ray_angles = np.array([0.0, np.pi / 2])

>       raycast_pedestrians(
            out_ranges,
            scanner_pos,
            max_scan_range,
            ped_positions,
            ped_radius,
            ray_angles
            )

tests/test_range_sensor.py:65: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.8/site-packages/numba/core/dispatcher.py:468: in _compile_for_args
    error_rewrite(e, 'typing')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

e = TypingError('Failed in nopython mode pipeline (step: nopython frontend)\nNo implementation of function Function(<funct...d>\n    # Find pedestrians within scanner\'s range\n    ped_dist_mask = np.where(dist_sq <= threshold_sq)[0]\n    ^\n')
issue_type = 'typing'

    def error_rewrite(e, issue_type):
        """
        Rewrite and raise Exception `e` with help supplied based on the
        specified issue_type.
        """
        if config.SHOW_HELP:
            help_msg = errors.error_extras[issue_type]
            e.patch_message('\n'.join((str(e).rstrip(), help_msg)))
        if config.FULL_TRACEBACKS:
            raise e
        else:
>           raise e.with_traceback(None)
E           numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
E           No implementation of function Function(<function where at 0x7f56141010d0>) found for signature:
E            
E            >>> where(bool)
E            
E           There are 4 candidate implementations:
E             - Of which 4 did not match due to:
E             Overload in function '_OverloadWrapper._build.<locals>.ol_generated': File: numba/core/overload_glue.py: Line 129.
E               With argument(s): '(bool)':
E              Rejected as the implementation raised a specific error:
E                AttributeError: 'Boolean' object has no attribute 'ndim'
E             raised from /home/luttkule/git/robot-sf/.venv/lib/python3.8/site-packages/numba/core/typing/npydecl.py:1086
E           
E           During: resolving callee type: Function(<function where at 0x7f56141010d0>)
E           During: typing of call at /home/luttkule/git/robot-sf/robot_sf/sensor/range_sensor.py (241)
E           
E           
E           File "robot_sf/sensor/range_sensor.py", line 241:
E           def raycast_pedestrians(
E               <source elided>
E               # Find pedestrians within scanner's range
E               ped_dist_mask = np.where(dist_sq <= threshold_sq)[0]
E               ^

.venv/lib/python3.8/site-packages/numba/core/dispatcher.py:409: TypingError
=================== short test summary info ====================
FAILED tests/test_range_sensor.py::test_no_pedestrians - numb...
================= 1 failed, 10 passed in 2.68s =================
ll7 commented 4 months ago
# Raycasting pedestrians tests
def test_no_pedestrians():
    out_ranges = np.array([10.0, 10.0])
    scanner_pos = (0.0, 0.0)
    max_scan_range = 10.0
    ped_positions = np.array([])
    ped_radius = 1.0
    ray_angles = np.array([0.0, np.pi / 2])

    raycast_pedestrians(
        out_ranges,
        scanner_pos,
        max_scan_range,
        ped_positions,
        ped_radius,
        ray_angles
        )
ll7 commented 4 months ago

Error did not persist