Skip to content

mbf publishes zero cmd_vel if computeVelocityCmd returns False #195

@Timple

Description

@Timple

For our local planner we need dt. So on the first call to computeVelocityCmd we return false and save the timestamp. So every next loop can calculate dt.

But this causes a zero cmd_vel to be published. However often we are not standing still. So the zero cmd_vel is undesired.

Of course internally we can remember the last timestamp, but there is also no guarantee that this is not from a while back (sometimes we do stand still and do nothing).

Is there a proper way to handle this scenario?

  • I can put in a PR which removes the zero publish
  • I can remember the previous time and do ugly logic if dt > 0.1: we probably stood still inbetween
  • Publish the current cmd_vel value again instead of zero (needs Compute current velocity for the controller. #34)
  • Provide dt as argument to computeVelocityCmd
  • Have some kind of flag if we are a direct follow-up from a previous path

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions