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 90 void show(
float robot_size);
188 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);
204 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);
271 void draw_vehicle(
const Vector& pose,
const vibes::Params& params,
float size = -1);
300 void add_beacon(
const Beacon& beacon,
const std::string& color = DEFAULT_BEACON_COLOR);
310 void add_beacon(
const IntervalVector& beacon,
const std::string& color = DEFAULT_BEACON_COLOR);
319 void add_beacon(
const Beacon& beacon,
double width,
const std::string& color = DEFAULT_BEACON_COLOR);
328 void add_beacon(
const Vector& beacon,
double width,
const std::string& color = DEFAULT_BEACON_COLOR);
340 void add_beacons(
const std::vector<Beacon>& v_beacons,
const std::string& color = DEFAULT_BEACON_COLOR);
351 void add_beacons(
const std::vector<Beacon>& v_beacons,
double width,
const std::string& color = DEFAULT_BEACON_COLOR);
359 void add_landmarks(
const std::vector<IntervalVector>& v_m,
const std::string& color = DEFAULT_BEACON_COLOR);
368 void add_landmarks(
const std::vector<Vector>& v_m,
double width,
const std::string& color = DEFAULT_BEACON_COLOR);
381 void add_observation(
const IntervalVector& obs,
const Vector& pose,
const std::string& color = DEFAULT_OBS_COLOR);
394 void add_observations(
const std::vector<IntervalVector>& v_obs,
const Vector& pose,
const std::string& color = DEFAULT_OBS_COLOR);
485 void draw_beacon(
const Beacon& beacon,
const std::string& color,
const vibes::Params& params);
495 void draw_beacon(
const Beacon& beacon,
double width,
const std::string& color,
const vibes::Params& params);
509 void draw_observation(
const IntervalVector& obs,
const Vector& pose,
const std::string& color =
"",
const vibes::Params& params = vibes::Params());
523 void draw_observation(
const IntervalVector& obs,
const TrajectoryVector *traj,
const std::string& color =
"",
const vibes::Params& params = vibes::Params());
535 std::string color =
"";
549 std::string color =
"";
552 bool vehicle_display = DEFAULT_VEHICLE_DISPLAY_ON_EACH_TRAJ;
const Tube * tube_y_copy
to display previous values in background, before any new contraction
Definition: codac_VIBesFigMap.h:537
void set_tube_max_disp_slices(int max)
Limits the number of slices to be displayed for tubes.
FixPoint of a separator The fixpoint of a separator is computed by calling the "::"separate function ...
Definition: codac_capd_helpers.h:9
void set_traj_max_disp_points(int max)
Limits the number of points to be displayed for trajectories.
void set_trajectory_color(const TrajectoryVector *traj, const std::string &color)
Sets constant color properties for a given trajectory.
void restrict_tdomain(const Interval &restricted_tdomain)
Restricts the display of the dynamical items to a part of their tdomain only.
void smooth_tube_drawing(bool smooth)
Enables the smoothing of tubes.
const Trajectory max(const Trajectory &y, const Trajectory &x)
One dimensional trajectory , defined as a temporal map of values.
Definition: codac_Trajectory.h:34
unsigned int m_traj_max_nb_disp_points
limit for traj points display
Definition: codac_VIBesFigMap.h:564
Specifies some parameters related to a Trajectory display.
Definition: codac_VIBesFigMap.h:546
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.
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.
n-dimensional trajectory , defined as a temporal map of vector values
Definition: codac_TrajectoryVector.h:37
void add_beacon(const Beacon &beacon, const std::string &color=DEFAULT_BEACON_COLOR)
Adds a Beacon object to the map.
void enable_tubes_backgrounds(bool enable=true)
Enables the display of previous versions of the tubes, in order to highlight the contractions of thes...
Associates colors to a range of values.
Definition: codac_ColorMap.h:31
n-dimensional tube , defined as an interval of n-dimensional trajectories
Definition: codac_TubeVector.h:38
void set_tube_color(const TubeVector *tube, const std::string &color)
Sets constant color properties for a given tube.
void set_trajectory_name(const TrajectoryVector *traj, const std::string &name)
Sets a new name for a trajectory.
double heading(double t, const TrajectoryVector *traj) const
Returns actual or estimated heading related to some TrajectoryVector at t.
void set_tube_name(const TubeVector *tube, const std::string &name)
Sets a new name for a tube.
One dimensional tube , defined as an interval of scalar trajectories.
Definition: codac_Tube.h:47
void draw_vehicle(const Vector &pose, float size=-1)
Draws a vehicle with a given pose.
void remove_trajectory(const TrajectoryVector *traj)
Removes a trajectory from this figure.
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_tube(const TubeVector *tube, const std::string &name, int index_x, int index_y)
Adds a tube vector object to this figure.
bool from_first_to_last
order of slices display (each one on top of the next/previous one)
Definition: codac_VIBesFigMap.h:538
std::string name
human readable identifier of the tube
Definition: codac_VIBesFigMap.h:548
bool m_smooth_drawing
if true, a smooth rendering of tubes will be done
Definition: codac_VIBesFigMap.h:560
Two-dimensional graphical item based on the VIBes viewer.
Definition: codac_VIBesFig.h:29
bool m_draw_tubes_backgrounds
if true, will highlight tubes contractions
Definition: codac_VIBesFigMap.h:559
void set_vehicle_display(const TrajectoryVector *traj, bool vehicle_display)
Displays a vehicle at the end of a trajectory.
std::string name
human readable identifier of the tube
Definition: codac_VIBesFigMap.h:534
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.
int index_y
integer references for state components
Definition: codac_VIBesFigMap.h:539
Interval m_restricted_tdomain
restricts the display to a part of the temporal domain
Definition: codac_VIBesFigMap.h:558
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.
~VIBesFigMap()
VIBesFigMap destructor.
VIBesFigMap(const std::string &fig_name)
Creates a VIBesFigMap.
Two-dimensional graphical item to project dynamical items (tubes, trajectories, etc.) on a map.
Definition: codac_VIBesFigMap.h:45
unsigned int m_tube_max_nb_disp_slices
limit for slices display
Definition: codac_VIBesFigMap.h:563
void show()
Displays this figure.
const IntervalVector draw_tube(const TubeVector *tube)
Draws a tube.
void draw_beacon(const Beacon &beacon, const std::string &color, const vibes::Params ¶ms)
Draws a Beacon object.
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.
std::pair< ColorMap, const Trajectory * > color_map
custom colormap of the trajectory
Definition: codac_VIBesFigMap.h:550
Specifies some parameters related to a Tube display.
Definition: codac_VIBesFigMap.h:532
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.
const IntervalVector draw_tube_background(const TubeVector *tube)
Draws the background of a tube.
float m_robot_size
if 0, no robot display
Definition: codac_VIBesFigMap.h:561
std::map< const TubeVector *, FigMapTubeParams > m_map_tubes
map of Tube objects to be displayed, together with parameters
Definition: codac_VIBesFigMap.h:555
std::map< const TrajectoryVector *, FigMapTrajParams > m_map_trajs
map of Trajectory objects to be displayed, together with parameters
Definition: codac_VIBesFigMap.h:556
std::pair< ColorMap, const Trajectory * > color_map
custom colormap of the tube
Definition: codac_VIBesFigMap.h:536
void remove_tube(const TubeVector *tube)
Removes a tube from this figure.