12#ifndef __CODAC_VIBESFIGMAP_H__
13#define __CODAC_VIBESFIGMAP_H__
22#include <codac_Beacon.h>
27 #define TRAJ_MAX_NB_DISPLAYED_POINTS 2000
28 #define TUBE_MAX_NB_DISPLAYED_SLICES 2000
31 #define DEFAULT_BEACON_COLOR "#D65A00[#FFB93C]"
32 #define DEFAULT_TRAJMAP_COLOR "#276279"
33 #define DEFAULT_MAPBCKGRND_COLOR "#d2d2d2[#d2d2d2]"
34 #define DEFAULT_OBS_COLOR "gray"
35 #define DEFAULT_VEHICLE_DISPLAY_ON_EACH_TRAJ true
80 void no_axis_limits();
92 void show(
float robot_size);
190 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);
206 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);
273 void draw_vehicle(
const Vector& pose,
const vibes::Params& params,
float size = -1);
302 void add_beacon(
const Beacon& beacon,
const std::string& color = DEFAULT_BEACON_COLOR);
312 void add_beacon(
const IntervalVector& beacon,
const std::string& color = DEFAULT_BEACON_COLOR);
321 void add_beacon(
const Beacon& beacon,
double width,
const std::string& color = DEFAULT_BEACON_COLOR);
330 void add_beacon(
const Vector& beacon,
double width,
const std::string& color = DEFAULT_BEACON_COLOR);
342 void add_beacons(
const std::vector<Beacon>& v_beacons,
const std::string& color = DEFAULT_BEACON_COLOR);
353 void add_beacons(
const std::vector<Beacon>& v_beacons,
double width,
const std::string& color = DEFAULT_BEACON_COLOR);
361 void add_landmarks(
const std::vector<IntervalVector>& v_m,
const std::string& color = DEFAULT_BEACON_COLOR);
370 void add_landmarks(
const std::vector<Vector>& v_m,
double width,
const std::string& color = DEFAULT_BEACON_COLOR);
383 void add_observation(
const IntervalVector& obs,
const Vector& pose,
const std::string& color = DEFAULT_OBS_COLOR);
396 void add_observations(
const std::vector<IntervalVector>& v_obs,
const Vector& pose,
const std::string& color = DEFAULT_OBS_COLOR);
487 void draw_beacon(
const Beacon& beacon,
const std::string& color,
const vibes::Params& params);
497 void draw_beacon(
const Beacon& beacon,
double width,
const std::string& color,
const vibes::Params& params);
511 void draw_observation(
const IntervalVector& obs,
const Vector& pose,
const std::string& color =
"",
const vibes::Params& params = vibes::Params());
564 bool _no_axis_limits =
false;
Associates colors to a range of values.
Definition codac_ColorMap.h:32
One dimensional trajectory , defined as a temporal map of values.
Definition codac_Trajectory.h:35
n-dimensional trajectory , defined as a temporal map of vector values
Definition codac_TrajectoryVector.h:38
One dimensional tube , defined as an interval of scalar trajectories.
Definition codac_Tube.h:48
n-dimensional tube , defined as an interval of n-dimensional trajectories
Definition codac_TubeVector.h:39
Two-dimensional graphical item based on the VIBes viewer.
Definition codac_VIBesFig.h:38
Two-dimensional graphical item to project dynamical items (tubes, trajectories, etc....
Definition codac_VIBesFigMap.h:46
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 set_trajectory_color(const TrajectoryVector *traj, const std::string &color)
Sets constant color properties for a given trajectory.
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 draw_vehicle(double t, const TrajectoryVector *traj, float size=-1)
Draws a vehicle on top of its trajectory.
bool m_draw_tubes_backgrounds
if true, will highlight tubes contractions
Definition codac_VIBesFigMap.h:561
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 set_tube_name(const TubeVector *tube, const std::string &name)
Sets a new name for a tube.
void draw_vehicle(const Vector &pose, const vibes::Params ¶ms, float size=-1)
Draws a vehicle with a given pose.
void draw_vehicle(const Vector &pose, float size=-1)
Draws a vehicle with a given pose.
~VIBesFigMap()
VIBesFigMap destructor.
void show(float robot_size)
Displays this figure with a custom robot size.
const IntervalVector draw_trajectory(const TrajectoryVector *traj, float points_size=0.)
Draws a trajectory.
void smooth_tube_drawing(bool smooth)
Enables the smoothing of tubes.
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 set_tube_color(const TubeVector *tube, const std::string &color)
Sets constant color properties for a given tube.
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.
void set_traj_max_disp_points(int max)
Limits the number of points to be displayed for trajectories.
void add_tube(const TubeVector *tube, const std::string &name, int index_x, int index_y)
Adds a tube vector object to this figure.
float m_robot_size
if 0, no robot display
Definition codac_VIBesFigMap.h:563
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 remove_tube(const TubeVector *tube)
Removes a tube from this figure.
void enable_tubes_backgrounds(bool enable=true)
Enables the display of previous versions of the tubes, in order to highlight the contractions of thes...
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.
double heading(double t, const TrajectoryVector *traj) const
Returns actual or estimated heading related to some TrajectoryVector at t.
void restrict_tdomain(const Interval &restricted_tdomain)
Restricts the display of the dynamical items to a part of their tdomain only.
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.
unsigned int m_tube_max_nb_disp_slices
limit for slices display
Definition codac_VIBesFigMap.h:566
void set_tube_color(const TubeVector *tube, const ColorMap &colormap, const Trajectory *traj_colormap=nullptr)
Sets a color map for a given tube.
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_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_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 remove_trajectory(const TrajectoryVector *traj)
Removes a trajectory from this figure.
void add_beacon(const IntervalVector &beacon, const std::string &color=DEFAULT_BEACON_COLOR)
Adds a Beacon object to the map (from an IntervalVector)
std::map< const TubeVector *, FigMapTubeParams > m_map_tubes
map of Tube objects to be displayed, together with parameters
Definition codac_VIBesFigMap.h:557
VIBesFigMap(const std::string &fig_name)
Creates a VIBesFigMap.
void set_trajectory_name(const TrajectoryVector *traj, const std::string &name)
Sets a new name for a trajectory.
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 show()
Displays this figure.
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 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 draw_slices(const TubeVector *tube)
Draws the slices of a tube.
void draw_vehicle(double t, const TrajectoryVector *traj, const vibes::Params ¶ms, float size=-1)
Draws a vehicle on top of its trajectory.
const IntervalVector draw_tube(const TubeVector *tube)
Draws a tube.
void set_tube_max_disp_slices(int max)
Limits the number of slices to be displayed for tubes.
unsigned int m_traj_max_nb_disp_points
limit for traj points display
Definition codac_VIBesFigMap.h:567
std::map< const TrajectoryVector *, FigMapTrajParams > m_map_trajs
map of Trajectory objects to be displayed, together with parameters
Definition codac_VIBesFigMap.h:558
Interval m_restricted_tdomain
restricts the display to a part of the temporal domain
Definition codac_VIBesFigMap.h:560
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.
const IntervalVector draw_tube_background(const TubeVector *tube)
Draws the background of a tube.
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.
void add_beacon(const Beacon &beacon, const std::string &color=DEFAULT_BEACON_COLOR)
Adds a Beacon object to the map.
void draw_beacon(const Beacon &beacon, const std::string &color, const vibes::Params ¶ms)
Draws a Beacon object.
bool m_smooth_drawing
if true, a smooth rendering of tubes will be done
Definition codac_VIBesFigMap.h:562
FixPoint of a separator The fixpoint of a separator is computed by calling the "::"separate function ...
Definition codac_capd_helpers.h:9
const Trajectory max(const Trajectory &y, const Trajectory &x)
Specifies some parameters related to a Trajectory display.
Definition codac_VIBesFigMap.h:549
std::pair< ColorMap, const Trajectory * > color_map
custom colormap of the trajectory
Definition codac_VIBesFigMap.h:552
bool vehicle_display
boolean for vehicle display
Definition codac_VIBesFigMap.h:554
int index_heading
integer references for state components ; -1: not defined
Definition codac_VIBesFigMap.h:553
std::string color
constant color of the trajectory
Definition codac_VIBesFigMap.h:551
std::string name
human readable identifier of the tube
Definition codac_VIBesFigMap.h:550
Specifies some parameters related to a Tube display.
Definition codac_VIBesFigMap.h:535
int index_y
integer references for state components
Definition codac_VIBesFigMap.h:541
std::string name
human readable identifier of the tube
Definition codac_VIBesFigMap.h:536
std::pair< ColorMap, const Trajectory * > color_map
custom colormap of the tube
Definition codac_VIBesFigMap.h:538
const Tube * tube_y_copy
to display previous values in background, before any new contraction
Definition codac_VIBesFigMap.h:539
bool from_first_to_last
order of slices display (each one on top of the next/previous one)
Definition codac_VIBesFigMap.h:540
std::string color
constant color of the tube
Definition codac_VIBesFigMap.h:537