Giter Club home page Giter Club logo

Comments (5)

sentry5588 avatar sentry5588 commented on May 26, 2024

In an effort of helping resolving this issue. I noticed that there is Test for DiscreteArray and DiscreteTrajectory. But there is no Test for DiscreteTrajectoryBase.
Is this the reason that this bug was not discovered before? Should DiscreteTrajectoryBaseTest.cpp be created?

from control-toolbox.

markusgft avatar markusgft commented on May 26, 2024

from control-toolbox.

sentry5588 avatar sentry5588 commented on May 26, 2024

Thank you @markusgft . I was creating the unit test for DiscreteTrajectoryBase, and realized that ct_core/test/DiscreteTrajectoryTest.cpp is actually testing DiscreteTrajectoryBase. Because

    // trajectory containers with zoh and linear interpolation
    StateTrajectory<2> stateTrajectory_zoh(timeArray, stateArray, InterpolationType::ZOH);
    StateTrajectory<2> stateTrajectory_lin(timeArray, stateArray, InterpolationType::LIN);

The StateTrajectory is a derived class from DiscreteTrajectoryBase.
My question, should DiscreteTrajectoryTest.cpp be renamed as DiscreteTrajectoryBaseTest.cpp?
Thank you.

from control-toolbox.

sentry5588 avatar sentry5588 commented on May 26, 2024

I'm about to create a test case to produce a situation of this bug, and I realized that tpl::TimeArray<SCALAR> has a length of a minimum of 2. It doesn't seem possible that time could be empty. But I believe from the unit test point of view, the unit shall cover that. Could you please clarify? Thanks.

from control-toolbox.

markusgft avatar markusgft commented on May 26, 2024

Thanks for raising the issue. I believe that someone needs to take a more detailed look and check what is really going on. I currently have no time to reproduce the failures, unfortunately.

from control-toolbox.

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.