Giter Club home page Giter Club logo

ct_ros's People

Contributors

markusgft avatar markusta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ct_ros's Issues

CollisionCostTermCGG.hpp for online trajectory generation

Hi, now I am trying to use the code in /ct_ros_nodes/examples/HyA/HyANLOC_ObastacleAcc.cpp for online trajectory generation. So I need to change the target position for end effector as well as obstacle position online! Could you tell me how can I make it?
Now, I just tried:

       std::vector<NLOptConSolver::OptConProblem_t::CostFunctionPtr_t> costs = nloc.getCostFunctionInstances();
        for (int i = 0; i < nloc.getCostFunctionInstances().size(); i++)
        {
            costs[i]->getIntermediateTermById(intTermID)->updateReferenceState(x_d);
            costs[i]->getFinalTermById(term_quad_final_id)->updateReferenceState(x_d);
        }

but, then the nloc.solve() did not get the desired trajectory!

migration from setInputBoxConstraints and setStateBoxConstraints to setBoxConstraints

Hi,
Some executable example don't build with control-toolbox v3.0.2(HyANLOC_ObstacleAcc.cpp, HyANLOC_TaskSpaceVel.cpp, HyANLOC_TaskSpace.cpp, HyADMS.cpp and HyANLOC_TaskSpaceAcc.cpp),
They use setInputBoxConstraints() and setStateBoxConstraints() to set 'ContinuousOptConProblem' which do not exist. I used the following solution to make it build, is it correct ?

//HyQSimulator.cpp line 138
    std::shared_ptr<ct::optcon::ConstraintContainerAnalytical<state_dim, control_dim>> boxConstraints(
        new ct::optcon::ConstraintContainerAnalytical<state_dim, control_dim>());

    // input constraint bounds
    ct::core::ControlVector<control_dim> u_lb = -100 * ct::core::ControlVector<control_dim>::Ones();
    ct::core::ControlVector<control_dim> u_ub = 100 * ct::core::ControlVector<control_dim>::Ones();
    // input constraint terms
    std::shared_ptr<ct::optcon::ControlInputConstraint<state_dim, control_dim>> controlConstraint(
        new ct::optcon::ControlInputConstraint<state_dim, control_dim>(u_lb, u_ub));
    controlConstraint->setName("ControlInputConstraint");
    
    // state constraint bounds
    ct::core::StateVector<state_dim> x_lb, x_ub;
    x_lb.head<njoints>() = -3.14 * Eigen::Matrix<double, njoints, 1>::Ones(); // lower bound on position
    x_ub.head<njoints>() =  3.14 * Eigen::Matrix<double, njoints, 1>::Ones(); // upper bound on position
    x_lb.tail<njoints>() = -100 * Eigen::Matrix<double, njoints, 1>::Ones(); // lower bound on velocity
    x_ub.tail<njoints>() =  100 * Eigen::Matrix<double, njoints, 1>::Ones(); // upper bound on velocity
    // state constraint terms
    std::shared_ptr<ct::optcon::StateConstraint<state_dim, control_dim>> stateConstraint(
        new ct::optcon::StateConstraint<state_dim, control_dim>(x_lb, x_ub));
    stateConstraint->setName("StateConstraint");
    // add and initialize constraint terms    
    boxConstraints->addIntermediateConstraint(controlConstraint, true);
    boxConstraints->addIntermediateConstraint(stateConstraint, true);
    boxConstraints->addTerminalConstraint(stateConstraint,true);
    boxConstraints->initialize();

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.