|
Bratmobile
|

Classes | |
| struct | CompareCluster |
Public Types | |
| enum | CLUSTERING { BOX =0 , KMEANS =1 , PARTITION =2 } |
Public Member Functions | |
| b2Body * | makeBody (b2World &w, const BodyFeatures &features) |
| Creates a body in the box2d world, and if the features represent a disturbance to which the attention window needs to be assigned, a flag is assigned to the body user data. More... | |
| std::vector< BodyFeatures > | processData (const CoordinateContainer &, const b2Transform &) |
| returns a bounding box encompassing all points provided More... | |
| std::vector< BodyFeatures > | cluster_data (const CoordinateContainer &pts, const b2Transform &start, CLUSTERING clustering=PARTITION) |
| Cluster point cloud data using a custom algorithm. More... | |
| bool | checkDisturbance (Pointf, bool &, Task *curr=NULL, float range=0.025) |
| virtual std::vector< BodyFeatures > | getFeatures (const CoordinateContainer ¤t, b2Transform start, CLUSTERING clustering=PARTITION) |
| clusters point clouds into objects and returns a vector of body features More... | |
| virtual void | buildWorld (b2World &, b2Transform, Direction, Disturbance disturbance=Disturbance(), float halfWindowWidth=0.15, CLUSTERING clustering=CLUSTERING::PARTITION, Task *task=NULL) |
| Creates bodies (objects) in the box2d world. More... | |
| b2PolygonShape | object_filtering_box (float halfWindowWidth, float boxLength, b2Transform start, Direction d) |
| Makes a box. More... | |
| std::pair< bool, BodyFeatures > | bounding_approx_poly (std::vector< cv::Point2f >nb) |
| std::vector< std::vector< cv::Point2f > > | kmeans_clusters (std::vector< cv::Point2f >, std::vector< cv::Point2f > &) |
| Clusters points using k-means algorithm. More... | |
| std::vector< std::vector< cv::Point2f > > | partition_clusters (std::vector< cv::Point2f >) |
| Clusters points using the partition algorithm. More... | |
| b2Vec2 | averagePoint (const CoordinateContainer &, Disturbance &, float rad=0.025) |
| int | getBodies () |
| void | add_body_count () |
| void | resetBodies () |
| void | add_iteration (int i=1) |
| b2Body * | get_robot (b2World *) |
| b2Fixture * | get_chassis (b2Body *) |
| b2AABB | makeRobotSensor (b2Body *const robotBody, const Disturbance &focus) const |
| Makes the robot attention window, i.e. a distal sensor which is comprised between the extremes of the robot body and the disturbance. More... | |
| std::vector< BodyFeatures > & | get_world_objects () |
| void | set_world_objects (const std::vector< BodyFeatures > &wo) |
| void | setSimulationStep (float f) |
Static Public Member Functions | |
| static std::pair< CoordinateContainer, bool > | salientPoints (b2Transform, const CoordinateContainer &, std::pair< Pointf, Pointf >) |
| static std::pair< Pointf, Pointf > | bounds (Direction, b2Transform t, float boxLength, float halfWindowWidth, std::vector< Pointf > *_bounds=NULL) |
Protected Attributes | |
| int | iteration =0 |
| char | bodyFile [100] |
| float | simulationStep =BOX2DRANGE |
| int | bodies =0 |
| std::vector< BodyFeatures > | world_objects |
Friends | |
| class | Configurator |
|
virtual |
Creates bodies (objects) in the box2d world.
| disturbance | |
| halfWindowWidth | |
| clustering | |
| task |
Reimplemented in LaserFocus, EveryOtherPointBuilder, and EverythingBuilder.
| std::vector< BodyFeatures > WorldBuilder::cluster_data | ( | const CoordinateContainer & | pts, |
| const b2Transform & | start, | ||
| CLUSTERING | clustering = PARTITION |
||
| ) |
Cluster point cloud data using a custom algorithm.
| pts | point cloud |
| start | start robot transform |
| clustering | the clustering algorithm return a vector of bodyfeatures |
|
virtual |
clusters point clouds into objects and returns a vector of body features
| current | point cloud |
| start | robot position |
| partition | algorithm used for partition |
Reimplemented in LaserFocus, EveryOtherPointBuilder, EveryOtherFeatureBuilder, and WorldPointBuilder.
| std::vector< std::vector< cv::Point2f > > WorldBuilder::kmeans_clusters | ( | std::vector< cv::Point2f > | points, |
| std::vector< cv::Point2f > & | centers | ||
| ) |
Clusters points using k-means algorithm.
| b2Body * WorldBuilder::makeBody | ( | b2World & | w, |
| const BodyFeatures & | features | ||
| ) |
Creates a body in the box2d world, and if the features represent a disturbance to which the attention window needs to be assigned, a flag is assigned to the body user data.
| w | the box2d world |
| features | features of the body to be created |
| b2AABB WorldBuilder::makeRobotSensor | ( | b2Body *const | robotBody, |
| const Disturbance & | focus | ||
| ) | const |
Makes the robot attention window, i.e. a distal sensor which is comprised between the extremes of the robot body and the disturbance.
| robotBody | |
| focus | a disturbance representing the focus of the attention window |
| b2PolygonShape WorldBuilder::object_filtering_box | ( | float | halfWindowWidth, |
| float | boxLength, | ||
| b2Transform | start, | ||
| Direction | d | ||
| ) |
Makes a box.
| halfWindowWidth | |
| boxLength | |
| start | |
| d |
| std::vector< std::vector< cv::Point2f > > WorldBuilder::partition_clusters | ( | std::vector< cv::Point2f > | points | ) |
Clusters points using the partition algorithm.
| std::vector< BodyFeatures > WorldBuilder::processData | ( | const CoordinateContainer & | points, |
| const b2Transform & | start | ||
| ) |
returns a bounding box encompassing all points provided