Skip to content

PathController step/loiter doesn't run when DesiredPath is updated #142

@krisgry

Description

@krisgry

Looking into PathController again: I realized that if you receive DesiredPath at the same frequency as m_cperiod, step/loiter will not be called at all.

In consume(desiredPath), m_ts.now = now

m_ts.start_time = now;
m_ts.end_time = -1;
m_ts.now = m_ts.start_time;

while consume(EstimatedState) returns before calling step/loiter if the time between "last run" and now is less than m_cperiod:
if (now < m_ts.now + m_cperiod)
return;

which causes step/loiter to not be run at all.

I discovered this while working with FollowReference, where I update the Reference at the same frequency as the PathController. This might be a "user problem", since I have little experience with FollowReference (so please correct me if I do something wrong :) ). From a control perspective, of course the inner loop should be faster than the outer loop, but I still think the inner loop should run :) Haven't tried, but I guess this also means that every time you receive a new path, step/loiter will be skipped. Is there a rationale behind this?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions