Skip to content

generation fail or stack smashing error with a particular set of values for a simple trajectory #255

Description

@oroulet
from ruckig import InputParameter, Ruckig, Trajectory

if __name__ == "__main__":
    inp = InputParameter(1)
    inp.current_position = [1.1032599505208334]
    inp.current_velocity = [0.36337812500000005]
    inp.current_acceleration = [0.8525]
    inp.target_position = [2.9033375720687795]
    inp.target_velocity = [0.3477303818980908]
    inp.target_acceleration = [-0.833942902]
    inp.max_velocity = [1.0]
    inp.max_acceleration = [1.0]
    inp.max_jerk = [1.0]

    otg = Ruckig(1)
    trajectory = Trajectory(1)
    result = otg.calculate(inp, trajectory)

uv run ruckig_fail.py
Traceback (most recent call last):
  File "/home/olivier/kurant/dev/motion/ruckig_fail.py", line 17, in <module>
    result = otg.calculate(inp, trajectory)
ruckig.RuckigError:
[ruckig] error in step 1, dof: 0 input:
inp.current_position = [1.103259950520833]
inp.current_velocity = [0.3633781250000001]
inp.current_acceleration = [0.8525]
inp.target_position = [2.90333757206878]
inp.target_velocity = [0.3477303818980908]
inp.target_acceleration = [-0.833942902]
inp.max_velocity = [1]
inp.max_acceleration = [1]
inp.max_jerk = [1]

changing any digit seems to make calculation work.

That version with one digit change for current position creates a "stack smashing" error

from ruckig import InputParameter, Ruckig, Trajectory

if __name__ == "__main__":
    inp = InputParameter(1)
    inp.current_position = [1.103259950520833]
    inp.current_velocity = [0.36337812500000005]
    inp.current_acceleration = [0.8525]
    inp.target_position = [2.9033375720687795]
    inp.target_velocity = [0.3477303818980908]
    inp.target_acceleration = [-0.833942902]
    inp.max_velocity = [1.0]
    inp.max_acceleration = [1.0]
    inp.max_jerk = [1.0]

    otg = Ruckig(1)
    trajectory = Trajectory(1)
    result = otg.calculate(inp, trajectory)


uv run ruckig_fail.py
*** stack smashing detected ***: terminated

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-communitySomething isn't working in the community version

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions