DAIRLab / dairlib

MIT License
66 stars 26 forks source link

Fix a bug of using stale context time in FiniteStateMachineEventTime #233

Closed yminchen closed 3 years ago

yminchen commented 3 years ago

It's the same issue described in #63, but I didn't fix it with the same approach as #188, because we would have to set the message time manually which makes LcmDrivenLoop more complicated.


This change is Reviewable

yminchen commented 3 years ago

On a second thought, maybe LcmDrivenLoop is not going to be much more complicated if I set the message time manually. I will make a new PR later.

yminchen commented 3 years ago

Nvm, we need a public function set_next_message_time in the derived class of LeafSystem which makes the generalization of LcmDrivenLoop not trivial.

yminchen commented 3 years ago

I realized that we can just get the message time directly from robot output. The case here is different form #188 where the lcm parser doesn't populate the message time.

yminchen commented 3 years ago

@yangwill could you review this if you are available?