Skip to content
This repository has been archived by the owner on Jul 22, 2021. It is now read-only.

Why is resume called when now <= wait_until in EasyTrafficLight::immediately_stop_until #324

Answered by mxgrey
rcywongaa asked this question in Q&A
Discussion options

You must be logged in to vote

Something similar happens also in TrafficLight.cpp which I also don't quite understand...

This resume is correct, because it gets triggered when the traffic light had told the robot to wait until a certain time, but now the traffic light's plan has changed so the robot should continue. I'll add a comment into this code to make that more clear.

Why is resume_cb called when now <= wait_until->value() in immediately_stop_until?

I agree this looks wrong. I'm not sure why this has gone unnoticed, although I suppose this situation just doesn't come up very often because the immediate stops are much less common than stopping at a checkpoint. I'll test out what happens when we flip this inequ…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@rcywongaa
Comment options

@rcywongaa
Comment options

@mxgrey
Comment options

Answer selected by rcywongaa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants