Giter Site home page Giter Site logo

Comments (7)

SteveMacenski avatar SteveMacenski commented on June 7, 2024

Have you tried using the nav2_velocity_smoother? It is designed to take potentially infeasible commands from nav2_controller and output feasible commands given a set of acceleration or velocity constraints. Think of it as a post-processing stage in case something is misconfigured or the technique you use in the controller doesn't strictly promise feasible continuity.

That should square you away :-) Its also enabled by default since Iron and newer

If that's not workable, I'm sure we could expose the controller plugin another option for what to do on cancellation for reducing speed. But, I'll admit that seems overkill unless there's more you want to do than just decelerate by dynamic limits.

from navigation2.

Timple avatar Timple commented on June 7, 2024

The idea is to decelerate by dynamic limits whilst tracking the path.

When following a turn, it would be undesired to slow down in a straight line upon a cancel action, which I think/guess is what the nav2_velocity_smoother does?

from navigation2.

SteveMacenski avatar SteveMacenski commented on June 7, 2024

I also don't think that's actually a generically safe solution? Deceleration in turns could cause the kinds of "throwing loads off my robot top" that the instantaneous braking could due to centrifugal forces. I imagine as well there are techniques where reducing the velocity scale will actually make it deviate off the path due to its internal modeling (thinking MPC/MPPI which are maintaining some state)

This isn't my opposition to your request - just throwing out some additional constraints perhaps that weren't considered giving me pause

from navigation2.

SteveMacenski avatar SteveMacenski commented on June 7, 2024

When following a turn, it would be undesired to slow down in a straight line upon a cancel action, which I think/guess is what the nav2_velocity_smoother does?

The Vel Smoother will ramp down from the last request to the zero velocity. It won't necessarily be a straight line. If there's some non-zero angular component, that will be ramped down too by its own deceleration constraints. The eta scaling mechanics I wrote will also make sure the velocities are proportionally scaled to the last command's vector when that command has infeasible request (e.g. stopping from full speed), so it won't deviate from the last command's outlined path it would have taken if that last command continued forward.

The eta scaling was written so that invalid acceleration profile jumps wouldn't create different than intended motion vectors (which previous ROS 1 velocity smoothers did). I don't think its the role of the velocity smoother to make the robot change direction, even if ever so slightly - its role is to scale the intent down to what's possible. It wasn't written with the intention of this stoppage case in mind, but I think that is also beneficial here.

So if moving straight, it'll be a straight line. If turning, it'll continue with the turning maneuver's velocity from the last command sent. It is obviously not predictive for different path-tracking behavior beyond that last non-zero command, but perhaps that's sufficient? I'd say so for many applications, but I don't know what your stopping distances are with your set deceleration constraints. If you're stopping distance is 5m in dense shelving, then yeah, probably not πŸ˜†

from navigation2.

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.