Skip to content

World.py: object race condition #5

Description

@mbforbes

The following trace occurred during execution

Traceback (most recent call last):
  File "/home/djbutler/rosbuild_ws/pr2_pbd/pr2_pbd_interaction/nodes/interaction.py", line 26, in <module>
    interaction.update()
  File "/home/djbutler/rosbuild_ws/pr2_pbd/pr2_pbd_interaction/src/Interaction.py", line 514, in update
    states = self._get_arm_states()
  File "/home/djbutler/rosbuild_ws/pr2_pbd/pr2_pbd_interaction/src/Interaction.py", line 378, in _get_arm_states
    abs_ee_poses[arm_index])
  File "/home/djbutler/rosbuild_ws/pr2_pbd/pr2_pbd_interaction/src/World.py", line 616, in get_nearest_object
    dist = World.pose_distance(World.objects[i].object.pose,
IndexError: list index out of range

Which appears to be caused by code in World.py where a list's length is checked, but during the loop thereafter, it turns out to be smaller than advertised. This smells like a race condition to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions