codac 1.5.6
|
Two-dimensional graphical item to project dynamical items (tubes, trajectories, etc.) on a map. More...
#include <codac_VIBesFigMap.h>
Classes | |
struct | FigMapTrajParams |
Specifies some parameters related to a Trajectory display. More... | |
struct | FigMapTubeParams |
Specifies some parameters related to a Tube display. More... | |
Public Member Functions | |
Basics | |
VIBesFigMap (const std::string &fig_name) | |
Creates a VIBesFigMap. | |
~VIBesFigMap () | |
VIBesFigMap destructor. | |
void | restrict_tdomain (const Interval &restricted_tdomain) |
Restricts the display of the dynamical items to a part of their tdomain only. | |
void | enable_tubes_backgrounds (bool enable=true) |
Enables the display of previous versions of the tubes, in order to highlight the contractions of these sets. | |
void | show () |
Displays this figure. | |
void | show (float robot_size) |
Displays this figure with a custom robot size. | |
void | set_tube_max_disp_slices (int max) |
Limits the number of slices to be displayed for tubes. | |
void | set_traj_max_disp_points (int max) |
Limits the number of points to be displayed for trajectories. | |
void | smooth_tube_drawing (bool smooth) |
Enables the smoothing of tubes. | |
Handling tubes | |
void | add_tube (const TubeVector *tube, const std::string &name, int index_x, int index_y) |
Adds a tube vector object to this figure. | |
void | set_tube_name (const TubeVector *tube, const std::string &name) |
Sets a new name for a tube. | |
void | set_tube_color (const TubeVector *tube, const std::string &color) |
Sets constant color properties for a given tube. | |
void | set_tube_color (const TubeVector *tube, const ColorMap &colormap, const Trajectory *traj_colormap=nullptr) |
Sets a color map for a given tube. | |
void | remove_tube (const TubeVector *tube) |
Removes a tube from this figure. | |
Handling trajectories | |
void | add_trajectory (const TrajectoryVector *traj, const std::string &name, int index_x, int index_y, const std::string &color=DEFAULT_TRAJMAP_COLOR, bool vehicle_display=DEFAULT_VEHICLE_DISPLAY_ON_EACH_TRAJ) |
Adds a trajectory vector object (x,y) to this figure. | |
void | add_trajectory (const TrajectoryVector *traj, const std::string &name, int index_x, int index_y, int index_heading, const std::string &color=DEFAULT_TRAJMAP_COLOR, bool vehicle_display=DEFAULT_VEHICLE_DISPLAY_ON_EACH_TRAJ) |
Adds a trajectory vector object (x,y,heading) to this figure. | |
void | set_trajectory_name (const TrajectoryVector *traj, const std::string &name) |
Sets a new name for a trajectory. | |
void | set_trajectory_color (const TrajectoryVector *traj, const std::string &color) |
Sets constant color properties for a given trajectory. | |
void | set_trajectory_color (const TrajectoryVector *traj, const ColorMap &colormap, const Trajectory *traj_colormap=nullptr) |
Sets a color map for a given trajectory. | |
void | set_vehicle_display (const TrajectoryVector *traj, bool vehicle_display) |
Displays a vehicle at the end of a trajectory. | |
void | remove_trajectory (const TrajectoryVector *traj) |
Removes a trajectory from this figure. | |
Handling robotics objects | |
void | draw_vehicle (const Vector &pose, float size=-1) |
Draws a vehicle with a given pose. | |
void | draw_vehicle (const Vector &pose, const vibes::Params ¶ms, float size=-1) |
Draws a vehicle with a given pose. | |
void | draw_vehicle (double t, const TrajectoryVector *traj, float size=-1) |
Draws a vehicle on top of its trajectory. | |
void | draw_vehicle (double t, const TrajectoryVector *traj, const vibes::Params ¶ms, float size=-1) |
Draws a vehicle on top of its trajectory. | |
void | add_beacon (const Beacon &beacon, const std::string &color=DEFAULT_BEACON_COLOR) |
Adds a Beacon object to the map. | |
void | add_beacon (const IntervalVector &beacon, const std::string &color=DEFAULT_BEACON_COLOR) |
Adds a Beacon object to the map (from an IntervalVector) | |
void | add_beacon (const Beacon &beacon, double width, const std::string &color=DEFAULT_BEACON_COLOR) |
Adds a Beacon object to the map with a specific width. | |
void | add_beacon (const Vector &beacon, double width, const std::string &color=DEFAULT_BEACON_COLOR) |
Adds a Beacon object to the map with a specific width (from a Vector) | |
void | add_beacons (const std::vector< Beacon > &v_beacons, const std::string &color=DEFAULT_BEACON_COLOR) |
Adds a set of Beacon objects to the map. | |
void | add_beacons (const std::vector< Beacon > &v_beacons, double width, const std::string &color=DEFAULT_BEACON_COLOR) |
Adds a set of Beacon objects to the map with a specific width. | |
void | add_landmarks (const std::vector< IntervalVector > &v_m, const std::string &color=DEFAULT_BEACON_COLOR) |
Adds a set of boxed landmarks to the map. | |
void | add_landmarks (const std::vector< Vector > &v_m, double width, const std::string &color=DEFAULT_BEACON_COLOR) |
Adds a set of landmarks to the map with a specific width. | |
void | add_observation (const IntervalVector &obs, const Vector &pose, const std::string &color=DEFAULT_OBS_COLOR) |
Adds a range-and-bearing uncertain observation to the map, in a static context. | |
void | add_observations (const std::vector< IntervalVector > &v_obs, const Vector &pose, const std::string &color=DEFAULT_OBS_COLOR) |
Adds a set of range-and-bearing uncertain observations to the map, in a static context. | |
void | add_observation (const IntervalVector &obs, const TrajectoryVector *traj, const std::string &color=DEFAULT_OBS_COLOR) |
Adds a range-and-bearing uncertain observation to the map, in a dynamic context. | |
void | add_observations (const std::vector< IntervalVector > &v_obs, const TrajectoryVector *traj, const std::string &color=DEFAULT_OBS_COLOR) |
Adds a set of range-and-bearing uncertain observations to the map, in a dynamic context. | |
double | heading (double t, const TrajectoryVector *traj) const |
Returns actual or estimated heading related to some TrajectoryVector at t. | |
Public Member Functions inherited from codac::VIBesFig | |
VIBesFig (const std::string &fig_name) | |
Creates a VIBesFig. | |
~VIBesFig () | |
VIBesFig destructor. | |
void | close () |
Closes this figure. | |
void | set_properties (int x, int y, int width, int height) |
Sets the properties (coordinates and dimensions) of this figure. | |
void | set_background (const std::string &bg_color) |
Sets the background color of this figure. | |
const IntervalVector & | axis_limits (double x_min, double x_max, double y_min, double y_max, bool same_ratio=false, float margin=0.) |
Sets the axis limits of this figure. | |
const IntervalVector & | axis_limits (const IntervalVector &viewbox, bool same_ratio=false, float margin=0.) |
Sets the axis limits of this figure. | |
void | save_image (const std::string &suffix="", const std::string &extension="svg", const std::string &path=".") const |
Saves the figure in SVG/PNG/... format. | |
void | show () |
Displays this figure. | |
void | clear () |
Clears this figure by removing displayed items. | |
void | draw_box (const IntervalVector &box, const vibes::Params ¶ms) |
Draws a box. | |
void | draw_box (const IntervalVector &box, const std::string &color="", const vibes::Params ¶ms=vibes::Params()) |
Draws a box. | |
void | draw_boxes (const std::vector< IntervalVector > &v_boxes, const vibes::Params ¶ms) |
Draws a set of boxes. | |
void | draw_boxes (const std::vector< IntervalVector > &v_boxes, const std::string &color="", const vibes::Params ¶ms=vibes::Params()) |
Draws a set of boxes. | |
void | draw_line (const std::vector< double > &v_x, const std::vector< double > &v_y, const vibes::Params ¶ms) |
Draws a line of points. | |
void | draw_line (const std::vector< double > &v_x, const std::vector< double > &v_y, const std::string &color="", const vibes::Params ¶ms=vibes::Params()) |
Draws a line of points. | |
void | draw_line (const std::vector< std::vector< double > > &v_pts, const vibes::Params ¶ms) |
Draws a line of points. | |
void | draw_line (const std::vector< std::vector< double > > &v_pts, const std::string &color="", const vibes::Params ¶ms=vibes::Params()) |
Draws a line of points. | |
void | draw_circle (double x, double y, double r, const vibes::Params ¶ms) |
Draws a circle. | |
void | draw_circle (double x, double y, double r, const std::string &color="", const vibes::Params ¶ms=vibes::Params()) |
Draws a circle. | |
void | draw_ring (double x, double y, const Interval &r, const vibes::Params ¶ms) |
Draws a ring. | |
void | draw_ring (double x, double y, const Interval &r, const std::string &color="", const vibes::Params ¶ms=vibes::Params()) |
Draws a ring. | |
void | draw_pie (double x, double y, const Interval &r, const Interval &theta, const vibes::Params ¶ms) |
Draws a pie: radial portion of a ring. | |
void | draw_pie (double x, double y, const Interval &r, const Interval &theta, const std::string &color="", const vibes::Params ¶ms=vibes::Params()) |
Draws a pie: radial portion of a ring. | |
void | draw_edge (const ThickEdge &e, const vibes::Params ¶ms) |
Draws an edge. | |
void | draw_edge (const ThickEdge &e, const std::string &color="", const vibes::Params ¶ms=vibes::Params()) |
Draws an edge. | |
void | draw_polygon (const Polygon &p, const vibes::Params ¶ms) |
Draws a polygon. | |
void | draw_polygon (const Polygon &p, const std::string &color="", const vibes::Params ¶ms=vibes::Params()) |
Draws a polygon. | |
void | draw_polygons (const std::vector< ConvexPolygon > &v_p, const vibes::Params ¶ms) |
Draws a set of polygons. | |
void | draw_polygons (const std::vector< ConvexPolygon > &v_p, const std::string &color="", const vibes::Params ¶ms=vibes::Params()) |
Draws a set of polygons. | |
void | draw_polygons (const std::vector< ConvexPolygon > &v_p, const ColorMap &color_map, const vibes::Params ¶ms=vibes::Params()) |
Draws a set of polygons. | |
void | draw_point (const ThickPoint &p, const vibes::Params ¶ms) |
Draws a point. | |
void | draw_point (const ThickPoint &p, const std::string &color="", const vibes::Params ¶ms=vibes::Params()) |
Draws a point. | |
void | draw_point (const ThickPoint &p, float size, const vibes::Params ¶ms) |
Draws a point. | |
void | draw_point (const ThickPoint &p, float size, const std::string &color="", const vibes::Params ¶ms=vibes::Params()) |
Draws a point. | |
void | draw_points (const std::vector< ThickPoint > &v_pts, float size, const vibes::Params ¶ms) |
Draws a set of points. | |
void | draw_points (const std::vector< ThickPoint > &v_pts, float size, const std::string &color="", const vibes::Params ¶ms=vibes::Params()) |
Draws a set of points. | |
void | draw_vehicle (double x, double y, double heading, double size, const vibes::Params ¶ms) |
Draws a vehicle. | |
void | draw_vehicle (double x, double y, double heading, double size, const std::string &color="", const vibes::Params ¶ms=vibes::Params()) |
Draws a vehicle. | |
Public Member Functions inherited from codac::Figure | |
Figure (const std::string &fig_name) | |
Creates a Figure. | |
~Figure () | |
Figure destructor. | |
int | x () const |
Returns the horizontal coordinate of this figure. | |
int | y () const |
Returns the vertical coordinate of this figure. | |
int | width () const |
Returns the width of this figure. | |
int | height () const |
Returns the height of this figure. | |
const std::string | name () const |
Returns the name of this figure. | |
const IntervalVector & | view_box () const |
Returns the real values displayed by this figure. | |
void | reset_view_box () |
Reset the view box of this figure. | |
void | set_properties (int x, int y, int width, int height) |
Sets the properties (coordinates and dimensions) of this figure. | |
Protected Member Functions | |
const IntervalVector | draw_tube (const TubeVector *tube) |
Draws a tube. | |
const IntervalVector | draw_tube_background (const TubeVector *tube) |
Draws the background of a tube. | |
const IntervalVector | draw_trajectory (const TrajectoryVector *traj, float points_size=0.) |
Draws a trajectory. | |
void | draw_slices (const TubeVector *tube) |
Draws the slices of a tube. | |
void | draw_beacon (const Beacon &beacon, const std::string &color, const vibes::Params ¶ms) |
Draws a Beacon object. | |
void | draw_beacon (const Beacon &beacon, double width, const std::string &color, const vibes::Params ¶ms) |
Draws a Beacon object with a specific width. | |
void | draw_observation (const IntervalVector &obs, const Vector &pose, const std::string &color="", const vibes::Params ¶ms=vibes::Params()) |
Draws a range-and-bearing uncertain observation on the map in static situation. | |
void | draw_observation (const IntervalVector &obs, const TrajectoryVector *traj, const std::string &color="", const vibes::Params ¶ms=vibes::Params()) |
Draws a range-and-bearing uncertain observation on the map in dynamic situation. | |
Protected Attributes | |
std::map< const TubeVector *, FigMapTubeParams > | m_map_tubes |
map of Tube objects to be displayed, together with parameters | |
std::map< const TrajectoryVector *, FigMapTrajParams > | m_map_trajs |
map of Trajectory objects to be displayed, together with parameters | |
Interval | m_restricted_tdomain |
restricts the display to a part of the temporal domain | |
bool | m_draw_tubes_backgrounds = true |
if true , will highlight tubes contractions | |
bool | m_smooth_drawing = false |
if true , a smooth rendering of tubes will be done | |
float | m_robot_size = 5.5 |
if 0 , no robot display | |
unsigned int | m_tube_max_nb_disp_slices = TUBE_MAX_NB_DISPLAYED_SLICES |
limit for slices display | |
unsigned int | m_traj_max_nb_disp_points = TRAJ_MAX_NB_DISPLAYED_POINTS |
limit for traj points display | |
Protected Attributes inherited from codac::Figure | |
const std::string | m_name |
figure name | |
int | m_height = 300 |
figure properties | |
IntervalVector | m_view_box = IntervalVector(2, Interval::EMPTY_SET) |
view box | |
Additional Inherited Members | |
Static Protected Member Functions inherited from codac::Figure | |
static double | trunc_inf (double x) |
Returns a representable value of any double variable x | |
static const Interval | trunc_inf (const Interval &x) |
Returns a representable value of any interval \([x]\). | |
static const IntervalVector | trunc_inf (const IntervalVector &x) |
Returns a representable value of any interval vector \([\mathbf{x}]\). | |
Two-dimensional graphical item to project dynamical items (tubes, trajectories, etc.) on a map.
One figure is linked to some tube or trajectory pointers, so that any update on these objects can be easily displayed on the figure.
codac::VIBesFigMap::VIBesFigMap | ( | const std::string & | fig_name | ) |
Creates a VIBesFigMap.
fig_name | name of the figure as displayed in the window title |
void codac::VIBesFigMap::restrict_tdomain | ( | const Interval & | restricted_tdomain | ) |
Restricts the display of the dynamical items to a part of their tdomain only.
restricted_tdomain | subset of the temporal domain of the referenced items |
void codac::VIBesFigMap::enable_tubes_backgrounds | ( | bool | enable = true | ) |
Enables the display of previous versions of the tubes, in order to highlight the contractions of these sets.
enable | boolean parameter, true by default |
void codac::VIBesFigMap::show | ( | float | robot_size | ) |
Displays this figure with a custom robot size.
robot_size | length of the displayed robot |
void codac::VIBesFigMap::set_tube_max_disp_slices | ( | int | max | ) |
Limits the number of slices to be displayed for tubes.
max | the maximum number of slices |
void codac::VIBesFigMap::set_traj_max_disp_points | ( | int | max | ) |
Limits the number of points to be displayed for trajectories.
Note that this will be applied for trajectories defined from TFunction objects (discretization).
max | the maximum number of points |
void codac::VIBesFigMap::smooth_tube_drawing | ( | bool | smooth | ) |
Enables the smoothing of tubes.
Instead of boxed slices, polygons will be drawn which will provide a smooth but non-reliable rendering.
smooth | true for smooth display |
void codac::VIBesFigMap::add_tube | ( | const TubeVector * | tube, |
const std::string & | name, | ||
int | index_x, | ||
int | index_y ) |
Adds a tube vector object to this figure.
tube | a const pointer to a TubeVector object to be displayed |
name | a name to identify this object |
index_x | integer reference for the x-horizontal state component |
index_y | integer reference for the y-horizontal state component |
void codac::VIBesFigMap::set_tube_name | ( | const TubeVector * | tube, |
const std::string & | name ) |
Sets a new name for a tube.
tube | the const pointer to the TubeVector object to be renamed |
name | a new name to identify this object |
void codac::VIBesFigMap::set_tube_color | ( | const TubeVector * | tube, |
const std::string & | color ) |
Sets constant color properties for a given tube.
tube | the const pointer to the TubeVector object for which the color will be set |
color | a color to draw this tube |
void codac::VIBesFigMap::set_tube_color | ( | const TubeVector * | tube, |
const ColorMap & | colormap, | ||
const Trajectory * | traj_colormap = nullptr ) |
Sets a color map for a given tube.
tube | the const pointer to the TubeVector object for which the color will be set |
colormap | a ColorMap to draw this tube with time evolving colors |
traj_colormap | an optional const pointer to a Trajectory object in order to have a custom color evolution instead of a linear time evolving color |
void codac::VIBesFigMap::remove_tube | ( | const TubeVector * | tube | ) |
Removes a tube from this figure.
tube | the const pointer to the TubeVector object to be removed |
void codac::VIBesFigMap::add_trajectory | ( | const TrajectoryVector * | traj, |
const std::string & | name, | ||
int | index_x, | ||
int | index_y, | ||
const std::string & | color = DEFAULT_TRAJMAP_COLOR, | ||
bool | vehicle_display = DEFAULT_VEHICLE_DISPLAY_ON_EACH_TRAJ ) |
Adds a trajectory vector object (x,y) to this figure.
The heading information may be required for vehicle display. Here it will be simulated from the two components of the traj object. If available, use the other add_trajectory method.
traj | a const pointer to a TrajectoryVector object to be displayed |
name | a name to identify this object |
index_x | integer reference for the x-horizontal state component |
index_y | integer reference for the y-horizontal state component |
color | an optional constant color for this object |
vehicle_display | an optional boolean parameter to display a vehicle at the end of the trajectory |
void codac::VIBesFigMap::add_trajectory | ( | const TrajectoryVector * | traj, |
const std::string & | name, | ||
int | index_x, | ||
int | index_y, | ||
int | index_heading, | ||
const std::string & | color = DEFAULT_TRAJMAP_COLOR, | ||
bool | vehicle_display = DEFAULT_VEHICLE_DISPLAY_ON_EACH_TRAJ ) |
Adds a trajectory vector object (x,y,heading) to this figure.
The heading information may be required for vehicle display. If not available, use the other add_trajectory method.
traj | a const pointer to a TrajectoryVector object to be displayed |
name | a name to identify this object |
index_x | integer reference for the x-horizontal state component |
index_y | integer reference for the y-horizontal state component |
index_heading | integer reference for the heading state component |
color | an optional constant color for this object |
vehicle_display | an optional boolean parameter to display a vehicle at the end of the trajectory |
void codac::VIBesFigMap::set_trajectory_name | ( | const TrajectoryVector * | traj, |
const std::string & | name ) |
Sets a new name for a trajectory.
traj | the const pointer to the TrajectoryVector object to be renamed |
name | a new name to identify this object |
void codac::VIBesFigMap::set_trajectory_color | ( | const TrajectoryVector * | traj, |
const std::string & | color ) |
Sets constant color properties for a given trajectory.
traj | the const pointer to the TrajectoryVector object for which the color will be set |
color | a color to draw this trajectory |
void codac::VIBesFigMap::set_trajectory_color | ( | const TrajectoryVector * | traj, |
const ColorMap & | colormap, | ||
const Trajectory * | traj_colormap = nullptr ) |
Sets a color map for a given trajectory.
traj | the const pointer to the TrajectoryVector object for which the color will be set |
colormap | a ColorMap to draw this trajectory with time evolving colors |
traj_colormap | an optional const pointer to a Trajectory object in order to have a custom color evolution instead of a linear time evolving color |
void codac::VIBesFigMap::set_vehicle_display | ( | const TrajectoryVector * | traj, |
bool | vehicle_display ) |
Displays a vehicle at the end of a trajectory.
traj | the const pointer to the TrajectoryVector object for which the vehicle will be drawn |
vehicle_display | boolean parameter |
void codac::VIBesFigMap::remove_trajectory | ( | const TrajectoryVector * | traj | ) |
Removes a trajectory from this figure.
traj | the const pointer to the TrajectoryVector object to be removed |
void codac::VIBesFigMap::draw_vehicle | ( | const Vector & | pose, |
float | size = -1 ) |
Draws a vehicle with a given pose.
pose | vector (x,y[,heading]) describing robot's pose (2d or 3d) |
size | optional robot size (-1 = size of main vehicle by default) |
void codac::VIBesFigMap::draw_vehicle | ( | const Vector & | pose, |
const vibes::Params & | params, | ||
float | size = -1 ) |
Draws a vehicle with a given pose.
pose | vector (x,y[,heading]) describing robot's pose (2d or 3d) |
params | VIBes parameters related to the vehicle (for groups) |
size | optional robot size (-1 = size of main vehicle by default) |
void codac::VIBesFigMap::draw_vehicle | ( | double | t, |
const TrajectoryVector * | traj, | ||
float | size = -1 ) |
Draws a vehicle on top of its trajectory.
t | temporal key of the vehicle state to be drawn |
traj | the const pointer to the related TrajectoryVector object |
size | optional robot size (-1 = size of main vehicle by default) |
void codac::VIBesFigMap::draw_vehicle | ( | double | t, |
const TrajectoryVector * | traj, | ||
const vibes::Params & | params, | ||
float | size = -1 ) |
Draws a vehicle on top of its trajectory.
t | temporal key of the vehicle state to be drawn |
traj | the const pointer to the related TrajectoryVector object |
params | VIBes parameters related to the vehicle (for groups) |
size | optional robot size (-1 = size of main vehicle by default) |
void codac::VIBesFigMap::add_beacon | ( | const Beacon & | beacon, |
const std::string & | color = DEFAULT_BEACON_COLOR ) |
Adds a Beacon object to the map.
The width of the displayed box is related to the uncertainty of the Beacon object.
beacon | a const reference to the Beacon object to be drawn |
color | optional color of the beacon |
void codac::VIBesFigMap::add_beacon | ( | const IntervalVector & | beacon, |
const std::string & | color = DEFAULT_BEACON_COLOR ) |
Adds a Beacon object to the map (from an IntervalVector)
The width of the displayed box is related to the uncertainty of the IntervalVector object.
beacon | a const reference to the IntervalVector object to be drawn |
color | optional color of the beacon |
void codac::VIBesFigMap::add_beacon | ( | const Beacon & | beacon, |
double | width, | ||
const std::string & | color = DEFAULT_BEACON_COLOR ) |
Adds a Beacon object to the map with a specific width.
beacon | a const reference to the Beacon object to be drawn |
width | the real width of the squared beacon |
color | optional color of the beacon |
void codac::VIBesFigMap::add_beacon | ( | const Vector & | beacon, |
double | width, | ||
const std::string & | color = DEFAULT_BEACON_COLOR ) |
Adds a Beacon object to the map with a specific width (from a Vector)
beacon | a const reference to the Vector object to be drawn |
width | the real width of the squared beacon |
color | optional color of the beacon |
void codac::VIBesFigMap::add_beacons | ( | const std::vector< Beacon > & | v_beacons, |
const std::string & | color = DEFAULT_BEACON_COLOR ) |
Adds a set of Beacon objects to the map.
The width of the displayed boxes is related to the uncertainty of the Beacon objects.
v_beacons | a vector of const references to Beacon objects to be drawn |
color | optional color of the beacons |
void codac::VIBesFigMap::add_beacons | ( | const std::vector< Beacon > & | v_beacons, |
double | width, | ||
const std::string & | color = DEFAULT_BEACON_COLOR ) |
Adds a set of Beacon objects to the map with a specific width.
v_beacons | a vector of const references to Beacon objects to be drawn |
width | the real width of the squared beacons |
color | optional color of the beacons |
void codac::VIBesFigMap::add_landmarks | ( | const std::vector< IntervalVector > & | v_m, |
const std::string & | color = DEFAULT_BEACON_COLOR ) |
Adds a set of boxed landmarks to the map.
v_m | a vector of boxes to be drawn |
color | optional color of the beacons |
void codac::VIBesFigMap::add_landmarks | ( | const std::vector< Vector > & | v_m, |
double | width, | ||
const std::string & | color = DEFAULT_BEACON_COLOR ) |
Adds a set of landmarks to the map with a specific width.
v_m | a vector of 2d positions of landmarks |
width | the width of the squared beacons |
color | optional color of the beacons |
void codac::VIBesFigMap::add_observation | ( | const IntervalVector & | obs, |
const Vector & | pose, | ||
const std::string & | color = DEFAULT_OBS_COLOR ) |
Adds a range-and-bearing uncertain observation to the map, in a static context.
The observation is a 2d interval vector: (range,bearing). It is associated with the pose of a robot, from which the observation has been made.
obs | the 2d interval vector enclosing the measurement |
pose | the related 3d Vector object representing the pose (x,y,heading) |
color | optional color of the observation |
void codac::VIBesFigMap::add_observations | ( | const std::vector< IntervalVector > & | v_obs, |
const Vector & | pose, | ||
const std::string & | color = DEFAULT_OBS_COLOR ) |
Adds a set of range-and-bearing uncertain observations to the map, in a static context.
The observation is a 2d interval vector: (range,bearing). It is associated with the pose of a robot, from which the observation has been made.
v_obs | a vector of 2d interval vectors enclosing the measurements |
pose | the related 3d Vector object representing the pose (x,y,heading) |
color | optional color of the observation |
void codac::VIBesFigMap::add_observation | ( | const IntervalVector & | obs, |
const TrajectoryVector * | traj, | ||
const std::string & | color = DEFAULT_OBS_COLOR ) |
Adds a range-and-bearing uncertain observation to the map, in a dynamic context.
The observation is a 3d interval vector: (time,range,bearing). It is associated with the trajectory of a robot, from which the observation has been made.
obs | the 3d interval vector enclosing the measurement |
traj | the const pointer to the related TrajectoryVector object |
color | optional color of the observation |
void codac::VIBesFigMap::add_observations | ( | const std::vector< IntervalVector > & | v_obs, |
const TrajectoryVector * | traj, | ||
const std::string & | color = DEFAULT_OBS_COLOR ) |
Adds a set of range-and-bearing uncertain observations to the map, in a dynamic context.
The observation is a 3d interval vector: (time,range,bearing). It is associated with the trajectory of a robot, from which the observation has been made.
v_obs | a vector of 3d interval vectors enclosing the measurements |
traj | the const pointer to the related TrajectoryVector object |
color | optional color of the observation |
double codac::VIBesFigMap::heading | ( | double | t, |
const TrajectoryVector * | traj ) const |
Returns actual or estimated heading related to some TrajectoryVector at t.
If one component of the traj object depicts the heading, then it is evaluated. Otherwise, some approximation is made around t in order to provide an estimate of the heading.
t | time input of evaluation |
traj | the const pointer to the related TrajectoryVector object |
|
protected |
Draws a tube.
tube | the const pointer to the TubeVector object to be drawn |
|
protected |
Draws the background of a tube.
Backgrounds are previous versions of the tubes, before their last contraction. This is useful to highlight on the map the improvement provided by the contractions.
tube | the const pointer to the TubeVector object to be drawn |
|
protected |
Draws a trajectory.
traj | the const pointer to the TrajectoryVector object to be drawn |
points_size | optional size of points, 0 by default (line display instead of a list of points) |
|
protected |
Draws the slices of a tube.
tube | the const pointer to the TubeVector object to be drawn |
|
protected |
Draws a Beacon object.
The width of the displayed box is related to the uncertainty of the Beacon object.
beacon | a const reference to the Beacon object to be drawn |
color | color of the beacon |
params | VIBes parameters related to the beacon |
|
protected |
Draws a Beacon object with a specific width.
beacon | a const reference to the Beacon object to be drawn |
width | the real width of the squared beacon |
color | color of the beacon |
params | VIBes parameters related to the beacon |
|
protected |
Draws a range-and-bearing uncertain observation on the map in static situation.
The observation is a 2d interval vector: (range,bearing). It is associated with the pose of a robot, from which the observation has been made.
obs | the 2d interval vector enclosing the measurement |
pose | the related 3d Vector object representing the pose (x,y,heading) |
color | color of the observation |
params | VIBes parameters related to the observation |
|
protected |
Draws a range-and-bearing uncertain observation on the map in dynamic situation.
The observation is a 3d interval vector: (time,range,bearing). It is associated with the trajectory of a robot, from which the observation has been made.
obs | the 3d interval vector enclosing the measurement |
traj | the const pointer to the related TrajectoryVector object |
color | color of the observation |
params | VIBes parameters related to the observation |