Skip to content

Wrong type in cy_seidel_solverwrapper.pyx #261

@mskripnik

Description

@mskripnik

Installation of toppra 0.6.2 on a fresh system with Python 3.13.

(toppra-env) PS C:\git\toppra\examples> python .\plot_kinematics.py
 INFO [algorithm.py : 104] No gridpoint specified. Automatically choose a gridpoint with 290 points
 INFO [reachability_algorithm.py : 65] Solver wrapper not supplied. Choose solver wrapper automatically!
 INFO [reachability_algorithm.py : 75] Select solver seidel
Traceback (most recent call last):
  File "C:\git\toppra\examples\plot_kinematics.py", line 47, in <module>
    instance = algo.TOPPRA([pc_vel, pc_acc], path, parametrizer="ParametrizeConstAccel")
  File "C:\git\toppra\toppra\algorithm\reachabilitybased\reachability_algorithm.py", line 123, in __init__
    self.solver_wrapper = seidelWrapper(
                          ~~~~~~~~~~~~~^
        self.constraints, self.path, self.gridpoints, solve_lp1d=True
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "toppra/solverwrapper/cy_seidel_solverwrapper.pyx", line 525, in toppra.solverwrapper.cy_seidel_solverwrapper.seidelWrapper.__init__
ValueError: Buffer dtype mismatch, expected 'INT_t' but got 'long'

This can be fixed by changing the type in cy_seidel_solverwrapper.pyx as follows:

ctypedef np.int32_t INT_t

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions