Skip to content
This repository has been archived by the owner on Nov 13, 2017. It is now read-only.

planning_scene_monitor: fix state update bug #408

Merged
merged 1 commit into from
Feb 3, 2014

Conversation

acornacorn
Copy link

The rate of state updates is limited to dt_state_update_ per second.
When an update arrived it was not processed if another was recently
processed. This meant that if a quick sequence of state updates
arrived and then no updates arrive for a while that the last update(s)
were not seen until another arrives (which may be much later or
never). This fixes the bug by periodically checking for pending
updates and running them if they have been pending longer than
dt_state_update_.

Fixes issue #405 (replaces pull request #407)

The rate of state updates is limited to dt_state_update_ per second.
When an update arrived it was not processed if another was recently
processed.  This meant that if a quick sequence of state updates
arrived and then no updates arrive for a while that the last update(s)
were not seen until another arrives (which may be much later or
never). This fixes the bug by periodically checking for pending
updates and running them if they have been pending longer than
dt_state_update_.

/// True when we need to update the RobotState from current_state_monitor_
// This field is protected by state_pending_mutex_
volatile bool state_update_pending_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The volatile keyword sometimes does different things on different architectures. I am not sure we even need it.

@isucan
Copy link
Contributor

isucan commented Feb 3, 2014

Excellent fix! +1

@shaun-edwards
Copy link

Verified the fix on my system...+1

@sachinchitta sachinchitta merged commit d4732b7 into hydro-devel Feb 3, 2014
@acornacorn acornacorn deleted the fix2_current_state_monitor_issue407 branch February 8, 2014 05:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants