codac 1.5.6
Loading...
Searching...
No Matches
codac::VIBesFigMap Class Reference

Two-dimensional graphical item to project dynamical items (tubes, trajectories, etc.) on a map. More...

#include <codac_VIBesFigMap.h>

Inheritance diagram for codac::VIBesFigMap:
Collaboration diagram for codac::VIBesFigMap:

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 &params, 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 &params, 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 &params)
 Draws a box.
 
void draw_box (const IntervalVector &box, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a box.
 
void draw_boxes (const std::vector< IntervalVector > &v_boxes, const vibes::Params &params)
 Draws a set of boxes.
 
void draw_boxes (const std::vector< IntervalVector > &v_boxes, const std::string &color="", const vibes::Params &params=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 &params)
 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 &params=vibes::Params())
 Draws a line of points.
 
void draw_line (const std::vector< std::vector< double > > &v_pts, const vibes::Params &params)
 Draws a line of points.
 
void draw_line (const std::vector< std::vector< double > > &v_pts, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a line of points.
 
void draw_circle (double x, double y, double r, const vibes::Params &params)
 Draws a circle.
 
void draw_circle (double x, double y, double r, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a circle.
 
void draw_ring (double x, double y, const Interval &r, const vibes::Params &params)
 Draws a ring.
 
void draw_ring (double x, double y, const Interval &r, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a ring.
 
void draw_pie (double x, double y, const Interval &r, const Interval &theta, const vibes::Params &params)
 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 &params=vibes::Params())
 Draws a pie: radial portion of a ring.
 
void draw_edge (const ThickEdge &e, const vibes::Params &params)
 Draws an edge.
 
void draw_edge (const ThickEdge &e, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws an edge.
 
void draw_polygon (const Polygon &p, const vibes::Params &params)
 Draws a polygon.
 
void draw_polygon (const Polygon &p, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a polygon.
 
void draw_polygons (const std::vector< ConvexPolygon > &v_p, const vibes::Params &params)
 Draws a set of polygons.
 
void draw_polygons (const std::vector< ConvexPolygon > &v_p, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a set of polygons.
 
void draw_polygons (const std::vector< ConvexPolygon > &v_p, const ColorMap &color_map, const vibes::Params &params=vibes::Params())
 Draws a set of polygons.
 
void draw_point (const ThickPoint &p, const vibes::Params &params)
 Draws a point.
 
void draw_point (const ThickPoint &p, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a point.
 
void draw_point (const ThickPoint &p, float size, const vibes::Params &params)
 Draws a point.
 
void draw_point (const ThickPoint &p, float size, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a point.
 
void draw_points (const std::vector< ThickPoint > &v_pts, float size, const vibes::Params &params)
 Draws a set of points.
 
void draw_points (const std::vector< ThickPoint > &v_pts, float size, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a set of points.
 
void draw_vehicle (double x, double y, double heading, double size, const vibes::Params &params)
 Draws a vehicle.
 
void draw_vehicle (double x, double y, double heading, double size, const std::string &color="", const vibes::Params &params=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 &params)
 Draws a Beacon object.
 
void draw_beacon (const Beacon &beacon, double width, const std::string &color, const vibes::Params &params)
 Draws a Beacon object with a specific width.
 
void draw_observation (const IntervalVector &obs, const Vector &pose, const std::string &color="", const vibes::Params &params=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 &params=vibes::Params())
 Draws a range-and-bearing uncertain observation on the map in dynamic situation.
 

Protected Attributes

std::map< const TubeVector *, FigMapTubeParamsm_map_tubes
 map of Tube objects to be displayed, together with parameters
 
std::map< const TrajectoryVector *, FigMapTrajParamsm_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}]\).
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ VIBesFigMap()

codac::VIBesFigMap::VIBesFigMap ( const std::string & fig_name)

Creates a VIBesFigMap.

Parameters
fig_namename of the figure as displayed in the window title

Member Function Documentation

◆ restrict_tdomain()

void codac::VIBesFigMap::restrict_tdomain ( const Interval & restricted_tdomain)

Restricts the display of the dynamical items to a part of their tdomain only.

Parameters
restricted_tdomainsubset of the temporal domain of the referenced items

◆ enable_tubes_backgrounds()

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.

Parameters
enableboolean parameter, true by default

◆ show()

void codac::VIBesFigMap::show ( float robot_size)

Displays this figure with a custom robot size.

Parameters
robot_sizelength of the displayed robot

◆ set_tube_max_disp_slices()

void codac::VIBesFigMap::set_tube_max_disp_slices ( int max)

Limits the number of slices to be displayed for tubes.

Parameters
maxthe maximum number of slices

◆ set_traj_max_disp_points()

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).

Parameters
maxthe maximum number of points

◆ smooth_tube_drawing()

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.

Parameters
smoothtrue for smooth display

◆ add_tube()

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.

Parameters
tubea const pointer to a TubeVector object to be displayed
namea name to identify this object
index_xinteger reference for the x-horizontal state component
index_yinteger reference for the y-horizontal state component

◆ set_tube_name()

void codac::VIBesFigMap::set_tube_name ( const TubeVector * tube,
const std::string & name )

Sets a new name for a tube.

Parameters
tubethe const pointer to the TubeVector object to be renamed
namea new name to identify this object

◆ set_tube_color() [1/2]

void codac::VIBesFigMap::set_tube_color ( const TubeVector * tube,
const std::string & color )

Sets constant color properties for a given tube.

Parameters
tubethe const pointer to the TubeVector object for which the color will be set
colora color to draw this tube

◆ set_tube_color() [2/2]

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.

Parameters
tubethe const pointer to the TubeVector object for which the color will be set
colormapa ColorMap to draw this tube with time evolving colors
traj_colormapan optional const pointer to a Trajectory object in order to have a custom color evolution instead of a linear time evolving color

◆ remove_tube()

void codac::VIBesFigMap::remove_tube ( const TubeVector * tube)

Removes a tube from this figure.

Todo
automatically clear the figure (for now, the tube is only removed from the list of objects to be shown afterwards)
Note
the object will not be deleted
Parameters
tubethe const pointer to the TubeVector object to be removed

◆ add_trajectory() [1/2]

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.

Parameters
traja const pointer to a TrajectoryVector object to be displayed
namea name to identify this object
index_xinteger reference for the x-horizontal state component
index_yinteger reference for the y-horizontal state component
coloran optional constant color for this object
vehicle_displayan optional boolean parameter to display a vehicle at the end of the trajectory

◆ add_trajectory() [2/2]

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.

Parameters
traja const pointer to a TrajectoryVector object to be displayed
namea name to identify this object
index_xinteger reference for the x-horizontal state component
index_yinteger reference for the y-horizontal state component
index_headinginteger reference for the heading state component
coloran optional constant color for this object
vehicle_displayan optional boolean parameter to display a vehicle at the end of the trajectory

◆ set_trajectory_name()

void codac::VIBesFigMap::set_trajectory_name ( const TrajectoryVector * traj,
const std::string & name )

Sets a new name for a trajectory.

Parameters
trajthe const pointer to the TrajectoryVector object to be renamed
namea new name to identify this object

◆ set_trajectory_color() [1/2]

void codac::VIBesFigMap::set_trajectory_color ( const TrajectoryVector * traj,
const std::string & color )

Sets constant color properties for a given trajectory.

Parameters
trajthe const pointer to the TrajectoryVector object for which the color will be set
colora color to draw this trajectory

◆ set_trajectory_color() [2/2]

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.

Parameters
trajthe const pointer to the TrajectoryVector object for which the color will be set
colormapa ColorMap to draw this trajectory with time evolving colors
traj_colormapan optional const pointer to a Trajectory object in order to have a custom color evolution instead of a linear time evolving color

◆ set_vehicle_display()

void codac::VIBesFigMap::set_vehicle_display ( const TrajectoryVector * traj,
bool vehicle_display )

Displays a vehicle at the end of a trajectory.

Parameters
trajthe const pointer to the TrajectoryVector object for which the vehicle will be drawn
vehicle_displayboolean parameter

◆ remove_trajectory()

void codac::VIBesFigMap::remove_trajectory ( const TrajectoryVector * traj)

Removes a trajectory from this figure.

Todo
automatically clear the figure (for now, the trajectory is only removed from the list of objects to be shown afterwards)
Note
the object will not be deleted
Parameters
trajthe const pointer to the TrajectoryVector object to be removed

◆ draw_vehicle() [1/4]

void codac::VIBesFigMap::draw_vehicle ( const Vector & pose,
float size = -1 )

Draws a vehicle with a given pose.

Parameters
posevector (x,y[,heading]) describing robot's pose (2d or 3d)
sizeoptional robot size (-1 = size of main vehicle by default)

◆ draw_vehicle() [2/4]

void codac::VIBesFigMap::draw_vehicle ( const Vector & pose,
const vibes::Params & params,
float size = -1 )

Draws a vehicle with a given pose.

Parameters
posevector (x,y[,heading]) describing robot's pose (2d or 3d)
paramsVIBes parameters related to the vehicle (for groups)
sizeoptional robot size (-1 = size of main vehicle by default)

◆ draw_vehicle() [3/4]

void codac::VIBesFigMap::draw_vehicle ( double t,
const TrajectoryVector * traj,
float size = -1 )

Draws a vehicle on top of its trajectory.

Parameters
ttemporal key of the vehicle state to be drawn
trajthe const pointer to the related TrajectoryVector object
sizeoptional robot size (-1 = size of main vehicle by default)

◆ draw_vehicle() [4/4]

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.

Parameters
ttemporal key of the vehicle state to be drawn
trajthe const pointer to the related TrajectoryVector object
paramsVIBes parameters related to the vehicle (for groups)
sizeoptional robot size (-1 = size of main vehicle by default)

◆ add_beacon() [1/4]

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.

Parameters
beacona const reference to the Beacon object to be drawn
coloroptional color of the beacon

◆ add_beacon() [2/4]

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.

Parameters
beacona const reference to the IntervalVector object to be drawn
coloroptional color of the beacon

◆ add_beacon() [3/4]

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.

Parameters
beacona const reference to the Beacon object to be drawn
widththe real width of the squared beacon
coloroptional color of the beacon

◆ add_beacon() [4/4]

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)

Parameters
beacona const reference to the Vector object to be drawn
widththe real width of the squared beacon
coloroptional color of the beacon

◆ add_beacons() [1/2]

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.

Deprecated
to be removed
Parameters
v_beaconsa vector of const references to Beacon objects to be drawn
coloroptional color of the beacons

◆ add_beacons() [2/2]

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.

Deprecated
to be removed
Parameters
v_beaconsa vector of const references to Beacon objects to be drawn
widththe real width of the squared beacons
coloroptional color of the beacons

◆ add_landmarks() [1/2]

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.

Parameters
v_ma vector of boxes to be drawn
coloroptional color of the beacons

◆ add_landmarks() [2/2]

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.

Parameters
v_ma vector of 2d positions of landmarks
widththe width of the squared beacons
coloroptional color of the beacons

◆ add_observation() [1/2]

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.

Parameters
obsthe 2d interval vector enclosing the measurement
posethe related 3d Vector object representing the pose (x,y,heading)
coloroptional color of the observation

◆ add_observations() [1/2]

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.

Parameters
v_obsa vector of 2d interval vectors enclosing the measurements
posethe related 3d Vector object representing the pose (x,y,heading)
coloroptional color of the observation

◆ add_observation() [2/2]

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.

Parameters
obsthe 3d interval vector enclosing the measurement
trajthe const pointer to the related TrajectoryVector object
coloroptional color of the observation

◆ add_observations() [2/2]

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.

Parameters
v_obsa vector of 3d interval vectors enclosing the measurements
trajthe const pointer to the related TrajectoryVector object
coloroptional color of the observation

◆ heading()

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.

Parameters
ttime input of evaluation
trajthe const pointer to the related TrajectoryVector object
Returns
heading in radians

◆ draw_tube()

const IntervalVector codac::VIBesFigMap::draw_tube ( const TubeVector * tube)
protected

Draws a tube.

Parameters
tubethe const pointer to the TubeVector object to be drawn
Returns
the projected boxed envelope of the tube (used for figure calibration)

◆ draw_tube_background()

const IntervalVector codac::VIBesFigMap::draw_tube_background ( const TubeVector * tube)
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.

Parameters
tubethe const pointer to the TubeVector object to be drawn
Returns
the projected boxed envelope of the tube background (used for figure calibration)

◆ draw_trajectory()

const IntervalVector codac::VIBesFigMap::draw_trajectory ( const TrajectoryVector * traj,
float points_size = 0. )
protected

Draws a trajectory.

Todo
ColorMap associated to point display (for now: constant color for points)
Parameters
trajthe const pointer to the TrajectoryVector object to be drawn
points_sizeoptional size of points, 0 by default (line display instead of a list of points)
Returns
the projected boxed envelope of the trajectory (used for figure calibration)

◆ draw_slices()

void codac::VIBesFigMap::draw_slices ( const TubeVector * tube)
protected

Draws the slices of a tube.

Parameters
tubethe const pointer to the TubeVector object to be drawn

◆ draw_beacon() [1/2]

void codac::VIBesFigMap::draw_beacon ( const Beacon & beacon,
const std::string & color,
const vibes::Params & params )
protected

Draws a Beacon object.

The width of the displayed box is related to the uncertainty of the Beacon object.

Parameters
beacona const reference to the Beacon object to be drawn
colorcolor of the beacon
paramsVIBes parameters related to the beacon

◆ draw_beacon() [2/2]

void codac::VIBesFigMap::draw_beacon ( const Beacon & beacon,
double width,
const std::string & color,
const vibes::Params & params )
protected

Draws a Beacon object with a specific width.

Parameters
beacona const reference to the Beacon object to be drawn
widththe real width of the squared beacon
colorcolor of the beacon
paramsVIBes parameters related to the beacon

◆ draw_observation() [1/2]

void codac::VIBesFigMap::draw_observation ( const IntervalVector & obs,
const Vector & pose,
const std::string & color = "",
const vibes::Params & params = vibes::Params() )
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.

Parameters
obsthe 2d interval vector enclosing the measurement
posethe related 3d Vector object representing the pose (x,y,heading)
colorcolor of the observation
paramsVIBes parameters related to the observation

◆ draw_observation() [2/2]

void codac::VIBesFigMap::draw_observation ( const IntervalVector & obs,
const TrajectoryVector * traj,
const std::string & color = "",
const vibes::Params & params = vibes::Params() )
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.

Parameters
obsthe 3d interval vector enclosing the measurement
trajthe const pointer to the related TrajectoryVector object
colorcolor of the observation
paramsVIBes parameters related to the observation

The documentation for this class was generated from the following file: