#include <assert.h>#include <angles/angles.h>#include "Arc.hpp"#include "CV.hpp"#include "Camera_Tag.hpp"#include "File.hpp"#include "Location.hpp"#include "Map.hpp"#include "Tag.hpp"
Go to the source code of this file.
Typedefs | |
| typedef struct Map__Struct * | Map_Doxygen_Fake_Out |
| Global map of ceiling fiducial markers. | |
Functions | |
| void | Map__arc_announce (Map map, Arc *arc, CV_Image image, unsigned int sequence_number) |
| Causes an arc announce callback routine to be called. | |
| void | Map__arc_append (Map map, Arc *arc) |
| Appends *arc* to *map*. | |
| Arc * | Map__arc_lookup (Map map, Tag *from_tag, Tag *to_tag) |
| Returns the *Arc* that contains *from_tag* and *to_tag*. | |
| unsigned int | Map__arc_update (Map map, CameraTag *camera_from, CameraTag *camera_to, CV_Image image, unsigned int sequence_number) |
| Makes sure the *Arc* connecting *from* to *to* is up to date. | |
| Map | Map__create (String_Const file_path, String_Const file_base, void *announce_object, Fiducials_Arc_Announce_Routine arc_announce_routine, Fiducials_Tag_Announce_Routine tag_announce_routine, String_Const tag_heights_file_name, String_Const from) |
| Returns a new *Map*. | |
| bool | Map__equals (Map map1, Map map2) |
| Returns -1, 0, 1 depending upon the sort order of *map1* and *map2*. | |
| void | Map__free (Map map) |
| Releases storage associated with *map*. | |
| void | Map__image_log (Map map, CV_Image image, unsigned int sequence_number) |
| void | Map__restore (Map map, File in_file) |
| Restore the contents of *Map* from *in_file*. | |
| void | Map__save (Map map) |
| Save *map* out to the file named *file_name*. | |
| void | Map__sort (Map map) |
| Sort the contents of *map* to be in a consistent order. | |
| void | Map__svg_write (Map map, String_Const svg_base_name, std::vector< Location * > &locations) |
| Writes *map* out to a file called *svg_base_name*.svg. | |
| void | Map__tag_announce (Map map, Tag *tag, bool visible, CV_Image image, unsigned int sequence_number) |
| Causes an arc announce callback routine to be called. | |
| TagHeight * | Map__tag_height_lookup (Map map, unsigned int id) |
| Returns the distance per pixel for *id*. | |
| void | Map__tag_heights_xml_read (Map map, String_Const tag_heights_file_name) |
| Reads the tag heights .xml file. | |
| Tag * | Map__tag_lookup (Map map, unsigned int tag_id) |
| Return the *Tag* associated with *tag_id* from *map*. | |
| void | Map__update (Map map, CV_Image image, unsigned int sequence_number) |
| Updates the location of each *tag* in *map*. | |
| void | Map__write (Map map, File out_file) |
| Writes *map* out to *out_file*. | |
Variables | |
| static int | last_sequence_number = 0xffffffff |
| Log image to disk if image logging is turned on. | |
| typedef struct Map__Struct* Map_Doxygen_Fake_Out |
Global map of ceiling fiducial markers.
A *Map* consists of a list of *Tag* objects, where each Tag represents the position and orientation of ceiling fiduical markers. Each *Tag* has zero one or more *Neighbor* objects that specify the distance and orientation of *Tag* pairs.
| void Map__arc_announce | ( | Map | map, |
| Arc * | arc, | ||
| CV_Image | image, | ||
| unsigned int | sequence_number | ||
| ) |
Causes an arc announce callback routine to be called.
| map | is the parent *Map* object. |
| arc | is the *Arc* object that has just been changed. |
| image | is the image associated with the arc. |
| sequence_number | is the sequence number associated with announce. |
Map__arc_announce*() will cause the arc announde call back routine to be called for *arc*.
| void Map__arc_append | ( | Map | map, |
| Arc * | arc | ||
| ) |
| Arc* Map__arc_lookup | ( | Map | map, |
| Tag * | from_tag, | ||
| Tag * | to_tag | ||
| ) |
Returns the *Arc* that contains *from_tag* and *to_tag*.
| map | that has the *Arc* table. |
| from_tag | is the from *Tag*. |
| to_tag | is the to *Tag*. |
Map__arc_lookup*() will return the *Arc* that contains *from_tag* and *to_tag*. If no such *Arc* exists yet, it is created.
| unsigned int Map__arc_update | ( | Map | map, |
| CameraTag * | camera_from, | ||
| CameraTag * | camera_to, | ||
| CV_Image | image, | ||
| unsigned int | sequence_number | ||
| ) |
Makes sure the *Arc* connecting *from* to *to* is up to date.
| map | to use for *Arc* updating. |
| camera_from | is the *Camera_Tag* to for one end of the *Arc*. |
| camera_to | is the *Camera_Tag* to the other end of the *Arc*. |
| image | is the image that the *Camera_Tag*'s came from. |
| sequence_number | is the image sequence number. |
Map__arc_update*() will create or update the *Arc* in *map* associated with *from* and *to*. *image* used to determine the frame size.
| Map Map__create | ( | String_Const | file_path, |
| String_Const | file_base, | ||
| void * | announce_object, | ||
| Fiducials_Arc_Announce_Routine | arc_announce_routine, | ||
| Fiducials_Tag_Announce_Routine | tag_announce_routine, | ||
| String_Const | tag_heights_file_name, | ||
| String_Const | from | ||
| ) |
Returns a new *Map*.
| file_path | is the directory/folder that the map fileis stored in. |
| file_base | is the base name of the map file. |
| announce_object | is an opaque object that is passed into announce routines. |
| arc_announce_routine | is the arc callback routine. |
| tag_announce_routine | is the tag callback routine. |
| tag_heights_file_name | is the tag ceiling heights .xml file. |
| from | is used for memory leak checking. |
Map__create*() creates and returns an empty initialized *Map* object.
| bool Map__equals | ( | Map | map1, |
| Map | map2 | ||
| ) |
Returns -1, 0, 1 depending upon the sort order of *map1* and *map2*.
| map1 | is the first *Map* to compare. |
| map2 | is the second *Map* to compare. |
Map__compare*() will compare *map1* to *map2* and return -1 if *map1* sorts before *map2*, 0 if they are equal, and -1 if *map1* would sort after *map2*. Realistically, this routine is only used for testing equality.
| void Map__image_log | ( | Map | map, |
| CV_Image | image, | ||
| unsigned int | sequence_number | ||
| ) |
| void Map__restore | ( | Map | map, |
| File | in_file | ||
| ) |
| void Map__svg_write | ( | Map | map, |
| String_Const | svg_base_name, | ||
| std::vector< Location * > & | locations | ||
| ) |
Writes *map* out to a file called *svg_base_name*.svg.
| map | is the *Map* to write out. |
| svg_base_name | is the base name of the .svg file to write out. |
| locations | is the list of locations that the robot path took. |
Map__svg_write*() will write out *map* out *svg_base_name*.svg.
| void Map__tag_announce | ( | Map | map, |
| Tag * | tag, | ||
| bool | visible, | ||
| CV_Image | image, | ||
| unsigned int | sequence_number | ||
| ) |
Causes an arc announce callback routine to be called.
| map | is the parent *Map* object. |
| tag | is the *Tag* object that has just been changed. |
| visible | is True if the tag is in the current field of view. |
| image | is the current image being processed. |
| sequence_number | is the sequence number. |
Map__arc_announce*() will cause the arc announde call back routine to be called for *arc*.
| TagHeight* Map__tag_height_lookup | ( | Map | map, |
| unsigned int | id | ||
| ) |
Returns the distance per pixel for *id*.
| map | is the *Map* object that contains the distance per pixel table. |
| id | is the *Tag* identifier to look up. |
Map__distance_per_pixel*() will return the distance per pixel for Tag* *id*. The distance can be in any consistent distance (e.g. (millimeters, centimeters, meters, kilometers, inches, feet, miles, light seconds, etc.)
| void Map__tag_heights_xml_read | ( | Map | map, |
| String_Const | tag_heights_file_name | ||
| ) |
| Tag* Map__tag_lookup | ( | Map | map, |
| unsigned int | tag_id | ||
| ) |
Return the *Tag* associated with *tag_id* from *map*.
| map | to use for lookup. |
| tag_id | to lookup. |
Map__tag_lookup*() will lookup and return the *Tag* associaed with tag_id* using *map. If no previous instance of *tag_id* has been encountered, a new *Tag* is created and add to the association in *map*.
| void Map__update | ( | Map | map, |
| CV_Image | image, | ||
| unsigned int | sequence_number | ||
| ) |
| void Map__write | ( | Map | map, |
| File | out_file | ||
| ) |
int last_sequence_number = 0xffffffff [static] |