Please check the suggested fix


-----Original Message-----
From: Florian Mirus [mailto:notifications@github.com]
Sent: Mon 6/24/2013 6:12 PM
To: ipa320/seneka
Cc: Chughtai, Muhammad Bilal
Subject: Re: [seneka] feature/sensor placement on perimeter fix (#20)
 
> @@ -323,9 +325,9 @@ void particle::initializeSensorsOnPerimeter()
>  
>    for(size_t i = 0; i < sensors_.size(); i++)
>    {
> -    if(i < area_of_interest_.polygon.points.size() )
> +    if(i < area_of_interest_.polygon.points.size() && (pointInPolygon(new_pose2D, forbidden_poly_.polygon) == -1) )

new_pose2D initialization values are all zero. I think new_pose2D should be set to the i-th polygon-corners' position before this if-case. Otherwise we refuse the sensor initialization in the corners if the map origin lies within the forbidden area. 

---
Reply to this email directly or view it on GitHub:
https://github.com/ipa320/seneka/pull/20/files#r4845517