Giter Site home page Giter Site logo

Comments (7)

gavanderhoorn avatar gavanderhoorn commented on August 12, 2024 1

@pantor: what about initialising all fields to something like a quiet NaN, and then checking they have been properly initialised by the user when they are about to be used?

Using a sentinel value could help distinguish between uninitialised and "some random large value".

from ruckig.

pantor avatar pantor commented on August 12, 2024

Hi @pbeeson!

When creating the InputParameter instance, not all its members are initialized. In particular, current_position, target_position, and the max_<...> limits need be set explicitly. I mean otherwise the whole position-controlled trajectory generation wouldn't make sense, but I'm also open to initialize them all to zero. Those uninitialized values might explain the non-deterministic output. Can you check that this is not the case here? Otherwise, Ruckig should definitely be deterministic.

from ruckig.

pantor avatar pantor commented on August 12, 2024

That seems to be a good idea, thanks for your input @gavanderhoorn!

from ruckig.

pbeeson avatar pbeeson commented on August 12, 2024

from ruckig.

pantor avatar pantor commented on August 12, 2024

I just played around with the code and your hints, but couldn't reproduce something along the lines of your issue. It would be great if you could share a complete example!

Moreover, what output exactly is non-deterministic? Only the OutputParameter or also the trajectory, e.g. its duration?

from ruckig.

pantor avatar pantor commented on August 12, 2024

Oh, and just to make sure that it's not as simple as that: If you would apply your code snippet to the example.cpp, this would change the trajectory between the first and second execution because the input parameter is updated while stepping through the trajectory. This is done in those lines:

input.current_position = output.new_position;
input.current_velocity = output.new_velocity;
input.current_acceleration = output.new_acceleration;

from ruckig.

pbeeson avatar pbeeson commented on August 12, 2024

I tracked this down to an indexing bug in my own code that was generating the data. Weirdly it got past all CI tests, but the tiny randomness in a bad memory lookup was magnified by the Ruckig process. Thanks.

from ruckig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.