Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Go into TimeOut state if no pose updates arrive (for a configurable amount of time) #13

Open
chhtz opened this issue Sep 5, 2024 · 8 comments

Comments

@chhtz
Copy link
Contributor

chhtz commented Sep 5, 2024

It can happen that the pose provider fails and the task which takes the motion_command keeps using the last command.
It might be an option to time-out the trajectory follower, if no pose updates arrive (would be relatively easy to implement).

On the other hand, this could also be burdened to the task which receives the motion_command, i.e., as long the trajectory follower only sends new motion commands when it gets pose updates, the following task should time out (this would need to be implemented for every robot, and may make it inconvenient, e.g. to manually send a motion command once to have a robot drive straight or in circles).

Any opinions on that @rock-control?

@chhtz
Copy link
Contributor Author

chhtz commented Sep 5, 2024

Another alternative would be to have the pose-provider send NaN-Poses if it is not able to get the current pose (e.g., the vicon driver supports that), but I think last time I checked, the trajectory follower crashed or failed in some other way when that happened (need to check, if that was fixed).

@planthaber
Copy link

I think an error state "NO_POSITION_UPDATES" could be implemented that a higher level can react or at least shows the issue in rock-display (just like "FINISHED_TRAJECTORIES"). Just like the STABILITY_FAILED error state it coudl be self-recovering in case poses are received again.

This state could be set whenever the transformer times out, so we don't need an additional parameter

@chhtz
Copy link
Contributor Author

chhtz commented Sep 5, 2024

If we can make it work with existing parameters, I'm fine. Probably we should still have a parameter which decides whether to send a zero-command if we don't get position updates (I guess this would always make sense, but I'm a bit afraid that we break some existing behavior if we do).

@skasperski
Copy link
Contributor

I think sending a zero-command when the trajectory_follower cannot get the robot pose anymore should not interfere with any desired behavior. And as Steffen said, it would be much less intrusive then having the controllers need to timeout on incoming motion commands.

@Rauldg
Copy link
Contributor

Rauldg commented Sep 17, 2024

Are the motion commands from the trajectory follower old? I thought after no poses are provided it keeps using the old pose and trying to follow without perceiving motion. If the commands are new then I think the one to blame is the trajectory follower. On the other hand, if the motion commands are old, why is the motion controller still executing them? Shouldn't a safe control loop expect commands on every cycle or at least reject very old ones?

@Rauldg
Copy link
Contributor

Rauldg commented Sep 17, 2024

Seems like the trajectory follower keeps sending new commands even if it does not get new poses.

@Rauldg
Copy link
Contributor

Rauldg commented Sep 18, 2024

Thus, I am also in favor with most of what was proposed:

  • Adding a new state "NO_POSITION_UPDATES" as @planthaber proposes
  • Adding a parameter "stop_on_no_poses" as @chhtz proposes

if "stop_on_no_poses" is True -> trajectory follower sends stop commands while poses are not available

if "stop_on_no_poses" is False -> trajectory follower does not send any commands while poses are not available

@chhtz
Copy link
Contributor Author

chhtz commented Sep 27, 2024

WIP: #14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants