Go to the documentation of this file.
45 #include <sys/types.h>
60 #include <FL/Fl_Box.H>
61 #include <FL/Fl_Gl_Window.H>
62 #include <FL/Fl_Menu_Bar.H>
63 #include <FL/Fl_Window.H>
64 #include <FL/fl_draw.H>
68 #include <OpenGL/glu.h>
105 const char COPYRIGHT[] =
"Copyright Richard Vaughan and contributors 2000-2017";
108 const char AUTHORS[] =
"Richard Vaughan, Brian Gerkey, Andrew Howard, Reed Hedges, Pooya Karimian, "
109 "Toby Collett, Jeremy Asher, Alex Couture-Beil, Adrian Böckenkamp and "
113 const char WEBSITE[] =
"http://playerstage.org";
116 const char DESCRIPTION[] =
"Robot simulation library\nPart of the Player Project";
120 "Stage robot simulation library\n"
121 "Copyright (C) 2000-2017 Richard Vaughan and contributors\n"
122 "Part of the Player Project [http://playerstage.org]\n"
124 "This program is free software; you can redistribute it and/or\n"
125 "modify it under the terms of the GNU General Public License\n"
126 "as published by the Free Software Foundation; either version 2\n"
127 "of the License, or (at your option) any later version.\n"
129 "This program is distributed in the hope that it will be useful,\n"
130 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
131 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
132 "GNU General Public License for more details.\n"
134 "You should have received a copy of the GNU General Public License\n"
135 "along with this program; if not, write to the Free Software\n"
136 "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n"
138 "The text of the license may also be available online at\n"
139 "http://www.gnu.org/licenses/old-licenses/gpl-2.0.html\n";
153 return (r * 180.0 / M_PI);
159 return (d * M_PI / 180.0);
175 return (a < 0 ? -1 : 1);
179 inline double sgn(
double a)
181 return (a < 0 ? -1.0 : 1.0);
218 explicit Color(
double r,
double g,
double b,
double a = 1.0);
223 explicit Color(
const std::string &name);
230 void Print(
const char *prefix)
const;
251 void Save(
Worldfile *wf,
int section,
const char *keyword)
const;
271 return Pose(xmin + drand48() * (xmax - xmin), ymin + drand48() * (ymax - ymin), 0,
278 virtual void Print(
const char *prefix)
const
280 printf(
"%s pose [x:%.3f y:%.3f z:%.3f a:%.3f]\n", prefix,
x,
y,
z,
a);
286 snprintf(buf, 256,
"[ %.3f %.3f %.3f %.3f ]",
x,
y,
z,
a);
287 return std::string(buf);
299 const double cosa = cos(
a);
300 const double sina = sin(
a);
302 return Pose(
x + p.
x * cosa - p.
y * sina,
y + p.
x * sina + p.
y * cosa,
z + p.
z,
311 return ((
y *
y +
x *
x) < (p.
y * p.
y + p.
x * p.
x));
316 return (
x == other.
x &&
y == other.
y &&
z == other.
z &&
a == other.
a);
321 return (
x != other.
x ||
y != other.
y ||
z != other.
z ||
a != other.
a);
365 virtual void Print(
const char *prefix)
const
368 printf(
"%s", prefix);
370 printf(
"velocity [x:%.3f y:%.3f z:%3.f a:%.3f]\n",
x,
y,
z,
a);
386 void Print(
const char *prefix)
const
389 printf(
"%s", prefix);
499 void coord_shift(
double x,
double y,
double z,
double a);
502 void draw_string(
float x,
float y,
float z,
const char *
string);
506 void draw_octagon(
float x,
float y,
float w,
float h,
float m);
509 void draw_array(
float x,
float y,
float w,
float h,
float *data,
size_t len,
size_t offset,
510 float min,
float max);
511 void draw_array(
float x,
float y,
float w,
float h,
float *data,
size_t len,
size_t offset);
522 const std::string menu_name;
523 const std::string worldfile_name;
526 Visualizer(
const std::string &menu_name,
const std::string &worldfile_name)
527 : menu_name(menu_name), worldfile_name(worldfile_name)
545 double constrain(
double val,
double minval,
double maxval);
573 #define VAR(V, init) __typeof(init) V = (init)
580 #define FOR_EACH(I, C) for (VAR(I, (C).begin()), ite = (C).end(); (I) != ite; ++(I))
584 template <
class T,
class C>
void EraseAll(T thing, C &cont)
586 cont.erase(std::remove(cont.begin(), cont.end(), thing), cont.end());
590 #define PRINT_ERR(m) fprintf(stderr, "\033[41merr\033[0m: " m " (%s %s)\n", __FILE__, __FUNCTION__)
591 #define PRINT_ERR1(m, a) \
592 fprintf(stderr, "\033[41merr\033[0m: " m " (%s %s)\n", a, __FILE__, __FUNCTION__)
593 #define PRINT_ERR2(m, a, b) \
594 fprintf(stderr, "\033[41merr\033[0m: " m " (%s %s)\n", a, b, __FILE__, __FUNCTION__)
595 #define PRINT_ERR3(m, a, b, c) \
596 fprintf(stderr, "\033[41merr\033[0m: " m " (%s %s)\n", a, b, c, __FILE__, __FUNCTION__)
597 #define PRINT_ERR4(m, a, b, c, d) \
598 fprintf(stderr, "\033[41merr\033[0m: " m " (%s %s)\n", a, b, c, d, __FILE__, __FUNCTION__)
599 #define PRINT_ERR5(m, a, b, c, d, e) \
600 fprintf(stderr, "\033[41merr\033[0m: " m " (%s %s)\n", a, b, c, d, e, __FILE__, __FUNCTION__)
603 #define PRINT_WARN(m) printf("\033[44mwarn\033[0m: " m " (%s %s)\n", __FILE__, __FUNCTION__)
604 #define PRINT_WARN1(m, a) printf("\033[44mwarn\033[0m: " m " (%s %s)\n", a, __FILE__, __FUNCTION__)
605 #define PRINT_WARN2(m, a, b) \
606 printf("\033[44mwarn\033[0m: " m " (%s %s)\n", a, b, __FILE__, __FUNCTION__)
607 #define PRINT_WARN3(m, a, b, c) \
608 printf("\033[44mwarn\033[0m: " m " (%s %s)\n", a, b, c, __FILE__, __FUNCTION__)
609 #define PRINT_WARN4(m, a, b, c, d) \
610 printf("\033[44mwarn\033[0m: " m " (%s %s)\n", a, b, c, d, __FILE__, __FUNCTION__)
611 #define PRINT_WARN5(m, a, b, c, d, e) \
612 printf("\033[44mwarn\033[0m: " m " (%s %s)\n", a, b, c, d, e, __FILE__, __FUNCTION__)
616 #define PRINT_MSG(m) printf("Stage: " m " (%s %s)\n", __FILE__, __FUNCTION__)
617 #define PRINT_MSG1(m, a) printf("Stage: " m " (%s %s)\n", a, __FILE__, __FUNCTION__)
618 #define PRINT_MSG2(m, a, b) printf("Stage: " m " (%s %s)\n", a, b, __FILE__, __FUNCTION__)
619 #define PRINT_MSG3(m, a, b, c) printf("Stage: " m " (%s %s)\n", a, b, c, __FILE__, __FUNCTION__)
620 #define PRINT_MSG4(m, a, b, c, d) \
621 printf("Stage: " m " (%s %s)\n", a, b, c, d, __FILE__, __FUNCTION__)
622 #define PRINT_MSG5(m, a, b, c, d, e) \
623 printf("Stage: " m " (%s %s)\n", a, b, c, d, e, __FILE__, __FUNCTION__)
625 #define PRINT_MSG(m) printf("Stage: " m "\n")
626 #define PRINT_MSG1(m, a) printf("Stage: " m "\n", a)
627 #define PRINT_MSG2(m, a, b) printf("Stage: " m "\n,", a, b)
628 #define PRINT_MSG3(m, a, b, c) printf("Stage: " m "\n", a, b, c)
629 #define PRINT_MSG4(m, a, b, c, d) printf("Stage: " m "\n", a, b, c, d)
630 #define PRINT_MSG5(m, a, b, c, d, e) printf("Stage: " m "\n", a, b, c, d, e)
635 #define PRINT_DEBUG(m) printf("debug: " m " (%s %s)\n", __FILE__, __FUNCTION__)
636 #define PRINT_DEBUG1(m, a) printf("debug: " m " (%s %s)\n", a, __FILE__, __FUNCTION__)
637 #define PRINT_DEBUG2(m, a, b) printf("debug: " m " (%s %s)\n", a, b, __FILE__, __FUNCTION__)
638 #define PRINT_DEBUG3(m, a, b, c) printf("debug: " m " (%s %s)\n", a, b, c, __FILE__, __FUNCTION__)
639 #define PRINT_DEBUG4(m, a, b, c, d) \
640 printf("debug: " m " (%s %s)\n", a, b, c, d, __FILE__, __FUNCTION__)
641 #define PRINT_DEBUG5(m, a, b, c, d, e) \
642 printf("debug: " m " (%s %s)\n", a, b, c, d, e, __FILE__, __FUNCTION__)
644 #define PRINT_DEBUG(m)
645 #define PRINT_DEBUG1(m, a)
646 #define PRINT_DEBUG2(m, a, b)
647 #define PRINT_DEBUG3(m, a, b, c)
648 #define PRINT_DEBUG4(m, a, b, c, d)
649 #define PRINT_DEBUG5(m, a, b, c, d, e)
669 std::map<std::string, void *>
props;
698 PRINT_WARN(
"Ancestor::SetToken() called with zero length string. Ignored.");
706 std::map<std::string, void *>::iterator it =
props.find(key);
707 return (it ==
props.end() ? NULL : it->second);
743 static std::vector<LogEntry>
log;
775 static std::vector<std::string>
args;
779 static std::set<World *> world_set;
780 static bool quit_all;
781 static void UpdateCb(
World *world);
782 static unsigned int next_id;
788 std::set<Model *> models;
791 std::map<std::string, Model *> models_by_name;
794 std::map<int, Model *> models_by_wfentity;
798 std::vector<Model *> models_with_fiducials;
801 bool operator()(
const Model *a,
const Model *b)
const;
805 bool operator()(
const Model *a,
const Model *b)
const;
810 std::set<Model *, ltx> models_with_fiducials_byx;
814 std::set<Model *, lty> models_with_fiducials_byy;
817 void FiducialInsert(
Model *mod)
820 models_with_fiducials.push_back(mod);
824 void FiducialErase(
Model *mod) {
EraseAll(mod, models_with_fiducials); }
826 void LoadWorldPostHook();
831 unsigned int show_clock_interval;
834 pthread_mutex_t sync_mutex;
835 unsigned int threads_working;
836 pthread_cond_t threads_start_cond;
837 pthread_cond_t threads_done_cond;
839 unsigned int worker_threads;
842 std::list<std::pair<world_callback_t, void *> >
848 std::list<PowerPack *>
908 void MapPoly(
const std::vector<point_int_t> &poly,
Block *block,
unsigned int layer);
925 virtual void PushColor(
double r,
double g,
double b,
double a)
942 const Model *finder,
const void *arg,
const bool ztest);
946 const Model *model,
const void *arg,
const bool ztest,
947 std::vector<RaytraceResult> &results);
963 void RecordRay(
double x1,
double y1,
double x2,
double y2);
1056 virtual bool IsGUI()
const {
return false; }
1064 virtual bool Load(
const std::string &worldfile_path);
1077 virtual bool Load(std::istream &world_content,
const std::string &worldfile_path = std::string());
1085 virtual bool Save(
const char *filename);
1090 virtual bool Update(
void);
1148 void Map(
unsigned int layer);
1151 void UnMap(
unsigned int layer);
1178 void SetZ(
double min,
double max);
1187 void Rasterize(uint8_t *data,
unsigned int width,
unsigned int height,
meters_t cellwidth,
1192 std::vector<point_t> pts;
1199 std::vector<Cell *> rendered_cells[2];
1212 std::vector<Block> blocks;
1219 void AppendBlock(
const Block &block);
1224 void AppendTouchingModels(std::set<Model *> &touchers);
1228 Model *TestCollision();
1231 void Map(
unsigned int layer);
1233 void UnMap(
unsigned int layer);
1237 void LoadBitmap(
const std::string &bitmapfile,
Worldfile *wf);
1240 void LoadBlock(
Worldfile *wf,
int entity);
1243 void Rasterize(uint8_t *data,
unsigned int width,
unsigned int height,
meters_t cellwidth,
1247 void DrawSolid(
const Geom &geom);
1252 void BuildDisplayList();
1255 void CallDisplayList();
1280 virtual void Draw(
void)
const = 0;
1285 double x(
void)
const {
return _x; }
1286 double y(
void)
const {
return _y; }
1287 double z(
void)
const {
return _z; }
1288 virtual void reset() = 0;
1307 virtual void Draw(
void)
const;
1312 void strafe(
double amount);
1329 void move(
double x,
double y,
double z);
1330 void setFov(
double horiz_fov,
double vert_fov)
1332 _horiz_fov = horiz_fov;
1333 _vert_fov = vert_fov;
1353 return _z_near * _z_far / (_z_far - z_buf_val * (_z_far - _z_near));
1377 double _pixels_width;
1378 double _pixels_height;
1383 OrthoCamera(
void) : _scale(15), _pixels_width(0), _pixels_height(0), _y_min(0), _y_max(0) {}
1384 virtual void Draw()
const;
1386 virtual void SetProjection(
double pixels_width,
double pixels_height,
double y_min,
double y_max);
1390 void move(
double x,
double y);
1411 void scale(
double scale,
double shift_x = 0,
double h = 0,
double shift_y = 0,
double w = 0);
1429 std::vector<Option *> drawOptions;
1431 std::vector<usec_t> interval_log;
1437 bool confirm_on_quit;
1442 std::string caption_prefix;
1446 usec_t real_time_interval;
1453 usec_t real_time_recorded;
1456 uint64_t timing_interval;
1459 static void windowCb(Fl_Widget *w,
WorldGui *wg);
1460 static void fileLoadCb(Fl_Widget *w,
WorldGui *wg);
1461 static void fileSaveCb(Fl_Widget *w,
WorldGui *wg);
1462 static void fileSaveAsCb(Fl_Widget *w,
WorldGui *wg);
1463 static void fileExitCb(Fl_Widget *w,
WorldGui *wg);
1466 static void helpAboutCb(Fl_Widget *w,
WorldGui *wg);
1467 static void pauseCb(Fl_Widget *w,
WorldGui *wg);
1468 static void onceCb(Fl_Widget *w,
WorldGui *wg);
1469 static void fasterCb(Fl_Widget *w,
WorldGui *wg);
1470 static void slowerCb(Fl_Widget *w,
WorldGui *wg);
1471 static void realtimeCb(Fl_Widget *w,
WorldGui *wg);
1472 static void fasttimeCb(Fl_Widget *w,
WorldGui *wg);
1473 static void resetViewCb(Fl_Widget *w,
WorldGui *wg);
1474 static void moreHelptCb(Fl_Widget *w,
WorldGui *wg);
1477 bool saveAsDialog();
1478 bool closeWindowQuery();
1480 virtual void AddModel(
Model *mod);
1485 void LoadWorldGuiPostHook(
usec_t load_start_time);
1489 virtual void PushColor(
double r,
double g,
double b,
double a);
1496 WorldGui(
int width,
int height,
const char *caption = NULL);
1500 virtual void Redraw(
void);
1504 virtual bool Load(
const std::string &worldfile_path);
1505 virtual bool Load(std::istream &world_content,
const std::string &worldfile_path = std::string());
1508 virtual bool Save(
const char *filename);
1509 virtual bool IsGUI()
const {
return true; }
1512 virtual void Start();
1513 virtual void Stop();
1537 float x, y, w, h, min, max;
1538 Color fgcolor, bgcolor;
1542 const char *name,
const char *wfname);
1555 unsigned int columns, rows;
1558 std::vector<joules_t> cells;
1628 printf(
"%s", prefix);
1666 static uint32_t count;
1667 static std::map<id_t, Model *> modelsbyid;
1672 std::vector<Option *> drawOptions;
1673 const std::vector<Option *> &getOptions()
const {
return drawOptions; }
1700 return (
arg < other.
arg);
1726 void Draw(GLUquadric *quadric);
1820 unsigned int width, height;
1822 std::vector<point_t> pts;
1829 void SetData(uint8_t *data,
unsigned int width,
unsigned int height,
meters_t cellwidth,
1909 if (str.size() > 0) {
1913 PRINT_ERR(
"Model::SetToken() called with zero length string. Ignored.");
1945 void Rasterize(uint8_t *data,
unsigned int width,
unsigned int height,
meters_t cellwidth,
1973 void Map(
unsigned int layer);
1982 void UnMap(
unsigned int layer);
2001 const void *arg,
const bool ztest)
2010 std::vector<RaytraceResult> &results)
2042 void DrawImage(uint32_t texture_id,
Camera *cam,
float alpha,
double width = 1.0,
2043 double height = 1.0);
2079 size_t max_iter = 0);
2086 size_t max_iter = 0);
2094 const std::string &name =
"");
2110 void Say(
const std::string &str);
2137 virtual void Load();
2140 virtual void Save();
2218 void AddToPose(
double dx,
double dy,
double dz,
double da);
2287 virtual void Print(
char *prefix)
const;
2298 std::vector<point_int_t>
LocalToPixels(
const std::vector<point_t> &local)
const;
2351 std::vector<Blob> blobs;
2356 std::vector<Color> colors;
2359 static bool BlockMatcher(
Block *testblock,
Model *finder);
2377 virtual void Load();
2383 const std::vector<Blob> &
GetBlobs()
const {
return blobs; }
2458 virtual void Update();
2459 virtual void DataVisualize(
Camera *cam);
2462 void PositionPaddles();
2463 void UpdateBreakBeams();
2464 void UpdateContacts();
2470 Block *paddle_right;
2482 virtual void Load();
2483 virtual void Save();
2526 virtual void Load();
2536 virtual void Print(
char *prefix)
const;
2546 static Option showBumperData;
2570 void AddModelIfVisible(
Model *him);
2572 virtual void Update();
2573 virtual void DataVisualize(
Camera *cam);
2578 std::vector<Fiducial> fiducials;
2584 virtual void Load();
2602 *count = fiducials.size();
2603 return &fiducials[0];
2616 virtual void Print(
char *prefix)
const;
2648 :
pose(0, 0, 0, 0),
size(0.02, 0.02, 0.02),
2656 std::string
String()
const;
2661 const std::vector<Sensor> &
GetSensors()
const {
return sensors; }
2667 std::vector<Sensor> sensors;
2683 static Option showBlinkenData;
2690 virtual void Load();
2708 GLfloat *_frame_data;
2709 GLubyte *_frame_color_data;
2711 bool _valid_vertexbuf_cache;
2717 static const int _depth = 4;
2719 int _camera_quads_size;
2720 GLfloat *_camera_quads;
2721 GLubyte *_camera_colors;
2723 static Option showCameraData;
2727 double _pitch_offset;
2738 virtual void Load();
2762 _pitch_offset = pitch;
2763 _valid_vertexbuf_cache =
false;
2770 _valid_vertexbuf_cache =
false;
2857 void SetSpeed(
double x,
double y,
double a);
2868 void GoTo(
double x,
double y,
double a);
2882 virtual void Move();
2886 virtual void Load();
2904 double min_position;
2905 double max_position;
2906 double start_position;
2924 virtual void Load();
virtual void PopColor()
Definition: stage.hh:933
bool move
Definition: stage.hh:1783
meters_t x
Definition: stage.hh:243
Event(usec_t time, Model *mod, model_callback_t cb, void *arg)
Definition: stage.hh:973
void SetStored(joules_t j)
Definition: powerpack.cc:227
virtual void Draw(void) const =0
void DrawFlagList()
Definition: model_draw.cc:425
void SetCenterX(double y)
Definition: block.cc:102
virtual void Startup()
Definition: model_actuator.cc:255
Size()
Definition: stage.hh:248
Model * TestCollision()
Definition: block.cc:129
~BlockGroup()
Definition: blockgroup.cc:17
joules_t dissipated
Definition: stage.hh:1590
virtual void Load(Worldfile *wf, int sec)=0
static const Color blue
Definition: stage.hh:233
virtual void DrawBlocks()
Definition: model_lightindicator.cc:19
void Log(Model *mod)
Definition: world.cc:1121
point3_t GetAxis() const
Definition: stage.hh:2939
virtual void PushColor(double r, double g, double b, double a)
Definition: stage.hh:925
BumperVis()
Definition: model_bumper.cc:206
double close_limit
How far the gripper can close. If < 1.0, the gripper has its mouth full.
Definition: stage.hh:2450
radians_t pan
Horizontal pan angle in radians, in the range -pi to +pi.
Definition: stage.hh:2363
virtual void Print(const char *prefix) const
Definition: stage.hh:278
virtual ~Ancestor()
Definition: ancestor.cc:9
void QuitAll()
Definition: stage.hh:1099
void DisableEnergy(Model *m)
Definition: stage.hh:1013
int GetFiducialReturn() const
Definition: stage.hh:2228
void TryCharge(PowerPack *pp, const Pose &pose)
bool rebuild_displaylist
iff true, regenerate block display list before redraw
Definition: stage.hh:1840
bool HasCollision()
Definition: stage.hh:1951
double range_noise_const
Definition: stage.hh:2639
virtual bool Load(const std::string &worldfile_path)
Definition: worldgui.cc:278
bool autosnatch
if true, cycle the gripper through open-close-up-down automatically
Definition: stage.hh:2451
Definition: stage.hh:2618
virtual const char * PrintWithPose() const
Definition: model.cc:555
bool operator==(const point_t &other) const
Definition: stage.hh:460
Pose GetPose() const
Definition: stage.hh:2250
PowerPack * power_pack
Definition: stage.hh:1810
Model * CreateModel(Model *parent, const std::string &typestr)
Definition: world.cc:307
void SetGuiNose(bool val)
Definition: model.cc:1139
uint32_t left
Definition: stage.hh:2336
void Load(Worldfile *wf, int sec)
Definition: camera.cc:198
virtual bool Save(const char *filename)
Definition: world.cc:971
static const Color green
Definition: stage.hh:233
Definition: stage.hh:2838
Definition: stage.hh:2825
virtual void Shutdown()
Definition: model_actuator.cc:262
std::vector< Fiducial > & GetFiducials()
fiducial detector?
Definition: stage.hh:2597
double GetMinPosition() const
Definition: stage.hh:2937
bool operator+=(const point_t &other)
Definition: stage.hh:449
const std::string & GetMenuName()
Definition: stage.hh:534
void CommandDown()
Definition: stage.hh:2503
@ TYPE_LINEAR
Definition: stage.hh:2898
bool IsTopView()
Definition: worldgui.cc:892
void SetAcceleration(double x, double y, double a)
Definition: model_position.cc:652
int boundary
Definition: stage.hh:1683
SuperRegion * AddSuperRegion(const point_int_t &coord)
Definition: world.cc:1057
virtual void AddChild(Model *mod)
Definition: ancestor.cc:15
void DrawBlocksTree()
Definition: model_draw.cc:148
double yaw(void) const
Definition: stage.hh:1283
PoseVis()
Definition: model_position.cc:680
void SetColor(const Color &col)
Definition: model.cc:1011
@ LOCALIZATION_ODOM
Definition: stage.hh:2786
watts_t watts
power consumed by this model
Definition: stage.hh:1889
Pose pose
Definition: stage.hh:558
void Save(Worldfile *wf, int section, const char *keyword)
Definition: model.cc:182
SuperRegion * GetSuperRegion(const point_int_t &org)
Definition: world.cc:1069
Stg::ModelPosition::PoseVis posevis
@ CMD_CLOSE
Definition: stage.hh:2434
cb_t(world_callback_t cb, void *arg)
Definition: stage.hh:1694
void draw_origin(double len)
Definition: gl.cc:133
virtual void Update()
Capture a new frame ( calls GetFrame )
Definition: model_camera.cc:147
virtual void Redraw(void)
Definition: stage.hh:872
Pose pose
Definition: stage.hh:2561
virtual void Shutdown()
Definition: model_blobfinder.cc:262
virtual void Shutdown()
Definition: model_position.cc:577
void Draw(GLUquadric *quadric)
Definition: model.cc:1033
virtual void Load()
Definition: model_blinkenlight.cc:86
void setAspect(double aspect)
update vertical fov based on window aspect and current horizontal fov
Definition: stage.hh:1336
World(const std::string &name="MyWorld", double ppm=DEFAULT_PPM)
Definition: world.cc:128
void Show()
Definition: worldgui.cc:254
virtual void RemoveChild(Model *mod)
Definition: ancestor.cc:28
std::list< PowerPack * > powerpack_list
List of all the powerpacks attached to models in the world.
Definition: stage.hh:849
~WorldGui()
Definition: worldgui.cc:244
void SetGlobalPose(const Pose &gpose)
Definition: model.cc:1170
void SetGlobalVelocity(const Velocity &gvel)
Definition: model_position.cc:180
virtual void DataVisualize(Camera *cam)
Draw Camera Model - TODO.
Definition: model_camera.cc:221
point_t(meters_t x, meters_t y)
Definition: stage.hh:447
void Save(Worldfile *wf, int section, const char *keyword) const
Definition: model.cc:170
void SetGuiOutline(bool val)
Definition: model.cc:1154
const std::string & GetWorldfileName()
Definition: stage.hh:535
void SetMass(kg_t mass)
Definition: model.cc:1087
meters_t map_resolution
Definition: stage.hh:1799
bool Stalled() const
Definition: stage.hh:2314
bounds3d_t BoundingBox() const
Definition: blockgroup.cc:53
virtual void Shutdown()
Definition: model.cc:582
virtual void SetToken(const std::string &str)
Definition: stage.hh:691
usec_t last_update
time of last update in us
Definition: stage.hh:1797
Model * GetModel(const std::string &name) const
Definition: world.cc:688
Canvas * GetCanvas(void) const
Definition: stage.hh:1519
Definition: stage.hh:1271
@ CB_GEOM
Definition: stage.hh:1732
void UpdateTrail()
Definition: model.cc:725
callback_type_t
Definition: stage.hh:1729
bool IsZero() const
Definition: stage.hh:291
virtual ~Camera()
Definition: stage.hh:1279
model_callback_t callback
Definition: stage.hh:1690
void draw_string_multiline(float x, float y, float w, float h, const char *string, Fl_Align align)
Definition: gl.cc:75
bounds3d_t()
Definition: stage.hh:433
usec_t GetUpdateInterval() const
Definition: stage.hh:1939
double nearClip(void) const
Definition: stage.hh:1356
void LoadSensor(Worldfile *wf, int entity)
Definition: world.cc:294
void CommandUp()
Definition: stage.hh:2501
@ CB_POSE
Definition: stage.hh:1736
double duty_cycle
mark/space ratio
Definition: stage.hh:553
Definition: stage.hh:2333
int RemoveUpdateCallback(world_callback_t cb, void *user)
Definition: world.cc:530
Bounds velocity_bounds[4]
Definition: stage.hh:2805
virtual void PushColor(Color col)
Definition: stage.hh:2059
bool gripper_return
Definition: stage.hh:1929
@ LIFT_DOWN
Default state.
Definition: stage.hh:2425
void setYaw(double yaw)
Definition: stage.hh:1337
ActuatorType
Definition: stage.hh:2898
World class
Definition: stage.hh:764
bool thread_safe
Definition: stage.hh:1851
Model * Parent() const
Definition: stage.hh:2186
const GLfloat * FrameDepth() const
get a reference to camera depth buffer
Definition: stage.hh:2756
void setPose(double x, double y, double z)
Definition: stage.hh:1315
point_t()
Definition: stage.hh:448
double Constrain(double value)
returns value, but no smaller than min and no larger than max.
Definition: model.cc:159
usec_t interval_energy
time between updates of powerpack in usec
Definition: stage.hh:1796
@ CB_UPDATE
Definition: stage.hh:1740
Size paddle_size
paddle dimensions
Definition: stage.hh:2442
const double million
Definition: stage.hh:145
void LoadBlockGroup(Worldfile *wf, int entity)
void AddFlag(Flag *flag)
Definition: model.cc:323
void SetCommand(cmd_t cmd)
Definition: stage.hh:2495
Worldfile * wf
Definition: stage.hh:1899
static void Clear()
Definition: stage.hh:748
virtual void Shutdown()
Definition: model_bumper.cc:104
Model * parent
Definition: stage.hh:1803
void AddPowerPack(PowerPack *pp)
Definition: world.cc:1104
Pose()
Definition: stage.hh:264
void RemoveFlag(Flag *flag)
Definition: model.cc:331
bool RandomPoseInFreeSpace(meters_t xmin, meters_t xmax, meters_t ymin, meters_t ymax, size_t max_iter=0)
Definition: model.cc:644
RaytraceResult()
Definition: stage.hh:334
void setFov(double horiz_fov, double vert_fov)
Definition: stage.hh:1330
void SetCapacity(joules_t j)
Definition: powerpack.cc:199
point_int_t(int x, int y)
Definition: stage.hh:475
const std::string type
Definition: stage.hh:1883
virtual void Print(char *prefix) const
Definition: model_bumper.cc:195
void Say(const std::string &str)
Definition: model.cc:410
uint32_t bumper_count
Definition: stage.hh:2528
bool nose
Definition: stage.hh:1784
int getWidth(void) const
width of captured image
Definition: stage.hh:2750
void * arg
Definition: stage.hh:1691
SuperRegion * GetSuperRegionCreate(const point_int_t &org)
Definition: world.cc:1082
virtual void RemoveChild(Model *mod)
Definition: worldgui.cc:439
const char COPYRIGHT[]
Definition: stage.hh:105
void DrawSolid(bool topview)
Definition: block.cc:303
double max
largest value in range, initially zero
Definition: stage.hh:412
Bounds & Load(Worldfile *wf, int section, const char *keyword)
Definition: model.cc:153
void MapPoly(const std::vector< point_int_t > &poly, Block *block, unsigned int layer)
Definition: world.cc:990
ModelCamera(World *world, Model *parent, const std::string &type)
Definition: model_camera.cc:89
@ CONTROL_POSITION
Definition: stage.hh:2895
virtual void Startup()
Definition: model_position.cc:568
void ForEachDescendant(model_callback_t func, void *arg)
Definition: ancestor.cc:39
Visibility()
Definition: model.cc:187
void RemoveVisualizer(Visualizer *custom_visual)
Definition: model_draw.cc:264
Pose pose
Definition: stage.hh:549
Vis(World *world)
Definition: model_blobfinder.cc:282
point_t * unit_square_points_create()
Definition: stage.cc:219
uint32_t id
Definition: stage.hh:1794
void SetGuiGrid(bool val)
Definition: model.cc:1149
void Draw() const
Definition: model_position.cc:808
void Accumulate(meters_t x, meters_t y, joules_t amount)
Definition: powerpack.cc:296
double vertFov(void) const
Definition: stage.hh:1339
std::set< ModelPosition * > active_velocity
Definition: stage.hh:1015
void Rasterize(uint8_t *data, unsigned int width, unsigned int height, meters_t cellwidth, meters_t cellheight)
Definition: model.cc:849
void DestroySuperRegion(SuperRegion *sr)
Definition: world.cc:184
void ClearBlocks()
Definition: model.cc:360
std::string token
Definition: stage.hh:671
static joules_t global_stored
Definition: stage.hh:1598
Color color
Definition: stage.hh:2641
#define PRINT_WARN(m)
Definition: stage.hh:603
void SetTurnSpeed(double a)
Definition: model_position.cc:622
usec_t quit_time
Definition: stage.hh:851
int wf_entity
Definition: stage.hh:1900
void LoadBlock(Worldfile *wf, int entity)
Definition: model.cc:368
virtual void Visualize(Model *mod, Camera *cam)
Definition: vis_strip.cc:24
@ PADDLE_OPENING
Definition: stage.hh:2420
virtual void DrawBlocks()
Definition: model_draw.cc:171
void Zero()
Definition: stage.hh:253
int x
Definition: stage.hh:474
cb_t()
Definition: stage.hh:1695
void Rasterize(uint8_t *data, unsigned int width, unsigned int height, meters_t cellwidth, meters_t cellheight)
Definition: block.cc:198
GuiState & Load(Worldfile *wf, int wf_entity)
Definition: model.cc:219
void SetStickyReturn(bool val)
const double billion
Definition: stage.hh:148
Model * gripped
Definition: stage.hh:2447
@ CONTROL_ACCELERATION
Definition: stage.hh:2783
std::vector< point_int_t > LocalToPixels(const std::vector< point_t > &local) const
Definition: model.cc:469
void UnMapWithChildren(unsigned int layer)
Definition: model.cc:502
bool operator==(const Color &other) const
Definition: color.cc:84
Velocity()
Definition: stage.hh:352
Definition: stage.hh:2516
double watts_t
Definition: stage.hh:212
void SetData(uint8_t *data, unsigned int width, unsigned int height, meters_t cellwidth, meters_t cellheight)
Definition: model.cc:968
ModelActuator class
Definition: stage.hh:2892
Geom GetGeom() const
Definition: stage.hh:2247
ModelCamera class
Definition: stage.hh:2698
Definition: stage.hh:2676
const double thousand
Definition: stage.hh:142
void SetState(bool isOn)
Definition: model_lightindicator.cc:14
std::vector< Model * > children
Definition: stage.hh:664
Flag * Nibble(double portion)
Definition: model.cc:998
void Visualize(Camera *cam)
Definition: powerpack.cc:47
RaytraceResult(const Pose &pose, Model *mod, const Color &color, const meters_t range)
Definition: stage.hh:335
watts_t watts_take
Definition: stage.hh:1897
bool operator==(const Pose &other) const
Definition: stage.hh:314
Pose est_origin
Definition: stage.hh:2879
Definition: stage.hh:2441
ModelFiducial class
Definition: stage.hh:2552
unsigned int GetFlagCount() const
Definition: stage.hh:2151
Model()
Definition: stage.hh:2100
void CallUpdateCallbacks(void)
Definition: model.cc:612
RasterVis()
Definition: model.cc:879
meters_t y
Definition: stage.hh:259
@ CB_STARTUP
Definition: stage.hh:1739
void draw_vector(double x, double y, double z)
Definition: gl.cc:125
void update(void)
Definition: camera.cc:70
bool operator==(const cb_t &other) const
Definition: stage.hh:1706
usec_t GetEnergyInterval() const
Definition: stage.hh:1940
Color GetColor() const
Definition: stage.hh:2233
uint64_t updates
the number of simulated time steps executed so far
Definition: stage.hh:856
Velocity(double x, double y, double z, double a)
Definition: stage.hh:350
virtual void PopColor()
Definition: stage.hh:2061
Model * beam[2]
points to a model detected by the beams
Definition: stage.hh:2453
GuiState()
Definition: model.cc:215
Definition: stage.hh:1924
virtual ~StripPlotVis()
Definition: vis_strip.cc:18
double z(void) const
Definition: stage.hh:1287
std::list< Visualizer * > cv_list
Definition: stage.hh:1766
LocalizationMode
Definition: stage.hh:2786
kg_t mass
Definition: stage.hh:1800
void ClearPts()
Definition: model.cc:989
TrailItem()
Definition: stage.hh:1860
Pose & Load(Worldfile *wf, int section, const char *keyword)
Definition: model.cc:175
static void * update_thread_entry(std::pair< World *, int > *info)
Definition: world.cc:228
LogEntry(usec_t timestamp, Model *mod)
Definition: logentry.cc:7
void setClip(double near, double far)
Definition: stage.hh:1358
meters_t y
Definition: stage.hh:466
bool PlaceInFreeSpace(meters_t xmin, meters_t xmax, meters_t ymin, meters_t ymax, size_t max_iter=0)
virtual void PushColor(Color col)
dummy implementations to be overloaded by GUI subclasses
Definition: stage.hh:924
int32_t MetersToPixels(meters_t x) const
Definition: stage.hh:916
virtual bool IsGUI() const
Definition: stage.hh:1509
double r
Definition: stage.hh:216
void LoadControllerModule(const char *lib)
Definition: model.cc:1469
uint64_t GetUpdateCount() const
Definition: stage.hh:1118
bounds3d_t(const Bounds &x, const Bounds &y, const Bounds &z)
Definition: stage.hh:434
std::string String() const
Definition: stage.hh:283
static const Size size
Definition: stage.hh:2475
double horizFov(void) const
Definition: stage.hh:1338
Sensor()
Definition: stage.hh:2647
virtual void Startup()
Definition: model_blobfinder.cc:252
meters_t x
Definition: stage.hh:466
double a
Definition: stage.hh:216
Definition: stage.hh:1296
const char LICENSE[]
Definition: stage.hh:119
double _z
Definition: stage.hh:1275
Definition: stage.hh:2555
virtual void Update()
Definition: model_blinkenlight.cc:95
static joules_t global_capacity
Definition: stage.hh:1599
void EraseAll(T thing, C &cont)
Definition: stage.hh:584
Bounds()
Definition: stage.hh:414
bool paddles_stalled
true iff some solid object stopped the paddles closing or opening
Definition: stage.hh:2448
bool stack_children
whether child models should be stacked on top of this model or not
Definition: stage.hh:1843
lift_state_t
Definition: stage.hh:2424
@ DRIVE_CAR
Definition: stage.hh:2789
virtual void Move()
Definition: model_position.cc:526
bool graphics
true iff we have a GUI
Definition: stage.hh:845
Model * GetUnusedModelOfType(const std::string &type)
Definition: model.cc:770
joules_t GetDissipated() const
Definition: powerpack.cc:222
static std::vector< LogEntry > log
Definition: stage.hh:743
void Update(ModelRanger *rgr)
Definition: model_ranger.cc:211
void CommandOpen()
Definition: stage.hh:2499
virtual void Load()
Definition: model_gripper.cc:109
int fiducial_return
Definition: stage.hh:1928
void ChargeStart()
Definition: stage.hh:1641
void LoadBlock(Worldfile *wf, int entity)
Definition: world.cc:283
virtual void PushColor(double r, double g, double b, double a)
Definition: stage.hh:2060
virtual void Draw() const
Definition: camera.cc:101
Pose GetGlobalPose() const
Definition: model.cc:1200
virtual void Load()
Definition: model_fiducial.cc:295
Pose operator+(const Pose &p) const
Definition: stage.hh:297
model_callback_t cb
Definition: stage.hh:980
bool disabled
Definition: stage.hh:1763
Ancestor & Load(Worldfile *wf, int section)
Definition: ancestor.cc:48
bool TestQuit() const
Definition: stage.hh:1095
float s
Definition: glutgraphics.cc:51
void RegisterOption(Option *opt)
Register an Option for pickup by the GUI.
Definition: world.cc:1115
void setYaw(double yaw)
Definition: stage.hh:1392
void Raytrace(const Pose &pose, const meters_t range, const radians_t fov, const ray_test_func_t func, const void *arg, const bool ztest, std::vector< RaytraceResult > &results)
Definition: stage.hh:2008
virtual void PopColor()
Definition: worldgui.cc:875
Size & Load(Worldfile *wf, int section, const char *keyword)
Definition: model.cc:164
ModelBumper(World *world, Model *parent, const std::string &type)
Definition: model_bumper.cc:70
virtual void Save()
Definition: model.cc:1435
Size size
Definition: stage.hh:559
bool DataIsFresh() const
Definition: stage.hh:2271
virtual void DataVisualize(Camera *cam)
Definition: model_blinkenlight.cc:102
virtual void Load()
Definition: model_actuator.cc:85
int RemoveCallback(callback_type_t type, model_callback_t callback)
Definition: model_callbacks.cc:17
void DrawFootPrint(const Geom &geom)
Definition: blockgroup.cc:146
DriveMode
Definition: stage.hh:2789
uint32_t GetId() const
Definition: stage.hh:2235
std::map< point_int_t, SuperRegion * > superregions
Definition: stage.hh:854
virtual void Print(char *prefix) const
Definition: model_ranger.cc:384
virtual void Visualize(Model *mod, Camera *cam)=0
unsigned int FullVersion()
kg_t GetMassOfChildren() const
Definition: model.cc:803
void SetPose(const Pose &pose)
Definition: model.cc:1216
void coord_shift(double x, double y, double z, double a)
Definition: gl.cc:6
static Option showStrikes
Definition: stage.hh:2621
@ PADDLE_OPEN
Default state.
Definition: stage.hh:2418
Model & mod
Definition: stage.hh:1216
void setYaw(double yaw)
change the yaw
Definition: stage.hh:2767
ActuatorType GetType() const
Definition: stage.hh:2938
~ModelActuator()
Destructor.
Definition: model_actuator.cc:80
const void * arg
Definition: stage.hh:724
unsigned int scan_width
Width of the input image in pixels.
Definition: stage.hh:2367
virtual void DrawSelected(void)
Definition: model_draw.cc:12
virtual void Print(char *prefix) const
Definition: model.cc:542
static size_t Count()
Definition: stage.hh:746
unsigned int GetSubscriptionCount() const
Definition: stage.hh:2317
int(* world_callback_t)(World *world, void *user)
Definition: stage.hh:542
~ModelLightIndicator()
Definition: model_lightindicator.cc:10
Model * mod
use this in robot controllers!)
Definition: stage.hh:2563
void setScale(double scale)
Definition: stage.hh:1404
void Extend(point3_t pt)
Definition: world.cc:1094
virtual ~DissipationVis()
Definition: powerpack.cc:264
virtual void Stop()
Definition: stage.hh:866
Definition: stage.hh:1530
void pose_shift(const Pose &pose)
Definition: gl.cc:13
bool outline
Definition: stage.hh:1785
meters_t Distance(const Pose &other) const
Definition: stage.hh:324
RaytraceResult Raytrace(const Ray &ray)
Definition: world.cc:756
@ CB_PARENT
Definition: stage.hh:1735
virtual ~WaypointVis(void)
Definition: stage.hh:2841
virtual void Startup()
Definition: model.cc:566
std::map< std::string, void * > props
Definition: stage.hh:669
Fiducial * GetFiducials(unsigned int *count)
Definition: stage.hh:2599
void DrawImage(uint32_t texture_id, Camera *cam, float alpha, double width=1.0, double height=1.0)
Definition: model_draw.cc:381
void GLSet(void)
Definition: stage.hh:237
lift_state_t lift
Definition: stage.hh:2444
void DrawTrailArrows()
Definition: model_draw.cc:106
StripPlotVis(float x, float y, float w, float h, size_t len, Color fgcolor, Color bgcolor, const char *name, const char *wfname)
Definition: vis_strip.cc:9
unsigned int scan_height
setting this small saves computation time.
Definition: stage.hh:2366
uint32_t bottom
Definition: stage.hh:2336
Velocity GetOdomError() const
Definition: stage.hh:2822
msec_t period
duration of a complete cycle
Definition: stage.hh:552
void addPose(double x, double y, double z)
Definition: stage.hh:1321
virtual ~ModelBumper()
Definition: model_bumper.cc:87
void Subscribe()
Definition: model.cc:516
virtual ~ModelGripper()
destructor
Definition: model_gripper.cc:105
void SetCenterY(double y)
Definition: block.cc:95
void Save(Worldfile *wf, int wf_entity)
Definition: model.cc:205
std::vector< point_int_t > rt_cells
Definition: stage.hh:873
void DrawTrailFootprint()
Definition: model_draw.cc:49
std::string PoseString()
Definition: stage.hh:2089
@ CB_SHUTDOWN
Definition: stage.hh:1738
static int UpdateWrapper(Model *mod, void *)
Definition: stage.hh:2017
joules_t GetCapacity() const
Definition: powerpack.cc:212
double min
smallest value in range, initially zero
Definition: stage.hh:410
BumperSample * samples
Definition: stage.hh:2530
const std::string & GetModelType() const
Definition: stage.hh:1916
usec_t time
time that event occurs
Definition: stage.hh:978
Model * contact[2]
pointers to a model detected by the contacts
Definition: stage.hh:2454
@ CMD_OPEN
Definition: stage.hh:2433
virtual void Update()
Definition: model_bumper.cc:164
void DrawStatusTree(Camera *cam)
Definition: model_draw.cc:273
void addYaw(double yaw)
Definition: stage.hh:1394
std::string GetSayString()
Definition: stage.hh:1917
BlockGroup * group
The BlockGroup to which this Block belongs.
Definition: stage.hh:1190
virtual bool Update()
Definition: worldgui.cc:384
~ModelBlobfinder()
Destructor.
Definition: model_blobfinder.cc:98
static Color RandomColor()
Definition: color.cc:89
bounds3d_t extent
Describes the 3D volume of the world.
Definition: stage.hh:844
@ __CB_TYPE_COUNT
must be the last entry: counts the number of types
Definition: stage.hh:1743
double _x
Definition: stage.hh:1275
bool debug
Definition: stage.hh:666
void Zero()
Definition: stage.hh:293
void AddToPose(const Pose &pose)
Definition: model.cc:638
Definition: worldfile.hh:67
usec_t sim_interval
Definition: stage.hh:1018
Model * GetUnsubscribedModelOfType(const std::string &type) const
Definition: model.cc:739
WorldGui(int width, int height, const char *caption=NULL)
Definition: worldgui.cc:191
Geom geom
Definition: stage.hh:1777
virtual void Visualize(Model *mod, Camera *cam)
Definition: model.cc:885
double lift_position
0.0 = full down, 1.0 full up
Definition: stage.hh:2446
Definition: options_dlg.hh:20
joules_t RemainingCapacity() const
Definition: powerpack.cc:148
void Load(Worldfile *wf, int sec)
Definition: camera.cc:86
virtual ~Visualizer(void)
Definition: stage.hh:531
Flag(const Color &color, double size)
Definition: model.cc:994
Model * ground
Definition: stage.hh:892
void Disable()
Definition: stage.hh:2156
meters_t y
Definition: stage.hh:446
virtual void Load()
Definition: model_position.cc:195
bool charging
Definition: stage.hh:1587
void Dissipate(joules_t j)
Definition: powerpack.cc:234
void Load(Worldfile *wf, int entity)
Definition: model_ranger.cc:146
usec_t last_time
Definition: stage.hh:1593
Model * mod
Definition: stage.hh:1578
void Enable()
Definition: stage.hh:2159
Definition: stage.hh:2341
const std::vector< Blob > & GetBlobs() const
Definition: stage.hh:2383
Size size
extent
Definition: stage.hh:379
virtual void Load()
Definition: model_blobfinder.cc:136
~Block()
Definition: block.cc:30
virtual bool IsGUI() const
Definition: stage.hh:1056
int enabled
Definition: stage.hh:548
Definition: stage.hh:1205
unsigned int GetEventQueue(Model *mod) const
Definition: world.cc:678
meters_t z
location in 3 axes
Definition: stage.hh:259
Pose est_pose_error
Definition: stage.hh:2878
meters_t x
Definition: stage.hh:446
void DrawOccupancy() const
Definition: worldgui.cc:458
void Print(const char *prefix) const
Definition: color.cc:94
cb_t(model_callback_t cb, void *arg)
Definition: stage.hh:1693
double GetSize()
Definition: stage.hh:1720
unsigned int event_queue_num
Definition: stage.hh:1886
void SetZ(double min, double max)
Definition: block.cc:107
Bounds range
min and max range of sensor
Definition: stage.hh:439
class Stg::Model::Visibility vis
virtual ~ModelRanger()
Definition: model_ranger.cc:120
void DrawGrid()
Definition: model_draw.cc:550
meters_t range
range to the target
Definition: stage.hh:2557
void AddBlockRect(meters_t x, meters_t y, meters_t dx, meters_t dy, meters_t dz)
Definition: model.cc:378
virtual void Visualize(Model *mod, Camera *cam)
Definition: model_position.cc:684
watts_t last_watts
Definition: stage.hh:1595
bool HasSubscribers() const
Definition: stage.hh:2319
void Load(Worldfile *wf, int wf_entity)
Definition: stage.hh:2121
@ CB_INIT
Definition: stage.hh:1733
double normalize(double a)
Definition: stage.hh:163
double GetMaxPosition() const
Definition: stage.hh:2936
radians_t bearing
bearing to the target
Definition: stage.hh:2558
void SetOdom(Pose odom)
Definition: model_position.cc:664
bool obstacle_return
Definition: stage.hh:1930
BlockGroup blockgroup
Definition: stage.hh:1679
void AppendTouchingModels(std::set< Model * > &touchers)
Definition: model.cc:656
void Map()
Definition: stage.hh:1976
bool operator==(const point_int_t &other) const
Definition: stage.hh:487
usec_t GetInterval()
Definition: stage.hh:1923
point_t hit_point
Definition: stage.hh:2519
void addPitch(double pitch)
Definition: stage.hh:1342
World * GetWorld() const
Definition: stage.hh:2188
virtual void UpdateCharge()
Definition: model.cc:676
void forward(double amount)
Definition: camera.cc:80
void draw_speech_bubble(float x, float y, float z, const char *str)
Definition: gl.cc:83
double b
Definition: stage.hh:216
double farClip(void) const
Definition: stage.hh:1357
@ PADDLE_CLOSED
Definition: stage.hh:2419
void Unsubscribe()
Definition: model.cc:529
meters_t length
Definition: stage.hh:2513
static std::map< std::string, creator_t > name_map
Definition: stage.hh:2320
Ancestor()
Definition: ancestor.cc:4
void Map(unsigned int layer)
Definition: block.cc:170
virtual Model * RecentlySelectedModel() const
Definition: worldgui.cc:880
cmd_t
Definition: stage.hh:2431
Bounds acceleration_bounds[4]
Definition: stage.hh:2802
uint64_t UpdateCount()
Definition: stage.hh:862
Stg::ModelBlobfinder::Vis vis
meters_t size
rendered as a sphere with this diameter
Definition: stage.hh:550
ControlMode
Definition: stage.hh:2783
virtual void Redraw(void)
Definition: worldgui.cc:606
int key
/// only detect fiducials with a key that matches this one (defaults 0)
Definition: stage.hh:2592
joules_t stored
Definition: stage.hh:1581
Ray(const Model *mod, const Pose &origin, const meters_t range, const ray_test_func_t func, const void *arg, const bool ztest)
Definition: stage.hh:713
virtual Model * RecentlySelectedModel() const
Definition: stage.hh:905
virtual void Load()
Definition: model.cc:1242
radians_t fov
Definition: stage.hh:2636
int id
Definition: stage.hh:2564
GLfloat z
Definition: stage.hh:2702
static Option showBeams
Definition: stage.hh:2623
virtual void Draw(void) const
Definition: camera.cc:38
ModelRanger class
Definition: stage.hh:2610
StripPlotVis stored_vis
Definition: stage.hh:1575
~ModelBlinkenlight()
Definition: model_blinkenlight.cc:82
@ CONTROL_POSITION
Definition: stage.hh:2783
BumperConfig * bumpers
Definition: stage.hh:2529
Bounds x
volume extent along x axis, intially zero
Definition: stage.hh:427
@ FiducialNone
Definition: stage.hh:185
virtual void Stop()
Definition: worldgui.cc:637
bool IsDescendent(const Model *testmod) const
Definition: model.cc:428
double ProportionRemaining() const
Definition: stage.hh:1622
void MapFromRoot(unsigned int layer)
Find the root model, and map/unmap the whole tree.
Definition: model.cc:497
double scale() const
Definition: stage.hh:1413
void SetVelocity(const Velocity &val)
Definition: model_position.cc:157
Model * hit
Definition: stage.hh:2518
int update_cb_count
Definition: stage.hh:1023
bool used
TRUE iff this model has been returned by GetUnusedModelOfType()
Definition: stage.hh:1887
Velocity & Load(Worldfile *wf, int section, const char *keyword)
Definition: stage.hh:354
bool data_fresh
Definition: stage.hh:1758
void NeedRedraw()
Definition: stage.hh:890
unsigned int trail_index
Definition: stage.hh:1869
uint32_t top
Definition: stage.hh:2336
virtual void SetToken(const std::string &str)
Definition: stage.hh:1905
virtual ~Pose()
Definition: stage.hh:266
uint32_t GetCount() const
Definition: stage.hh:1261
void SetRangerReturn(double val)
Definition: model.cc:1129
@ PADDLE_CLOSING
Definition: stage.hh:2421
Definition: stage.hh:1553
virtual ~RasterVis(void)
Definition: stage.hh:1826
Definition: stage.hh:1817
virtual void Startup()
Definition: model_ranger.cc:124
virtual ~BumperVis()
Definition: model_bumper.cc:211
void AddUpdateCallback(world_callback_t cb, void *user)
Definition: world.cc:524
meters_t range
Definition: stage.hh:2337
@ CMD_UP
Definition: stage.hh:2435
@ LIFT_UPPING
Verbed these to match the paddle state.
Definition: stage.hh:2427
int y
Definition: stage.hh:474
void InitControllers()
Definition: model.cc:318
const Block & GetBlock(unsigned int index) const
Definition: stage.hh:1262
Visualizer(const std::string &menu_name, const std::string &worldfile_name)
Definition: stage.hh:526
Stg::ModelRanger::Vis vis
double kg_t
Definition: stage.hh:206
void DrawBoundingBox()
Definition: model_draw.cc:187
const std::set< Model * > GetAllModels() const
Definition: stage.hh:1114
Stg::PowerPack::DissipationVis event_vis
void Visualize(Vis *vis, ModelRanger *rgr) const
Definition: model_ranger.cc:268
virtual void Update()
Definition: model.cc:593
void GoTo(double x, double y, double a)
Definition: model_position.cc:637
Waypoint()
Definition: model_position.cc:804
void SetGripperReturn(bool val)
Definition: model.cc:1097
Definition: stage.hh:1709
virtual void Update()
Definition: model_actuator.cc:163
Color()
Definition: color.cc:13
std::list< PowerPack * > pps_charging
Definition: stage.hh:1814
const char * Token() const
Definition: stage.hh:689
meters_t z
Definition: stage.hh:243
ModelGripper(World *world, Model *parent, const std::string &type)
constructor
Definition: model_gripper.cc:63
void strafe(double amount)
Definition: camera.cc:74
bool operator!=(const Pose &other) const
Definition: stage.hh:319
Visibility & Load(Worldfile *wf, int wf_entity)
Definition: model.cc:193
void UnMapFromRoot(unsigned int layer)
Definition: model.cc:511
std::vector< TrailItem > trail
Definition: stage.hh:1866
void SetXSpeed(double x)
Definition: model_position.cc:604
joules_t last_joules
Definition: stage.hh:1594
void Shutdown(void)
Definition: model_fiducial.cc:372
Velocity GetGlobalVelocity() const
Definition: model_position.cc:164
Pose pose
Definition: stage.hh:1807
void CancelQuitAll()
Definition: stage.hh:1103
void SetSpeed(double x, double y, double a)
Definition: model_position.cc:595
std::set< Model * > active_energy
Definition: stage.hh:1011
virtual std::string ClockString(void) const
Definition: world.cc:498
@ DRIVE_DIFFERENTIAL
Definition: stage.hh:2789
Definition: stage.hh:2415
void DrawPose(Pose pose)
Definition: model_draw.cc:159
void Print(const char *prefix) const
Definition: stage.hh:386
void RegisterModels()
Definition: typetable.cc:16
Pose geom
size and relative angle of the target
Definition: stage.hh:2559
@ LIFT_DOWNING
Definition: stage.hh:2428
Pose LocalToGlobal(const Pose &pose) const
Definition: stage.hh:2296
void ConsumeQueue(unsigned int queue_num)
Definition: world.cc:579
unsigned int sample_count
Definition: stage.hh:2640
Definition: stage.hh:2631
@ LOCALIZATION_GPS
Definition: stage.hh:2786
int used
Definition: stage.hh:1833
kg_t GetTotalMass() const
Definition: model.cc:793
void GoTo(double pose)
Definition: model_actuator.cc:280
void DrawBoundingBoxTree()
Definition: model_draw.cc:176
static int argc
Definition: glutgraphics.cc:215
void CancelQuit()
Definition: stage.hh:1101
bool ignore_zloc
Definition: stage.hh:2593
void setPitch(double pitch)
Definition: stage.hh:1393
virtual void Update()
Definition: model_blobfinder.cc:165
void SetGuiMove(bool val)
Definition: model.cc:1144
bool operator<(const Pose &p) const
a < b iff a is closer to the origin than b
Definition: stage.hh:307
void Quit()
Definition: stage.hh:1097
virtual void PushColor(Color col)
dummy implementations to be overloaded by GUI subclasses
Definition: worldgui.cc:865
virtual std::string ClockString() const
Definition: worldgui.cc:415
void draw_centered_rect(float x, float y, float dx, float dy)
Definition: gl.cc:120
void CommandClose()
Definition: stage.hh:2497
const Color & Load(Worldfile *wf, int entity)
Definition: color.cc:99
Definition: stage.hh:2399
@ CMD_NOOP
Default state.
Definition: stage.hh:2432
std::string worldfile
Definition: stage.hh:755
bool InitDone()
Definition: stage.cc:40
double _yaw
Definition: stage.hh:1274
void SetProperty(std::string &key, void *value)
Definition: stage.hh:702
void SetMapResolution(meters_t res)
Definition: model.cc:1164
const Model * mod
Definition: stage.hh:720
meters_t y
Definition: stage.hh:243
Definition: stage.hh:1854
usec_t sim_time
the current sim time in this world in microseconds
Definition: stage.hh:853
~ModelCamera()
Definition: model_camera.cc:115
double constrain(double val, double minval, double maxval)
return val, or minval if val < minval, or maxval if val > maxval
Definition: stage.cc:236
Flag * PopFlag()
Definition: model.cc:347
struct timeval time_t
Definition: stage.hh:197
void Subtract(joules_t j)
Definition: powerpack.cc:163
void Translate(double x, double y)
Definition: block.cc:36
void * GetProperty(std::string &key)
Definition: stage.hh:704
config_t GetConfig()
Definition: stage.hh:2493
void DataVisualizeTree(Camera *cam)
Definition: model_draw.cc:529
std::vector< std::queue< Model * > > pending_update_callbacks
Definition: stage.hh:992
Pose(meters_t x, meters_t y, meters_t z, radians_t a)
Definition: stage.hh:262
void PushFlag(Flag *flag)
Definition: model.cc:339
void addYaw(double yaw)
Definition: stage.hh:1340
Model * GetChild(const std::string &name) const
Definition: model.cc:862
double ranger_return
0 - 1
Definition: stage.hh:1931
BlockGroup(Model &mod)
Definition: blockgroup.cc:13
Pose pose
Definition: stage.hh:1857
@ TYPE_ROTATIONAL
Definition: stage.hh:2898
const bounds3d_t & GetExtent() const
Definition: stage.hh:1116
std::list< std::pair< world_callback_t, void * > > cb_list
List of callback functions and arguments.
Definition: stage.hh:843
const char AUTHORS[]
Definition: stage.hh:108
static Pose Random(meters_t xmin, meters_t xmax, meters_t ymin, meters_t ymax)
Definition: stage.hh:269
void RemoveAllColors()
Definition: model_blobfinder.cc:131
virtual void Visualize(Model *mod, Camera *cam)
Definition: model_position.cc:747
void setPose(double x, double y)
Definition: stage.hh:1405
usec_t time
Definition: stage.hh:1856
Pose GlobalToLocal(const Pose &pose) const
Definition: model.cc:398
@ CB_VELOCITY
Definition: stage.hh:1741
bool(* ray_test_func_t)(Model *candidate, const Model *finder, const void *arg)
Definition: stage.hh:569
std::vector< Model * > & GetChildren()
Definition: stage.hh:681
double range_noise
Definition: stage.hh:2638
std::map< std::string, unsigned int > child_type_counts
Definition: stage.hh:662
Model * Root()
Definition: stage.hh:2190
void DrawTrailBlocks()
Definition: model_draw.cc:86
bool operator<(const point_int_t &other) const
Definition: stage.hh:478
virtual void Print(const char *prefix) const
Definition: stage.hh:365
Bounds(double min, double max)
Definition: stage.hh:415
double friction
Definition: stage.hh:1773
Definition: stage.hh:2538
void pose_inverse_shift(const Pose &pose)
Definition: gl.cc:18
void RecordRay(double x1, double y1, double x2, double y2)
Definition: world.cc:701
ray_test_func_t func
Definition: stage.hh:723
paddle_state_t
Definition: stage.hh:2417
void SetWorldfile(Worldfile *wf, int wf_entity)
Definition: stage.hh:2130
Definition: stage.hh:1128
Pose pose
position
Definition: stage.hh:378
void LoadSensor(Worldfile *wf, int entity)
Definition: model_ranger.cc:139
Block & GetBlockMutable(unsigned int index)
Definition: stage.hh:1263
static const Color yellow
Definition: stage.hh:233
double _pitch
Definition: stage.hh:1273
double _y
Definition: stage.hh:1275
point3_t()
Definition: stage.hh:468
virtual void AddModel(Model *mod)
Definition: world.cc:264
bool ztest
Definition: stage.hh:725
static joules_t global_dissipated
Definition: stage.hh:1600
void move(double x, double y, double z)
Definition: camera.cc:22
virtual bool Update(void)
Definition: world.cc:605
std::list< Flag * > flag_list
Definition: stage.hh:1769
void PopCoords()
Definition: model_draw.cc:237
virtual void TogglePause()
Definition: stage.hh:867
Color color
Definition: stage.hh:2335
void SetSpeed(double speed)
Definition: model_actuator.cc:274
Definition: stage.hh:2510
void SetZSpeed(double z)
Definition: model_position.cc:616
Stg::ModelBumper::BumperVis bumpervis
virtual void SetProjection(void) const =0
virtual void Shutdown()
Definition: model_ranger.cc:130
radians_t fov
Horizontal field of view in radians, in the range 0 to pi.
Definition: stage.hh:2362
bool IsRelated(const Model *testmod) const
Definition: model.cc:441
Definition: stage.hh:1421
Definition: stage.hh:2700
static char * argv
Definition: glutgraphics.cc:216
void ClearRays()
Definition: world.cc:711
virtual ~ModelFiducial()
Definition: model_fiducial.cc:99
@ CMD_DOWN
Definition: stage.hh:2436
double paddle_position
0.0 = full open, 1.0 full closed
Definition: stage.hh:2445
Definition: file_manager.hh:9
int subs
Definition: stage.hh:1832
Model * mod
Definition: stage.hh:330
void Print(const char *prefix) const
Definition: stage.hh:1625
std::vector< Waypoint > waypoints
Definition: stage.hh:2836
CtrlArgs(std::string w, std::string c)
Definition: stage.hh:758
void draw_octagon(float w, float h, float m)
Definition: gl.cc:90
std::vector< double > bearings
Definition: stage.hh:2645
void SetYSpeed(double y)
Definition: model_position.cc:610
virtual void SetProjection(void) const
Definition: camera.cc:50
radians_t a
rotation about the z axis.
Definition: stage.hh:260
double joules_t
Definition: stage.hh:209
void PushLocalCoords()
Definition: model_draw.cc:227
Velocity GetVelocity() const
Definition: stage.hh:2814
void SetFiducialKey(int key)
Definition: model.cc:1114
usec_t SimTimeNow(void) const
Definition: stage.hh:1049
Color color
Definition: stage.hh:2833
double GetPosition() const
Definition: stage.hh:2935
void setPitch(double pitch)
Definition: stage.hh:1341
virtual void Load()
Definition: model_camera.cc:127
void AddVisualizer(Visualizer *custom_visual, bool on_by_default)
Definition: model_draw.cc:242
uint64_t usec_t
Definition: stage.hh:203
Size size
Definition: stage.hh:2634
virtual void Visualize(Model *mod, Camera *cam)
Definition: model_blobfinder.cc:290
meters_t max_range_id
maximum range at which the ID can be read
Definition: stage.hh:2588
WorldGui * world_gui
Pointer to the GUI world - NULL if running in non-gui mode.
Definition: stage.hh:1902
void RegisterOption(Option *opt)
Definition: model.cc:844
Vis(World *world)
Definition: model_ranger.cc:410
void addPitch(double pitch)
Definition: stage.hh:1395
double break_beam_inset[2]
distance from the end of the paddle
Definition: stage.hh:2452
joules_t capacity
Definition: stage.hh:1584
void CallUpdateCallbacks()
Call all calbacks in cb_list, removing any that return true;.
Definition: world.cc:546
void SetObstacleReturn(bool val)
Definition: model.cc:1119
void AddModelName(Model *mod, const std::string &name)
Definition: world.cc:270
const char WEBSITE[]
Definition: stage.hh:113
void AddCallback(callback_type_t type, model_callback_t cb, void *user)
Definition: model_callbacks.cc:5
void DrawFootPrint()
Definition: block.cc:295
ModelBlobfinder class
Definition: stage.hh:2330
Pose pose
Definition: stage.hh:2633
bool GetCharging() const
Definition: stage.hh:1640
double meters_t
Definition: stage.hh:191
static Option showFov
Definition: stage.hh:2622
void AddPoint(meters_t x, meters_t y)
Definition: model.cc:984
radians_t angle
width of viewing angle of sensor
Definition: stage.hh:440
double x(void) const
Definition: stage.hh:1285
static void Print()
Definition: logentry.cc:14
@ LIFT_UP
Definition: stage.hh:2426
ModelPosition class
Definition: stage.hh:2777
static std::string ctrlargs
Definition: stage.hh:776
friend class ModelFiducial
Definition: stage.hh:1662
~ModelPosition()
Destructor.
Definition: model_position.cc:152
void reset()
Definition: stage.hh:1364
ModelPosition(World *world, Model *parent, const std::string &type)
Constructor.
Definition: model_position.cc:113
bool operator<(const Event &other) const
Definition: world.cc:1128
bool stall
Set to true iff the model collided with something else.
Definition: stage.hh:1845
static Model * LookupId(uint32_t id)
Definition: stage.hh:2091
int SetParent(Model *newparent)
Definition: model.cc:1175
void SetBlobReturn(bool val)
Definition: model.cc:1124
const std::vector< Sensor > & GetSensors() const
Definition: stage.hh:2661
bool operator<(const cb_t &other) const
Definition: stage.hh:1697
double radians_t
Definition: stage.hh:194
void Redraw()
Definition: model.cc:765
virtual void Load()
Definition: model_bumper.cc:118
void SetGravityReturn(bool val)
Camera()
Definition: stage.hh:1278
uint32_t id_t
Definition: stage.hh:188
The Stage library uses its own namespace.
Definition: canvas.hh:8
double CenterX()
Definition: block.cc:69
point3_t(meters_t x, meters_t y, meters_t z)
Definition: stage.hh:467
void draw_grid(bounds3d_t vol)
Definition: gl.cc:140
static const Color cyan
Definition: stage.hh:233
int subs
the number of subscriptions to this model
Definition: stage.hh:1846
Pose pose
Definition: stage.hh:329
std::vector< Blob > & GetBlobsMutable()
Definition: stage.hh:2386
Model * GetGround()
Definition: stage.hh:1125
void UnMap(unsigned int layer)
Definition: block.cc:183
void setPitch(double pitch)
change the pitch
Definition: stage.hh:2760
@ DRIVE_OMNI
Definition: stage.hh:2789
virtual void Visualize(Model *mod, Camera *cam)
Definition: model_ranger.cc:419
virtual void Visualize(Model *mod, Camera *cam)
Definition: model_bumper.cc:216
bool alwayson
Definition: stage.hh:1677
Color color
Definition: stage.hh:1753
meters_t range
Definition: stage.hh:2364
void draw_array(float x, float y, float w, float h, float *data, size_t len, size_t offset, float min, float max)
Definition: gl.cc:24
bool log_state
iff true, model state is logged
Definition: stage.hh:1798
const char * Version()
Definition: stage.cc:12
virtual ~PoseVis(void)
Definition: stage.hh:2848
Geom()
Definition: stage.hh:396
Worldfile * wf
If set, points to the worldfile used to create this world.
Definition: stage.hh:857
Definition: stage.hh:2845
void Stop()
Definition: model_position.cc:590
int polys_from_image_file(const std::string &filename, std::vector< std::vector< point_t > > &polys)
rotated rectangle
Definition: stage.cc:86
virtual ~World()
Definition: world.cc:166
static joules_t global_input
Definition: stage.hh:1601
paddle_state_t paddles
Definition: stage.hh:2443
Pose pose
Definition: stage.hh:2512
Stg::Model::RasterVis rastervis
void ChargeStop()
Definition: stage.hh:1642
Bounds range
Definition: stage.hh:2635
RaytraceResult Raytrace(const Pose &pose, const meters_t range, const ray_test_func_t func, const void *arg, const bool ztest)
Definition: stage.hh:2000
bool IsEnabled() const
Definition: stage.hh:2161
void reset(void)
Definition: stage.hh:1412
void AppendTouchingModels(std::set< Model * > &touchers)
Definition: block.cc:116
@ CB_FLAGINCR
Definition: stage.hh:1731
bool IsAntecedent(const Model *testmod) const
Definition: model.cc:416
virtual void Start()
Definition: stage.hh:865
Color GetColor()
Definition: stage.hh:1719
double g
Definition: stage.hh:216
void DrawVoxels() const
Definition: worldgui.cc:480
virtual void Update()
Definition: model_ranger.cc:202
Worldfile * GetWorldFile()
Definition: stage.hh:1052
friend class Model
Definition: stage.hh:767
StripPlotVis output_vis
Definition: stage.hh:1574
double pitch(void) const
Definition: stage.hh:1284
virtual ~Model()
Definition: model.cc:300
std::string String() const
Definition: model_ranger.cc:258
double dtor(double d)
Definition: stage.hh:157
usec_t interval
time between updates in usec
Definition: stage.hh:1795
virtual bool Save(const char *filename)
Definition: worldgui.cc:351
SuperRegion * CreateSuperRegion(point_int_t origin)
Definition: world.cc:176
meters_t ModelHeight() const
Definition: model.cc:617
radians_t fov
field of view
Definition: stage.hh:2590
static Option showArea
Definition: stage.hh:2620
~PowerPack()
Definition: powerpack.cc:38
virtual void DrawStatus(Camera *cam)
Definition: model_draw.cc:282
DissipationVis(meters_t width, meters_t height, meters_t cellsize)
Definition: powerpack.cc:257
PowerPack(Model *mod)
Definition: powerpack.cc:17
const GLubyte * FrameColor() const
get a reference to camera color image. 4 bytes (RGBA) per pixel
Definition: stage.hh:2758
double rtod(double r)
Definition: stage.hh:151
void * arg
Definition: stage.hh:981
std::vector< Sensor > & GetSensorsMutable()
Definition: stage.hh:2663
watts_t watts_give
Definition: stage.hh:1893
virtual void Visualize(Model *mod, Camera *cam)
Definition: powerpack.cc:268
void Enqueue(unsigned int queue_num, usec_t delay, Model *mod, model_callback_t cb, void *arg)
Definition: stage.hh:1005
void SetConfig(config_t &newcfg)
Definition: stage.hh:2486
void Save(Worldfile *wf, int section)
Definition: ancestor.cc:53
void BecomeParentOf(Model *child)
Definition: model.cc:819
bool paused
if true, the simulation is stopped
Definition: stage.hh:863
Pose est_pose
Definition: stage.hh:2877
virtual bool Load(const std::string &worldfile_path)
Definition: world.cc:380
Color color
Definition: stage.hh:551
std::vector< meters_t > ranges
Definition: stage.hh:2643
void SetBoundary(bool val)
Definition: model.cc:1134
void Load(Worldfile *wf, int entity)
Definition: block.cc:309
class Stg::Model::GuiState gui
void Save(Worldfile *wf, int sec)
Definition: camera.cc:92
virtual void UnLoad()
Definition: world.cc:474
WaypointVis()
Definition: model_position.cc:742
void SetColor(Color col)
Definition: model.cc:1081
std::vector< point_int_t > rt_candidate_cells
Definition: stage.hh:874
@ CB_FLAGDECR
Definition: stage.hh:1730
void SetFriction(double friction)
Definition: model.cc:857
Ray()
Definition: stage.hh:719
ModelBlinkenlight(World *world, Model *parent, const std::string &type)
Definition: model_blinkenlight.cc:61
ModelBlobfinder(World *world, Model *parent, const std::string &type)
Constructor.
Definition: model_blobfinder.cc:86
bool has_default_block
Definition: stage.hh:1791
Model * mod
model to pass into callback
Definition: stage.hh:979
friend class WorkerThread
Definition: stage.hh:770
uint32_t right
Definition: stage.hh:2336
const PerspectiveCamera & getCamera(void) const
get reference to camera used
Definition: stage.hh:2754
virtual void Update()
Definition: model_position.cc:283
std::vector< double > intensities
Definition: stage.hh:2644
int fiducial_key
Definition: stage.hh:1927
Definition: stage.hh:1548
void SetFiducialReturn(int fid)
Definition: model.cc:1102
meters_t range
Definition: stage.hh:722
World * world
Pointer to the world in which this model exists.
Definition: stage.hh:1901
void SetCenter(double x, double y)
Definition: block.cc:88
virtual void RemoveModel(Model *mod)
Definition: world.cc:275
void NeedRedraw()
Definition: model.cc:755
Definition: stage.hh:1688
point_int_t MetersToPixels(const point_t &pt) const
Definition: stage.hh:918
void Add(joules_t j)
Definition: powerpack.cc:153
meters_t range
Definition: stage.hh:332
ControlMode
Definition: stage.hh:2895
bool operator<(const point_t &other) const
Definition: stage.hh:451
std::string EnergyString(void) const
Definition: worldgui.cc:445
static Option showTransducers
Definition: stage.hh:2624
int(* model_callback_t)(Model *mod, void *user)
Definition: stage.hh:540
meters_t min_range
minimum detection range
Definition: stage.hh:2589
virtual void SetProjection(void) const
Definition: camera.cc:113
void Zero()
Definition: stage.hh:399
Bounds y
volume extent along y axis, initially zero
Definition: stage.hh:429
void TransferTo(PowerPack *dest, joules_t amount)
Definition: powerpack.cc:177
Size(meters_t x, meters_t y, meters_t z)
Definition: stage.hh:245
Pose origin
Definition: stage.hh:721
virtual ~Vis(void)
Definition: stage.hh:2344
@ CB_SAVE
Definition: stage.hh:1737
OrthoCamera(void)
Definition: stage.hh:1383
virtual void UnLoad()
Definition: worldgui.cc:346
static bool UpdateAll()
Definition: world.cc:216
void DrawBoundingBoxTree()
Definition: worldgui.cc:859
Definition: stage.hh:1780
@ CONTROL_VELOCITY
Definition: stage.hh:2783
PowerPack * FindPowerPack() const
Definition: model.cc:833
double CenterY()
Definition: block.cc:49
std::vector< std::priority_queue< Event > > event_queues
Definition: stage.hh:989
meters_t x
Definition: stage.hh:259
ModelBumper class
Definition: stage.hh:2508
double Resolution() const
Definition: stage.hh:1108
void Save(Worldfile *wf, int sec)
Definition: camera.cc:205
Color color
Definition: stage.hh:1858
radians_t heading
center of field of view
Definition: stage.hh:2591
std::set< Option * > option_table
GUI options (toggles) registered by models.
Definition: stage.hh:847
int CallCallbacks(callback_type_t type)
Definition: model_callbacks.cc:32
static const Color red
Definition: stage.hh:233
Definition: stage.hh:1374
void EnableEnergy(Model *m)
Definition: stage.hh:1012
PerspectiveCamera(void)
Definition: camera.cc:16
static const int DEFAULT_PPM
Definition: stage.hh:876
uint64_t trail_interval
Definition: stage.hh:1877
double y(void) const
Definition: stage.hh:1286
@ CONTROL_VELOCITY
Definition: stage.hh:2895
void UnMap()
Definition: stage.hh:1985
void scroll(double dy)
Definition: stage.hh:1355
static const Color magenta
Definition: stage.hh:233
ModelRanger(World *world, Model *parent, const std::string &type)
Definition: model_ranger.cc:102
bool operator!=(const Color &other) const
Definition: color.cc:17
bool grid
Definition: stage.hh:1782
void MapWithChildren(unsigned int layer)
Definition: model.cc:488
Bounds z
volume extent along z axis, initially zero
Definition: stage.hh:431
Model class
Definition: stage.hh:1651
Color color
Definition: stage.hh:331
double realDistance(double z_buf_val) const
Definition: stage.hh:1351
meters_t max_range_anon
maximum detection range
Definition: stage.hh:2587
std::string say_string
if non-empty, this string is displayed in the GUI
Definition: stage.hh:1841
Stg::ModelPosition::WaypointVis wpvis
static void Run()
Definition: world.cc:190
virtual void Reload()
Definition: world.cc:984
void SetSize(double sz)
Definition: model.cc:1022
virtual ~Vis(void)
Definition: stage.hh:2627
void move(double x, double y)
Definition: camera.cc:135
point_int_t()
Definition: stage.hh:476
int sgn(int a)
Definition: stage.hh:173
unsigned long msec_t
Definition: stage.hh:200
const char DESCRIPTION[]
Definition: stage.hh:116
void Init(int *argc, char **argv[])
Definition: stage.cc:17
Pose pose
Definition: stage.hh:2832
std::vector< std::set< cb_t > > callbacks
Definition: stage.hh:1750
void AppendValue(float value)
Definition: vis_strip.cc:44
virtual Pose GetGlobalPose() const
Definition: ancestor.cc:34
ModelLightIndicator(World *world, Model *parent, const std::string &type)
Definition: model_lightindicator.cc:5
double angle_noise
Definition: stage.hh:2637
Block(BlockGroup *group, const std::vector< point_t > &pts, const Bounds &zrange)
Definition: block.cc:12
bool PastQuitTime()
Definition: world.cc:493
virtual void Save()
Definition: model_gripper.cc:158
Model * TestCollision()
Definition: model.cc:661
std::string cmdline
Definition: stage.hh:756
void SetWatts(watts_t watts)
Definition: model.cc:1159
void LoadModel(Worldfile *wf, int entity)
Definition: world.cc:339
void RemoveColor(Color col)
Definition: model_blobfinder.cc:121
void ShowClock(bool enable)
Control printing time to stdout.
Definition: stage.hh:1123
int getHeight(void) const
height of captured image
Definition: stage.hh:2752
virtual void Startup()
Definition: model_bumper.cc:95
Geom(const Pose &p, const Size &s)
Definition: stage.hh:398
void RemovePowerPack(PowerPack *pp)
Definition: world.cc:1109
virtual void DrawPicker()
Definition: model_draw.cc:509
virtual void DataVisualize(Camera *cam)
Definition: model_draw.cc:524
virtual void Start()
Definition: worldgui.cc:612
void draw_string(float x, float y, float z, const char *string)
Definition: gl.cc:61
bool blob_return
Definition: stage.hh:1926
std::list< float * > ray_list
List of rays traced for debug visualization.
Definition: stage.hh:852
meters_t z
Definition: stage.hh:466
static std::vector< std::string > args
Definition: stage.hh:775
const std::string & TokenStr() const
Definition: stage.hh:690
@ CB_LOAD
Definition: stage.hh:1734
void SetStall(bool stall)
Definition: model.cc:1092
ModelActuator(World *world, Model *parent, const std::string &type)
Constructor.
Definition: model_actuator.cc:65
usec_t RealTimeNow(void) const
Definition: worldgui.cc:885
#define PRINT_ERR(m)
Definition: stage.hh:590
bool Paused() const
Definition: stage.hh:868
joules_t GetStored() const
Definition: powerpack.cc:217
void DrawOriginTree()
Definition: model_draw.cc:140
void SetGeom(const Geom &src)
Definition: model.cc:1061
double GetSpeed() const
Definition: stage.hh:2930