GithubHelp home page GithubHelp logo

Comments (3)

mpowelson avatar mpowelson commented on August 10, 2024

The PlannerResponse has a joint_trajectory that should be filled with the solution. The trajectory is an Eigen matrix timesteps x num_dof.

However, if you are saying that that matrix only has 2 rows then that is another issue. You could make sure that you set simply=false in the OMPLFreespacePlannerConfig. However we have experienced very short trajectories even for quite long paths. It is something we have meant to look into. I believe that theoretically you should be able to joint interpolate between them and it should still satisfy the validators. But again, the OMPL planner is pretty new and there are still some kinks to work out.

Here's some code that we have added after OMPL recently before passing the ompl results (ompl_seed) to trajopt.

  int min_samples = 30;
  if (ompl_seed.rows() < min_samples)
  {
    int spacing = static_cast<int>(ceil(static_cast<double>(min_samples)) / static_cast<double>(ompl_seed.rows()));
    ROS_INFO("Interpolating with spacing %d", spacing);
    trajopt::TrajArray interpolated_seed(spacing * (ompl_seed.rows() - 1), ompl_seed.cols());
    for (int row = 0; row < ompl_seed.rows() - 1; row++)
    {
      for (int idof = 0; idof < ompl_seed.cols(); ++idof)
        interpolated_seed.block(spacing * row, idof, spacing, 1) =
            Eigen::VectorXd::LinSpaced(spacing, ompl_seed.row(row)(idof), ompl_seed.row(row + 1)(idof));
    }

from tesseract.

marip8 avatar marip8 commented on August 10, 2024

@nicolacastaman @mpowelson #160 adds a variable to the OMPL configuration structure that allows you to specify the number of output states you want in your trajectory

from tesseract.

marip8 avatar marip8 commented on August 10, 2024

Closing this issue because it seems to be addressed in #160. Feel free to re-open if any further discussion is required

from tesseract.

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.