-
Notifications
You must be signed in to change notification settings - Fork 183
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
Fix rejected actions when goal requests arrive inbetween watchdog reset und arrival of next status package #113
Conversation
controller_alive_ = true; | ||
|
||
watchdog_timer_.stop(); | ||
watchdog_timer_.start(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
afaict, it should be possible to 'restart' a timer using setPeriod(..)
(eventually in TimerManager). That would remove the need for the stop()
, start()
pair.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about one-shot timers though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that feels like using a side-effect, stop start is a bit clumsy but quite legible, but I have no problem with being overvoted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, it is a side-effect. Explicit start/stop is better.
…et und arrival of next status package Fix by reseting the watchdog_timer on package arrival make Timer oneShot, increase notification severeness from debug to warn, rename WATCHD0G_PERIOD_ to WATCHDOG_PERIOD_ initializing status variable in initialization list of the constructor
+1.... @simonschmeisser, thanks for the contribution. |
Fix rejected actions when goal requests arrive inbetween watchdog reset und arrival of next status package
@shaun-edwards: you merged this PR into the |
I was just using the branch with the most recent commits, maybe I misunderstood the branching concept used. Shouldn't there in theory be a jade-devel branch since indigo was released already? Is this documented somewhere? |
Are you implying that we don't develop for a ROS version anymore after it's been released :)? The 'Best practice' suggests that a repository should only branch for a specific ROS release if there is a need for it. Introducing changes incompatible with the previous release would be such a need. There is nothing in Releases are then created by tagging the As to documentation: it is a bit hidden, but the Install page does refer to it:
|
O and just to make sure: this is also not 'your fault'. We should've just checked more carefully how the PR was created. |
ok, thanks, now I get the concept. Don't worry, I didn't feel offended. Do I need to change anything or will you be able to fix things? Just some more questions while we're at it: Binary releases (dpkg) happen from <release_name> branch? Do fixes get backported typically? |
This is definitely my fault. I should have checked (I thought I did but apparently not). |
@shaun-edwards: perhaps @simonschmeisser's question is a good reason to create some Branching Policy documentation and / or make a separate page out of that section on the Install page about source repository layout. |
Also: @simonschmeisser: this is easily fixed, and you don't need to do anything. |
I'll fix this when I get into the office. Does everyone think the wiki is the right place. The "GitHub" way is to have a CONTRIBUTING readme. |
Hm, using the contribution hook is a nice idea. I've only seen it used to draw attention to any licensing requirements, but I guess you could put this kind of info into it as well. I created an issue for that some time ago over at ros-industrial/ros_industrial_issues#26. I'd still make a page on the wiki though: that way it is a stand-alone document we can refer ppl to, not a file in a vcs somewhere. It would be similar to the PR Review Guidelines. |
This reverts commit fb28e26.
OK...that was ugly (and possibly way more complicated than it needed to be). I have successfully reverted the merge into indigo. In order to avoid merge problems down the road, I had to sync indigo and indigo-devel. I then reverted the revert in indigo-devel. The correct code is in indigo-devel and I have verified a PR from indigo-devel into indigo catches these changes. In case you are curious, I was trying to avoid this. |
…isser/indigo"" This reverts commit fb28e26.
this fixes #112 , a regression due to #86 / #85 . Sometimes execution of valid trajectories is rejected with this message:
Joint trajectory action rejected: waiting for (initial) feedback from controller
I poll my robot with 20 Hz (arbitrary), the watchdog is set to 1Hz. So I think the following happens:
0s: JointTrajectoryAction::controllerStateCB: trajectory_state_recvd_ = true;
0.01s: JointTrajectoryAction::watchdog: trajectory_state_recvd_ = false;
0.02s: JointTrajectoryAction::goalCB -> rejected
(0.03s: JointTrajectoryAction::goalCB -> rejected)
(0.04s: JointTrajectoryAction::goalCB -> rejected)
0.05s: JointTrajectoryAction::controllerStateCB: trajectory_state_recvd_ = true; but too late!
(the events in brackets are due to me retrying the execution if it doesn't work)
So I think the watchdog should manage some other variable like "controller_alive_" which is then checked by goalCB. trajectory_state_recvd_ is meant as an internal variable to the watchdog.