Optimizing a particle filter weighted selection step
I don't see any need for that goto, and it should be avoided whenever possible.  It would be better to just perform the action after the condition, then break from the loop.

if (particlesCounter == 0)
{
    ROS_INFO_STREAM("Observation step complete");
    break;
}


Although this will only break from the for loop, the state of particlesCounter at that point will stop the while loop as well.