Giter Club home page Giter Club logo

Comments (5)

awinkler avatar awinkler commented on June 4, 2024

Yeah, that makes sense, let me look into how to make that more convenient 👍

from towr.

disRecord avatar disRecord commented on June 4, 2024

I provided possible changes in pull request above. (I hope it is not double work).
I tested it with towr_app, it seems nothing is broken.

But I bumped it following issue. When library is compiled in DEBUG mode, optimize gait is set for Hyq robot after a few iterations application fails:

   1  0.0000000e+00 2.88e+03 2.66e+01   0.1 9.69e+01    -  1.10e-01 9.82e-03f  1
towr_ros_app: /home/oleg/rosws/towrws/src/towr/towr/src/phase_durations.cc:86: virtual void towr::PhaseDurations::SetVariables(const VectorXd&): Assertion `durations_.back()>0' failed.

It is not related with my code because it happens even if undo my commits.

from towr.

awinkler avatar awinkler commented on June 4, 2024

Thanks! Yeah, the issue is known and I added an explanation for this assert for developers digging into the code, see:

// the sum of all phase durations should never be larger than the total time of

from towr.

disRecord avatar disRecord commented on June 4, 2024

I also thought about storing gait parameters in some kind of map.

In current implementation if new constraint type is added corresponding type and parameters should be added to Parameters. It's an additional and maybe unnecessary dependency.

Also if you decide to load parameters from ROS Parameter Server or from XML/YAML you have to write something like this

if (ros::param::getCached("~duration_base_polynomial", dvalue)) {
	params.duration_base_polynomial_ = dvalue;
}
if (ros::param::getCached("~dt_constraint_base_motion", dvalue)) {
	params.dt_constraint_base_motion_ = dvalue;
}

and so on for each parameter.

Whereas map version can be loaded much simple:

XmlRpcValue xmlparams;
ros::param::get("~towr_parameters", xmlparams);
for(auto param_it = xmlparams.begin(); param_it != xmlparams.end(); param_it++) {
    params.setParameter(param_it->first, static_cast<double>(param_it->second));
}

Still I do not think that such changes should be introduced immediately. But they can be considered as a way to improve towr API.

from towr.

awinkler avatar awinkler commented on June 4, 2024

Yes, that could be helpful, I agree. That could possibly replace/enhance the current terminal UI. II'll think about this in future releases, like you mentioned, mostly trying to keep dependencies low at this point.

from towr.

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.