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();
void SetTurnSpeed(double a)
Definition: model_position.cc:622
Bounds()
Definition: stage.hh:414
callback_type_t
Definition: stage.hh:1729
radians_t fov
field of view
Definition: stage.hh:2590
meters_t range
range to the target
Definition: stage.hh:2557
void SetBoundary(bool val)
Definition: model.cc:1134
bool operator==(const Color &other) const
Definition: color.cc:84
Pose pose
Definition: stage.hh:329
std::vector< point_int_t > rt_candidate_cells
Definition: stage.hh:874
unsigned int scan_height
setting this small saves computation time.
Definition: stage.hh:2366
virtual void PushColor(Color col)
Definition: stage.hh:2059
ModelCamera(World *world, Model *parent, const std::string &type)
Definition: model_camera.cc:89
Definition: stage.hh:2845
Geom(const Pose &p, const Size &s)
Definition: stage.hh:398
Model class
Definition: stage.hh:1651
Definition: stage.hh:2895
meters_t y
Definition: stage.hh:466
Definition: stage.hh:1688
uint32_t right
Definition: stage.hh:2336
const PerspectiveCamera & getCamera(void) const
get reference to camera used
Definition: stage.hh:2754
meters_t max_range_anon
maximum detection range
Definition: stage.hh:2587
Definition: stage.hh:1548
void coord_shift(double x, double y, double z, double a)
Definition: gl.cc:6
virtual void Start()
Definition: stage.hh:865
void Shutdown(void)
Definition: model_fiducial.cc:372
msec_t period
duration of a complete cycle
Definition: stage.hh:552
Model * Parent() const
Definition: stage.hh:2186
void GoTo(double x, double y, double a)
Definition: model_position.cc:637
Worldfile * GetWorldFile()
Definition: stage.hh:1052
bool autosnatch
if true, cycle the gripper through open-close-up-down automatically
Definition: stage.hh:2451
point3_t(meters_t x, meters_t y, meters_t z)
Definition: stage.hh:467
virtual void Startup()
Definition: model_actuator.cc:255
ModelGripper(World *world, Model *parent, const std::string &type)
constructor
Definition: model_gripper.cc:63
void DrawOccupancy() const
Definition: worldgui.cc:458
SuperRegion * CreateSuperRegion(point_int_t origin)
Definition: world.cc:176
meters_t ModelHeight() const
Definition: model.cc:617
Stg::ModelBumper::BumperVis bumpervis
meters_t size
rendered as a sphere with this diameter
Definition: stage.hh:550
Sensor()
Definition: stage.hh:2647
int subs
the number of subscriptions to this model
Definition: stage.hh:1846
meters_t x
Definition: stage.hh:466
Event(usec_t time, Model *mod, model_callback_t cb, void *arg)
Definition: stage.hh:973
static size_t Count()
Definition: stage.hh:746
void Show()
Definition: worldgui.cc:254
void Save(Worldfile *wf, int section, const char *keyword) const
Definition: model.cc:170
const std::string & GetWorldfileName()
Definition: stage.hh:535
point_int_t(int x, int y)
Definition: stage.hh:475
bool ztest
Definition: stage.hh:725
cmd_t
Definition: stage.hh:2431
void LoadBlock(Worldfile *wf, int entity)
Definition: model.cc:368
virtual void Visualize(Model *mod, Camera *cam)
Definition: model_position.cc:684
void Enqueue(unsigned int queue_num, usec_t delay, Model *mod, model_callback_t cb, void *arg)
Definition: stage.hh:1005
joules_t stored
Definition: stage.hh:1581
Bounds y
volume extent along y axis, initially zero
Definition: stage.hh:429
virtual void DrawBlocks()
Definition: model_draw.cc:171
radians_t heading
center of field of view
Definition: stage.hh:2591
virtual void Load()
Definition: model_position.cc:195
static bool UpdateAll()
Definition: world.cc:216
void UnMapWithChildren(unsigned int layer)
Definition: model.cc:502
void Save(Worldfile *wf, int sec)
Definition: camera.cc:92
virtual void Start()
Definition: worldgui.cc:612
bool IsZero() const
Definition: stage.hh:291
virtual void UnLoad()
Definition: world.cc:474
static void Print()
Definition: logentry.cc:14
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
double CenterY()
Definition: block.cc:49
void CommandOpen()
Definition: stage.hh:2499
Flag * Nibble(double portion)
Definition: model.cc:998
virtual void PushColor(Color col)
dummy implementations to be overloaded by GUI subclasses
Definition: stage.hh:924
point_int_t()
Definition: stage.hh:476
double GetMinPosition() const
Definition: stage.hh:2937
const Model * mod
Definition: stage.hh:720
virtual void Draw(void) const =0
double Resolution() const
Definition: stage.hh:1108
Color color
Definition: stage.hh:2641
int CallCallbacks(callback_type_t type)
Definition: model_callbacks.cc:32
static joules_t global_input
Definition: stage.hh:1601
bool operator==(const Pose &other) const
Definition: stage.hh:314
unsigned int FullVersion()
unsigned int GetFlagCount() const
Definition: stage.hh:2151
Model * mod
Definition: stage.hh:1578
static const int DEFAULT_PPM
Definition: stage.hh:876
double a
Definition: stage.hh:216
Definition: stage.hh:2783
void update(void)
Definition: camera.cc:70
std::string cmdline
Definition: stage.hh:756
usec_t GetEnergyInterval() const
Definition: stage.hh:1940
Velocity GetVelocity() const
Definition: stage.hh:2814
uint64_t updates
the number of simulated time steps executed so far
Definition: stage.hh:856
ModelRanger(World *world, Model *parent, const std::string &type)
Definition: model_ranger.cc:102
virtual ~Vis(void)
Definition: stage.hh:2627
ActuatorType GetType() const
Definition: stage.hh:2938
Default state.
Definition: stage.hh:2418
Velocity()
Definition: stage.hh:352
const std::string & GetMenuName()
Definition: stage.hh:534
~ModelCamera()
Definition: model_camera.cc:115
bool stack_children
whether child models should be stacked on top of this model or not
Definition: stage.hh:1843
bool graphics
true iff we have a GUI
Definition: stage.hh:845
Model * GetUnusedModelOfType(const std::string &type)
Definition: model.cc:770
const char LICENSE[]
Definition: stage.hh:119
void DrawOriginTree()
Definition: model_draw.cc:140
double max
largest value in range, initially zero
Definition: stage.hh:412
Definition: stage.hh:2676
void LoadBlock(Worldfile *wf, int entity)
Definition: world.cc:283
World class
Definition: stage.hh:764
double dtor(double d)
Definition: stage.hh:157
void setYaw(double yaw)
Definition: stage.hh:1392
Pose GetGlobalPose() const
Definition: model.cc:1200
PowerPack * FindPowerPack() const
Definition: model.cc:833
void Save(Worldfile *wf, int section, const char *keyword)
Definition: model.cc:182
Definition: stage.hh:2433
int32_t MetersToPixels(meters_t x) const
Definition: stage.hh:916
The Stage library uses its own namespace.
Definition: canvas.hh:8
Block(BlockGroup *group, const std::vector< point_t > &pts, const Bounds &zrange)
Definition: block.cc:12
Stg::ModelRanger::Vis vis
std::vector< Fiducial > & GetFiducials()
fiducial detector?
Definition: stage.hh:2597
static const Color red
Definition: stage.hh:233
void EnableEnergy(Model *m)
Definition: stage.hh:1012
PerspectiveCamera(void)
Definition: camera.cc:16
BumperSample * samples
Definition: stage.hh:2530
GLfloat z
Definition: stage.hh:2702
void setPose(double x, double y)
Definition: stage.hh:1405
Color color
Definition: stage.hh:551
void CallUpdateCallbacks(void)
Definition: model.cc:612
void CommandClose()
Definition: stage.hh:2497
joules_t GetCapacity() const
Definition: powerpack.cc:212
void SetPose(const Pose &pose)
Definition: model.cc:1216
int fiducial_return
Definition: stage.hh:1928
Definition: stage.hh:2333
radians_t fov
Definition: stage.hh:2636
RasterVis()
Definition: model.cc:879
Definition: stage.hh:2419
Color GetColor() const
Definition: stage.hh:2233
virtual void Load()
Definition: model_fiducial.cc:295
static std::vector< std::string > args
Definition: stage.hh:775
bool InitDone()
Definition: stage.cc:40
static const Color magenta
Definition: stage.hh:233
ModelLightIndicator(World *world, Model *parent, const std::string &type)
Definition: model_lightindicator.cc:5
must be the last entry: counts the number of types
Definition: stage.hh:1743
ActuatorType
Definition: stage.hh:2898
radians_t fov
Horizontal field of view in radians, in the range 0 to pi.
Definition: stage.hh:2362
Definition: stage.hh:1733
void Extend(point3_t pt)
Definition: world.cc:1094
bool Paused() const
Definition: stage.hh:868
bool ignore_zloc
Definition: stage.hh:2593
virtual void Reload()
Definition: world.cc:984
virtual void Stop()
Definition: stage.hh:866
bounds3d_t BoundingBox() const
Definition: blockgroup.cc:53
meters_t x
Definition: stage.hh:243
void ChargeStop()
Definition: stage.hh:1642
static Option showBeams
Definition: stage.hh:2623
void GLSet(void)
Definition: stage.hh:237
Size()
Definition: stage.hh:248
void Save(Worldfile *wf, int wf_entity)
Definition: model.cc:205
bool TestQuit() const
Definition: stage.hh:1095
void DrawTrailArrows()
Definition: model_draw.cc:106
Pose operator+(const Pose &p) const
Definition: stage.hh:297
void RegisterOption(Option *opt)
Register an Option for pickup by the GUI.
Definition: world.cc:1115
uint32_t bottom
Definition: stage.hh:2336
~BlockGroup()
Definition: blockgroup.cc:17
Definition: stage.hh:1854
StripPlotVis output_vis
Definition: stage.hh:1574
double lift_position
0.0 = full down, 1.0 full up
Definition: stage.hh:2446
virtual void Shutdown()
Definition: model_position.cc:577
Model * TestCollision()
Definition: model.cc:661
void LoadModel(Worldfile *wf, int entity)
Definition: world.cc:339
void Accumulate(meters_t x, meters_t y, joules_t amount)
Definition: powerpack.cc:296
bool operator<(const Event &other) const
Definition: world.cc:1128
Definition: stage.hh:1374
void RemovePowerPack(PowerPack *pp)
Definition: world.cc:1109
Definition: stage.hh:2789
Verbed these to match the paddle state.
Definition: stage.hh:2427
cb_t(model_callback_t cb, void *arg)
Definition: stage.hh:1693
Color GetColor()
Definition: stage.hh:1719
virtual void PushColor(double r, double g, double b, double a)
Definition: stage.hh:925
point3_t GetAxis() const
Definition: stage.hh:2939
static joules_t global_capacity
Definition: stage.hh:1599
Visibility()
Definition: model.cc:187
virtual void DrawPicker()
Definition: model_draw.cc:509
uint32_t GetId() const
Definition: stage.hh:2235
std::map< point_int_t, SuperRegion * > superregions
Definition: stage.hh:854
const char AUTHORS[]
Definition: stage.hh:108
int key
/// only detect fiducials with a key that matches this one (defaults 0)
Definition: stage.hh:2592
kg_t GetMassOfChildren() const
Definition: model.cc:803
virtual void RemoveChild(Model *mod)
Definition: worldgui.cc:439
Definition: stage.hh:2786
void DrawStatusTree(Camera *cam)
Definition: model_draw.cc:273
void Save(Worldfile *wf, int section)
Definition: ancestor.cc:53
void SetGlobalPose(const Pose &gpose)
Definition: model.cc:1170
Model & mod
Definition: stage.hh:1216
PowerPack * power_pack
Definition: stage.hh:1810
uint32_t left
Definition: stage.hh:2336
virtual void Visualize(Model *mod, Camera *cam)
Definition: model_bumper.cc:216
virtual void DrawSelected(void)
Definition: model_draw.cc:12
double _yaw
Definition: stage.hh:1274
virtual void Shutdown()
Definition: model_actuator.cc:262
Definition: stage.hh:2898
CtrlArgs(std::string w, std::string c)
Definition: stage.hh:758
Definition: options_dlg.hh:20
virtual void PushColor(double r, double g, double b, double a)
Definition: stage.hh:2060
virtual void PopColor()
Definition: stage.hh:933
virtual void AddChild(Model *mod)
Definition: ancestor.cc:15
void SetSpeed(double x, double y, double a)
Definition: model_position.cc:595
virtual void Save()
Definition: model_gripper.cc:158
SuperRegion * AddSuperRegion(const point_int_t &coord)
Definition: world.cc:1057
std::string token
Definition: stage.hh:671
void DrawImage(uint32_t texture_id, Camera *cam, float alpha, double width=1.0, double height=1.0)
Definition: model_draw.cc:381
void Init(int *argc, char **argv[])
Definition: stage.cc:17
static const Size size
Definition: stage.hh:2475
std::vector< Sensor > & GetSensorsMutable()
Definition: stage.hh:2663
Definition: stage.hh:2631
virtual void UpdateCharge()
Definition: model.cc:676
Definition: stage.hh:2516
void addPose(double x, double y, double z)
Definition: stage.hh:1321
~ModelLightIndicator()
Definition: model_lightindicator.cc:10
virtual void Update()
Capture a new frame ( calls GetFrame )
Definition: model_camera.cc:147
static const Color blue
Definition: stage.hh:233
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
int x
Definition: stage.hh:474
virtual ~RasterVis(void)
Definition: stage.hh:1826
Definition: stage.hh:2415
ModelPosition(World *world, Model *parent, const std::string &type)
Constructor.
Definition: model_position.cc:113
Definition: stage.hh:1817
virtual void Load(Worldfile *wf, int sec)=0
Vis(World *world)
Definition: model_blobfinder.cc:282
void TryCharge(PowerPack *pp, const Pose &pose)
void Add(joules_t j)
Definition: powerpack.cc:153
static Color RandomColor()
Definition: color.cc:89
Pose GetPose() const
Definition: stage.hh:2250
StripPlotVis stored_vis
Definition: stage.hh:1575
meters_t z
Definition: stage.hh:466
cb_t(world_callback_t cb, void *arg)
Definition: stage.hh:1694
Vis(World *world)
Definition: model_ranger.cc:410
virtual void Update()
Definition: model_blobfinder.cc:165
void AddToPose(const Pose &pose)
Definition: model.cc:638
void SetStall(bool stall)
Definition: model.cc:1092
bool HasSubscribers() const
Definition: stage.hh:2319
static joules_t global_stored
Definition: stage.hh:1598
point_t()
Definition: stage.hh:448
BumperConfig * bumpers
Definition: stage.hh:2529
usec_t sim_interval
Definition: stage.hh:1018
double _z
Definition: stage.hh:1275
Geom geom
Definition: stage.hh:1777
bool RandomPoseInFreeSpace(meters_t xmin, meters_t xmax, meters_t ymin, meters_t ymax, size_t max_iter=0)
Definition: model.cc:644
double _x
Definition: stage.hh:1275
void Zero()
Definition: stage.hh:253
bool IsDescendent(const Model *testmod) const
Definition: model.cc:428
double CenterX()
Definition: block.cc:69
bool used
TRUE iff this model has been returned by GetUnusedModelOfType()
Definition: stage.hh:1887
void Load(Worldfile *wf, int sec)
Definition: camera.cc:86
const std::string type
Definition: stage.hh:1883
static void Clear()
Definition: stage.hh:748
watts_t watts
power consumed by this model
Definition: stage.hh:1889
Definition: stage.hh:2421
void forward(double amount)
Definition: camera.cc:80
Definition: stage.hh:1296
void LoadSensor(Worldfile *wf, int entity)
Definition: world.cc:294
int(* model_callback_t)(Model *mod, void *user)
Definition: stage.hh:540
Pose pose
Definition: stage.hh:2512
void EraseAll(T thing, C &cont)
Definition: stage.hh:584
double min
smallest value in range, initially zero
Definition: stage.hh:410
const double billion
Definition: stage.hh:148
const char * Version()
Definition: stage.cc:12
virtual void Startup()
Definition: model_bumper.cc:95
Size & Load(Worldfile *wf, int section, const char *keyword)
Definition: model.cc:164
void setYaw(double yaw)
Definition: stage.hh:1337
void Map(unsigned int layer)
Definition: block.cc:170
void SetConfig(config_t &newcfg)
Definition: stage.hh:2486
PoseVis()
Definition: model_position.cc:680
Size size
extent
Definition: stage.hh:379
uint32_t id
Definition: stage.hh:1794
std::list< PowerPack * > powerpack_list
List of all the powerpacks attached to models in the world.
Definition: stage.hh:849
void draw_origin(double len)
Definition: gl.cc:133
ModelBlinkenlight(World *world, Model *parent, const std::string &type)
Definition: model_blinkenlight.cc:61
const double thousand
Definition: stage.hh:142
void Print(const char *prefix) const
Definition: color.cc:94
virtual Model * RecentlySelectedModel() const
Definition: stage.hh:905
void Rasterize(uint8_t *data, unsigned int width, unsigned int height, meters_t cellwidth, meters_t cellheight)
Definition: model.cc:849
virtual void DrawBlocks()
Definition: model_lightindicator.cc:19
void RemoveAllColors()
Definition: model_blobfinder.cc:131
virtual void DataVisualize(Camera *cam)
Draw Camera Model - TODO.
Definition: model_camera.cc:221
void AddFlag(Flag *flag)
Definition: model.cc:323
meters_t map_resolution
Definition: stage.hh:1799
Definition: stage.hh:1730
double angle_noise
Definition: stage.hh:2637
int update_cb_count
Definition: stage.hh:1023
virtual void Visualize(Model *mod, Camera *cam)
Definition: model_ranger.cc:419
virtual void Load()
Definition: model_actuator.cc:85
void AppendTouchingModels(std::set< Model * > &touchers)
Definition: model.cc:656
Pose & Load(Worldfile *wf, int section, const char *keyword)
Definition: model.cc:175
Bounds velocity_bounds[4]
Definition: stage.hh:2805
std::vector< point_int_t > LocalToPixels(const std::vector< point_t > &local) const
Definition: model.cc:469
uint32_t top
Definition: stage.hh:2336
double duty_cycle
mark/space ratio
Definition: stage.hh:553
void SetZSpeed(double z)
Definition: model_position.cc:616
SuperRegion * GetSuperRegionCreate(const point_int_t &org)
Definition: world.cc:1082
void SetColor(const Color &col)
Definition: model.cc:1011
Flag(const Color &color, double size)
Definition: model.cc:994
std::vector< Blob > & GetBlobsMutable()
Definition: stage.hh:2386
ray_test_func_t func
Definition: stage.hh:723
std::string String() const
Definition: stage.hh:283
Model * hit
Definition: stage.hh:2518
uint64_t UpdateCount()
Definition: stage.hh:862
void draw_string_multiline(float x, float y, float w, float h, const char *string, Fl_Align align)
Definition: gl.cc:75
Ancestor & Load(Worldfile *wf, int section)
Definition: ancestor.cc:48
watts_t watts_take
Definition: stage.hh:1897
meters_t range
Definition: stage.hh:2364
void setPose(double x, double y, double z)
Definition: stage.hh:1315
void SetGuiGrid(bool val)
Definition: model.cc:1149
ModelCamera class
Definition: stage.hh:2698
void SetYSpeed(double y)
Definition: model_position.cc:610
virtual void Redraw(void)
Definition: worldgui.cc:606
unsigned int event_queue_num
Definition: stage.hh:1886
usec_t interval_energy
time between updates of powerpack in usec
Definition: stage.hh:1796
void LoadBlockGroup(Worldfile *wf, int entity)
Definition: stage.hh:2428
const double million
Definition: stage.hh:145
double _pitch
Definition: stage.hh:1273
void GoTo(double pose)
Definition: model_actuator.cc:280
void DestroySuperRegion(SuperRegion *sr)
Definition: world.cc:184
void Print(const char *prefix) const
Definition: stage.hh:1625
void AddBlockRect(meters_t x, meters_t y, meters_t dx, meters_t dy, meters_t dz)
Definition: model.cc:378
usec_t time
time that event occurs
Definition: stage.hh:978
void SetCenter(double x, double y)
Definition: block.cc:88
virtual void PopColor()
Definition: stage.hh:2061
void Load(Worldfile *wf, int wf_entity)
Definition: stage.hh:2121
model_callback_t cb
Definition: stage.hh:980
void Visualize(Camera *cam)
Definition: powerpack.cc:47
virtual void Print(const char *prefix) const
Definition: stage.hh:365
void RemoveFlag(Flag *flag)
Definition: model.cc:331
virtual void RemoveChild(Model *mod)
Definition: ancestor.cc:28
Bounds(double min, double max)
Definition: stage.hh:415
bool Stalled() const
Definition: stage.hh:2314
std::vector< TrailItem > trail
Definition: stage.hh:1866
double ranger_return
0 - 1
Definition: stage.hh:1931
void setFov(double horiz_fov, double vert_fov)
Definition: stage.hh:1330
void Dissipate(joules_t j)
Definition: powerpack.cc:234
kg_t mass
Definition: stage.hh:1800
void SetMapResolution(meters_t res)
Definition: model.cc:1164
void Say(const std::string &str)
Definition: model.cc:410
lift_state_t
Definition: stage.hh:2424
Stg::ModelPosition::PoseVis posevis
usec_t last_time
Definition: stage.hh:1593
void DrawSolid(bool topview)
Definition: block.cc:303
void DataVisualizeTree(Camera *cam)
Definition: model_draw.cc:529
void ForEachDescendant(model_callback_t func, void *arg)
Definition: ancestor.cc:39
bool nose
Definition: stage.hh:1784
float s
Definition: glutgraphics.cc:51
virtual ~Pose()
Definition: stage.hh:266
virtual std::string ClockString(void) const
Definition: world.cc:498
void RegisterModels()
Definition: typetable.cc:16
void reset(void)
Definition: stage.hh:1412
void LoadControllerModule(const char *lib)
Definition: model.cc:1469
ModelBumper(World *world, Model *parent, const std::string &type)
Definition: model_bumper.cc:70
~ModelPosition()
Destructor.
Definition: model_position.cc:152
TrailItem()
Definition: stage.hh:1860
bool thread_safe
Definition: stage.hh:1851
virtual void Visualize(Model *mod, Camera *cam)=0
void DrawFootPrint(const Geom &geom)
Definition: blockgroup.cc:146
const GLfloat * FrameDepth() const
get a reference to camera depth buffer
Definition: stage.hh:2756
virtual ~PoseVis(void)
Definition: stage.hh:2848
Default state.
Definition: stage.hh:2425
virtual ~WaypointVis(void)
Definition: stage.hh:2841
void AddUpdateCallback(world_callback_t cb, void *user)
Definition: world.cc:524
const std::vector< Sensor > & GetSensors() const
Definition: stage.hh:2661
meters_t range
Definition: stage.hh:2337
void Save(Worldfile *wf, int sec)
Definition: camera.cc:205
usec_t time
Definition: stage.hh:1856
meters_t z
location in 3 axes
Definition: stage.hh:259
meters_t y
Definition: stage.hh:259
std::set< ModelPosition * > active_velocity
Definition: stage.hh:1015
void DrawBoundingBoxTree()
Definition: model_draw.cc:176
Definition: file_manager.hh:9
Worldfile * wf
Definition: stage.hh:1899
bool charging
Definition: stage.hh:1587
ModelBlobfinder(World *world, Model *parent, const std::string &type)
Constructor.
Definition: model_blobfinder.cc:86
point_t(meters_t x, meters_t y)
Definition: stage.hh:447
Definition: stage.hh:2434
ModelPosition class
Definition: stage.hh:2777
virtual void Update()
Definition: model_blinkenlight.cc:95
void MapFromRoot(unsigned int layer)
Find the root model, and map/unmap the whole tree.
Definition: model.cc:497
void SetStickyReturn(bool val)
void SetVelocity(const Velocity &val)
Definition: model_position.cc:157
void SetWorldfile(Worldfile *wf, int wf_entity)
Definition: stage.hh:2130
virtual void Print(char *prefix) const
Definition: model_bumper.cc:195
void Load(Worldfile *wf, int entity)
Definition: block.cc:309
static void * update_thread_entry(std::pair< World *, int > *info)
Definition: world.cc:228
void RemoveColor(Color col)
Definition: model_blobfinder.cc:121
OrthoCamera(void)
Definition: stage.hh:1383
uint32_t bumper_count
Definition: stage.hh:2528
bool disabled
Definition: stage.hh:1763
Color color
Definition: stage.hh:2833
Pose pose
Definition: stage.hh:558
double watts_t
Definition: stage.hh:212
bool PlaceInFreeSpace(meters_t xmin, meters_t xmax, meters_t ymin, meters_t ymax, size_t max_iter=0)
virtual Pose GetGlobalPose() const
Definition: ancestor.cc:34
Geom GetGeom() const
Definition: stage.hh:2247
Definition: stage.hh:2436
Definition: stage.hh:1709
int y
Definition: stage.hh:474
void Print(const char *prefix) const
Definition: stage.hh:386
virtual void Shutdown()
Definition: model_blobfinder.cc:262
Pose LocalToGlobal(const Pose &pose) const
Definition: stage.hh:2296
Model * mod
use this in robot controllers!)
Definition: stage.hh:2563
Definition: stage.hh:2783
void RemoveVisualizer(Visualizer *custom_visual)
Definition: model_draw.cc:264
joules_t GetDissipated() const
Definition: powerpack.cc:222
uint64_t GetUpdateCount() const
Definition: stage.hh:1118
void SetSpeed(double speed)
Definition: model_actuator.cc:274
std::list< std::pair< world_callback_t, void * > > cb_list
List of callback functions and arguments.
Definition: stage.hh:843
double horizFov(void) const
Definition: stage.hh:1338
double GetMaxPosition() const
Definition: stage.hh:2936
Bounds range
Definition: stage.hh:2635
virtual void Update()
Definition: model_bumper.cc:164
joules_t last_joules
Definition: stage.hh:1594
void CancelQuit()
Definition: stage.hh:1101
Definition: stage.hh:1737
bool operator==(const point_int_t &other) const
Definition: stage.hh:487
void pose_inverse_shift(const Pose &pose)
Definition: gl.cc:18
const GLubyte * FrameColor() const
get a reference to camera color image. 4 bytes (RGBA) per pixel
Definition: stage.hh:2758
Pose origin
Definition: stage.hh:721
double normalize(double a)
Definition: stage.hh:163
std::vector< Model * > & GetChildren()
Definition: stage.hh:681
virtual void Shutdown()
Definition: model_bumper.cc:104
Definition: stage.hh:2789
bool operator<(const Pose &p) const
a < b iff a is closer to the origin than b
Definition: stage.hh:307
void SetGlobalVelocity(const Velocity &gvel)
Definition: model_position.cc:180
unsigned int GetSubscriptionCount() const
Definition: stage.hh:2317
const Color & Load(Worldfile *wf, int entity)
Definition: color.cc:99
int wf_entity
Definition: stage.hh:1900
bool move
Definition: stage.hh:1783
Model * Root()
Definition: stage.hh:2190
std::vector< double > bearings
Definition: stage.hh:2645
lift_state_t lift
Definition: stage.hh:2444
std::list< Visualizer * > cv_list
Definition: stage.hh:1766
Canvas * GetCanvas(void) const
Definition: stage.hh:1519
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
Model * mod
model to pass into callback
Definition: stage.hh:979
void RecordRay(double x1, double y1, double x2, double y2)
Definition: world.cc:701
virtual ~Visualizer(void)
Definition: stage.hh:531
static int argc
Definition: glutgraphics.cc:215
Pose est_pose
Definition: stage.hh:2877
usec_t sim_time
the current sim time in this world in microseconds
Definition: stage.hh:853
GuiState & Load(Worldfile *wf, int wf_entity)
Definition: model.cc:219
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
void draw_centered_rect(float x, float y, float dx, float dy)
Definition: gl.cc:120
void ChargeStart()
Definition: stage.hh:1641
void SetXSpeed(double x)
Definition: model_position.cc:604
unsigned int sample_count
Definition: stage.hh:2640
Definition: stage.hh:2786
Flag * PopFlag()
Definition: model.cc:347
void setClip(double near, double far)
Definition: stage.hh:1358
void AddCallback(callback_type_t type, model_callback_t cb, void *user)
Definition: model_callbacks.cc:5
void addYaw(double yaw)
Definition: stage.hh:1394
Size paddle_size
paddle dimensions
Definition: stage.hh:2442
virtual void AddModel(Model *mod)
Definition: world.cc:264
void Subtract(joules_t j)
Definition: powerpack.cc:163
virtual bool Update(void)
Definition: world.cc:605
uint32_t GetCount() const
Definition: stage.hh:1261
~PowerPack()
Definition: powerpack.cc:38
double r
Definition: stage.hh:216
virtual void TogglePause()
Definition: stage.hh:867
Definition: stage.hh:1735
void DrawTrailFootprint()
Definition: model_draw.cc:49
static Option showArea
Definition: stage.hh:2620
const bounds3d_t & GetExtent() const
Definition: stage.hh:1116
std::string PoseString()
Definition: stage.hh:2089
int RemoveCallback(callback_type_t type, model_callback_t callback)
Definition: model_callbacks.cc:17
Model()
Definition: stage.hh:2100
double rtod(double r)
Definition: stage.hh:151
Model * beam[2]
points to a model detected by the beams
Definition: stage.hh:2453
static Pose Random(meters_t xmin, meters_t xmax, meters_t ymin, meters_t ymax)
Definition: stage.hh:269
void SetData(uint8_t *data, unsigned int width, unsigned int height, meters_t cellwidth, meters_t cellheight)
Definition: model.cc:968
void ClearRays()
Definition: world.cc:711
const Block & GetBlock(unsigned int index) const
Definition: stage.hh:1262
radians_t bearing
bearing to the target
Definition: stage.hh:2558
Stg::ModelPosition::WaypointVis wpvis
~ModelActuator()
Destructor.
Definition: model_actuator.cc:80
Definition: stage.hh:1731
virtual void Print(char *prefix) const
Definition: model.cc:542
void addPitch(double pitch)
Definition: stage.hh:1395
meters_t range
Definition: stage.hh:722
Definition: stage.hh:2426
Ray()
Definition: stage.hh:719
double GetSize()
Definition: stage.hh:1720
virtual void Visualize(Model *mod, Camera *cam)
Definition: model.cc:885
Model * GetUnsubscribedModelOfType(const std::string &type) const
Definition: model.cc:739
void Draw(GLUquadric *quadric)
Definition: model.cc:1033
void SetGravityReturn(bool val)
meters_t Distance(const Pose &other) const
Definition: stage.hh:324
const std::string & TokenStr() const
Definition: stage.hh:690
int used
Definition: stage.hh:1833
Pose pose
Definition: stage.hh:1857
Pose pose
position
Definition: stage.hh:378
void LoadSensor(Worldfile *wf, int entity)
Definition: model_ranger.cc:139
bool obstacle_return
Definition: stage.hh:1930
Camera()
Definition: stage.hh:1278
void PushFlag(Flag *flag)
Definition: model.cc:339
meters_t range
Definition: stage.hh:332
#define PRINT_ERR(m)
Definition: stage.hh:590
double range_noise
Definition: stage.hh:2638
bool GetCharging() const
Definition: stage.hh:1640
void SetCenterY(double y)
Definition: block.cc:95
bool operator==(const cb_t &other) const
Definition: stage.hh:1706
bool DataIsFresh() const
Definition: stage.hh:2271
int getWidth(void) const
width of captured image
Definition: stage.hh:2750
model_callback_t callback
Definition: stage.hh:1690
Definition: stage.hh:2700
meters_t y
Definition: stage.hh:446
meters_t max_range_id
maximum range at which the ID can be read
Definition: stage.hh:2588
virtual ~StripPlotVis()
Definition: vis_strip.cc:18
std::string GetSayString()
Definition: stage.hh:1917
Definition: stage.hh:1421
Definition: stage.hh:1739
uint64_t usec_t
Definition: stage.hh:203
Definition: stage.hh:1553
bounds3d_t extent
Describes the 3D volume of the world.
Definition: stage.hh:844
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
void Zero()
Definition: stage.hh:293
void draw_grid(bounds3d_t vol)
Definition: gl.cc:140
double meters_t
Definition: stage.hh:191
virtual void Load()
Definition: model_gripper.cc:109
void ClearPts()
Definition: model.cc:989
joules_t dissipated
Definition: stage.hh:1590
Definition: stage.hh:1128
void Draw() const
Definition: model_position.cc:808
void Load(Worldfile *wf, int entity)
Definition: model_ranger.cc:146
void draw_vector(double x, double y, double z)
Definition: gl.cc:125
void PushLocalCoords()
Definition: model_draw.cc:227
void DrawTrailBlocks()
Definition: model_draw.cc:86
usec_t SimTimeNow(void) const
Definition: stage.hh:1049
meters_t x
Definition: stage.hh:446
const char DESCRIPTION[]
Definition: stage.hh:116
usec_t interval
time between updates in usec
Definition: stage.hh:1795
radians_t pan
Horizontal pan angle in radians, in the range -pi to +pi.
Definition: stage.hh:2363
std::map< std::string, void * > props
Definition: stage.hh:669
RaytraceResult Raytrace(const Ray &ray)
Definition: world.cc:756
static const Color cyan
Definition: stage.hh:233
meters_t y
Definition: stage.hh:243
RaytraceResult(const Pose &pose, Model *mod, const Color &color, const meters_t range)
Definition: stage.hh:335
LogEntry(usec_t timestamp, Model *mod)
Definition: logentry.cc:7
Model * TestCollision()
Definition: block.cc:129
Model * ground
Definition: stage.hh:892
Pose pose
Definition: stage.hh:549
std::list< Flag * > flag_list
Definition: stage.hh:1769
void pose_shift(const Pose &pose)
Definition: gl.cc:13
Definition: stage.hh:1740
std::vector< point_int_t > rt_cells
Definition: stage.hh:873
virtual void Save()
Definition: model.cc:1435
virtual ~BumperVis()
Definition: model_bumper.cc:211
ControlMode
Definition: stage.hh:2783
static int UpdateWrapper(Model *mod, void *)
Definition: stage.hh:2017
Color color
Definition: stage.hh:331
void CommandUp()
Definition: stage.hh:2501
virtual void Visualize(Model *mod, Camera *cam)
Definition: powerpack.cc:268
virtual void Load()
Definition: model_blinkenlight.cc:86
const std::string & GetModelType() const
Definition: stage.hh:1916
Visualizer(const std::string &menu_name, const std::string &worldfile_name)
Definition: stage.hh:526
bool IsRelated(const Model *testmod) const
Definition: model.cc:441
unsigned int GetEventQueue(Model *mod) const
Definition: world.cc:678
void SetProperty(std::string &key, void *value)
Definition: stage.hh:702
void SetCommand(cmd_t cmd)
Definition: stage.hh:2495
void CommandDown()
Definition: stage.hh:2503
void Stop()
Definition: model_position.cc:590
int SetParent(Model *newparent)
Definition: model.cc:1175
void SetZ(double min, double max)
Definition: block.cc:107
void SetBlobReturn(bool val)
Definition: model.cc:1124
void AppendTouchingModels(std::set< Model * > &touchers)
Definition: block.cc:116
bool IsAntecedent(const Model *testmod) const
Definition: model.cc:416
std::vector< Waypoint > waypoints
Definition: stage.hh:2836
friend class Model
Definition: stage.hh:767
virtual void Load()
Definition: model_camera.cc:127
void AddVisualizer(Visualizer *custom_visual, bool on_by_default)
Definition: model_draw.cc:242
void Redraw()
Definition: model.cc:765
meters_t z
Definition: stage.hh:243
Pose pose
Definition: stage.hh:2561
static std::vector< LogEntry > log
Definition: stage.hh:743
virtual void Startup()
Definition: model.cc:566
radians_t angle
width of viewing angle of sensor
Definition: stage.hh:440
double _y
Definition: stage.hh:1275
void addPitch(double pitch)
Definition: stage.hh:1342
meters_t length
Definition: stage.hh:2513
watts_t watts_give
Definition: stage.hh:1893
const char COPYRIGHT[]
Definition: stage.hh:105
double b
Definition: stage.hh:216
double farClip(void) const
Definition: stage.hh:1357
Model * contact[2]
pointers to a model detected by the contacts
Definition: stage.hh:2454
virtual void SetToken(const std::string &str)
Definition: stage.hh:1905
double close_limit
How far the gripper can close. If < 1.0, the gripper has its mouth full.
Definition: stage.hh:2450
virtual void Visualize(Model *mod, Camera *cam)
Definition: model_position.cc:747
int polys_from_image_file(const std::string &filename, std::vector< std::vector< point_t > > &polys)
rotated rectangle
Definition: stage.cc:86
void Subscribe()
Definition: model.cc:516
void SetRangerReturn(double val)
Definition: model.cc:1129
virtual void Startup()
Definition: model_blobfinder.cc:252
void Enable()
Definition: stage.hh:2159
virtual bool Load(const std::string &worldfile_path)
Definition: world.cc:380
virtual void SetProjection(void) const =0
Definition: stage.hh:1738
Pose est_pose_error
Definition: stage.hh:2878
Velocity & Load(Worldfile *wf, int section, const char *keyword)
Definition: stage.hh:354
Worldfile * wf
If set, points to the worldfile used to create this world.
Definition: stage.hh:857
virtual bool IsGUI() const
Definition: stage.hh:1056
bool blob_return
Definition: stage.hh:1926
virtual ~World()
Definition: world.cc:166
void SetFriction(double friction)
Definition: model.cc:857
void AddPoint(meters_t x, meters_t y)
Definition: model.cc:984
#define PRINT_WARN(m)
Definition: stage.hh:603
bool has_default_block
Definition: stage.hh:1791
Definition: stage.hh:2538
void draw_string(float x, float y, float z, const char *string)
Definition: gl.cc:61
void SetSize(double sz)
Definition: model.cc:1022
bool stall
Set to true iff the model collided with something else.
Definition: stage.hh:1845
bool operator<(const cb_t &other) const
Definition: stage.hh:1697
static char * argv
Definition: glutgraphics.cc:216
static Model * LookupId(uint32_t id)
Definition: stage.hh:2091
void SetFiducialReturn(int fid)
Definition: model.cc:1102
virtual void Draw(void) const
Definition: camera.cc:38
virtual void Update()
Definition: model.cc:593
double g
Definition: stage.hh:216
void SetGripperReturn(bool val)
Definition: model.cc:1097
void Update(ModelRanger *rgr)
Definition: model_ranger.cc:211
void NeedRedraw()
Definition: model.cc:755
virtual ~Model()
Definition: model.cc:300
Definition: stage.hh:1736
Bounds x
volume extent along x axis, intially zero
Definition: stage.hh:427
void TransferTo(PowerPack *dest, joules_t amount)
Definition: powerpack.cc:177
virtual void Stop()
Definition: worldgui.cc:637
virtual void Visualize(Model *mod, Camera *cam)
Definition: model_blobfinder.cc:290
Bounds range
min and max range of sensor
Definition: stage.hh:439
void Map()
Definition: stage.hh:1976
double ProportionRemaining() const
Definition: stage.hh:1622
usec_t GetInterval()
Definition: stage.hh:1923
virtual void DataVisualize(Camera *cam)
Definition: model_blinkenlight.cc:102
virtual ~Camera()
Definition: stage.hh:1279
void NeedRedraw()
Definition: stage.hh:890
unsigned int trail_index
Definition: stage.hh:1869
Pose(meters_t x, meters_t y, meters_t z, radians_t a)
Definition: stage.hh:262
void Disable()
Definition: stage.hh:2156
Bounds acceleration_bounds[4]
Definition: stage.hh:2802
virtual ~ModelBumper()
Definition: model_bumper.cc:87
void Unsubscribe()
Definition: model.cc:529
bool alwayson
Definition: stage.hh:1677
virtual bool Update()
Definition: worldgui.cc:384
bool paused
if true, the simulation is stopped
Definition: stage.hh:863
virtual void PopColor()
Definition: worldgui.cc:875
unsigned long msec_t
Definition: stage.hh:200
std::string String() const
Definition: model_ranger.cc:258
virtual bool Load(const std::string &worldfile_path)
Definition: worldgui.cc:278
BlockGroup(Model &mod)
Definition: blockgroup.cc:13
ModelFiducial class
Definition: stage.hh:2552
PowerPack(Model *mod)
Definition: powerpack.cc:17
std::vector< std::set< cb_t > > callbacks
Definition: stage.hh:1750
Pose pose
Definition: stage.hh:2633
virtual void Startup()
Definition: model_ranger.cc:124
virtual void PushColor(Color col)
dummy implementations to be overloaded by GUI subclasses
Definition: worldgui.cc:865
std::vector< std::priority_queue< Event > > event_queues
Definition: stage.hh:989
virtual ~DissipationVis()
Definition: powerpack.cc:264
virtual void Startup()
Definition: model_position.cc:568
virtual void Load()
Definition: model.cc:1242
class Stg::Model::Visibility vis
friend class WorkerThread
Definition: stage.hh:770
bounds3d_t(const Bounds &x, const Bounds &y, const Bounds &z)
Definition: stage.hh:434
virtual void SetToken(const std::string &str)
Definition: stage.hh:691
void DrawGrid()
Definition: model_draw.cc:550
virtual void Update()
Definition: model_actuator.cc:163
virtual void RemoveModel(Model *mod)
Definition: world.cc:275
bool operator!=(const Pose &other) const
Definition: stage.hh:319
point_int_t MetersToPixels(const point_t &pt) const
Definition: stage.hh:918
uint64_t trail_interval
Definition: stage.hh:1877
ModelRanger class
Definition: stage.hh:2610
void SetState(bool isOn)
Definition: model_lightindicator.cc:14
bool operator==(const point_t &other) const
Definition: stage.hh:460
void strafe(double amount)
Definition: camera.cc:74
void UnMapFromRoot(unsigned int layer)
Definition: model.cc:511
virtual ~ModelFiducial()
Definition: model_fiducial.cc:99
void Rasterize(uint8_t *data, unsigned int width, unsigned int height, meters_t cellwidth, meters_t cellheight)
Definition: block.cc:198
BlockGroup blockgroup
Definition: stage.hh:1679
bool paddles_stalled
true iff some solid object stopped the paddles closing or opening
Definition: stage.hh:2448
LocalizationMode
Definition: stage.hh:2786
Bounds z
volume extent along z axis, initially zero
Definition: stage.hh:431
World * GetWorld() const
Definition: stage.hh:2188
double realDistance(double z_buf_val) const
Definition: stage.hh:1351
Stg::Model::RasterVis rastervis
void Zero()
Definition: stage.hh:399
Pose pose
Definition: stage.hh:1807
Definition: stage.hh:1205
static void Run()
Definition: world.cc:190
std::set< Model * > active_energy
Definition: stage.hh:1011
~WorldGui()
Definition: worldgui.cc:244
std::string worldfile
Definition: stage.hh:755
void setScale(double scale)
Definition: stage.hh:1404
double GetPosition() const
Definition: stage.hh:2935
static std::map< std::string, creator_t > name_map
Definition: stage.hh:2320
double GetSpeed() const
Definition: stage.hh:2930
const char WEBSITE[]
Definition: stage.hh:113
void DrawFlagList()
Definition: model_draw.cc:425
WorldGui(int width, int height, const char *caption=NULL)
Definition: worldgui.cc:191
bool debug
Definition: stage.hh:666
uint32_t id_t
Definition: stage.hh:188
double scale() const
Definition: stage.hh:1413
Pose pose
Definition: stage.hh:2832
bool PastQuitTime()
Definition: world.cc:493
static Option showTransducers
Definition: stage.hh:2624
void InitControllers()
Definition: model.cc:318
void SetWatts(watts_t watts)
Definition: model.cc:1159
void ShowClock(bool enable)
Control printing time to stdout.
Definition: stage.hh:1123
point_t hit_point
Definition: stage.hh:2519
int getHeight(void) const
height of captured image
Definition: stage.hh:2752
const std::set< Model * > GetAllModels() const
Definition: stage.hh:1114
bool operator<(const point_t &other) const
Definition: stage.hh:451
std::set< Option * > option_table
GUI options (toggles) registered by models.
Definition: stage.hh:847
ControlMode
Definition: stage.hh:2895
void SetGuiMove(bool val)
Definition: model.cc:1144
double z(void) const
Definition: stage.hh:1287
virtual void DataVisualize(Camera *cam)
Definition: model_draw.cc:524
Pose geom
size and relative angle of the target
Definition: stage.hh:2559
World * world
Pointer to the world in which this model exists.
Definition: stage.hh:1901
void DrawVoxels() const
Definition: worldgui.cc:480
virtual void Print(char *prefix) const
Definition: model_ranger.cc:384
bool rebuild_displaylist
iff true, regenerate block display list before redraw
Definition: stage.hh:1840
Color()
Definition: color.cc:13
void setPitch(double pitch)
Definition: stage.hh:1393
Definition: stage.hh:2618
std::list< float * > ray_list
List of rays traced for debug visualization.
Definition: stage.hh:852
virtual Model * RecentlySelectedModel() const
Definition: worldgui.cc:880
void scroll(double dy)
Definition: stage.hh:1355
double range_noise_const
Definition: stage.hh:2639
bool operator!=(const Color &other) const
Definition: color.cc:17
bool data_fresh
Definition: stage.hh:1758
bool operator<(const point_int_t &other) const
Definition: stage.hh:478
void CancelQuitAll()
Definition: stage.hh:1103
std::string say_string
if non-empty, this string is displayed in the GUI
Definition: stage.hh:1841
int enabled
Definition: stage.hh:548
std::vector< std::queue< Model * > > pending_update_callbacks
Definition: stage.hh:992
void addYaw(double yaw)
Definition: stage.hh:1340
Definition: stage.hh:2898
Definition: stage.hh:1271
void ConsumeQueue(unsigned int queue_num)
Definition: world.cc:579
void DrawBlocksTree()
Definition: model_draw.cc:148
void draw_speech_bubble(float x, float y, float z, const char *str)
Definition: gl.cc:83
void SetCapacity(joules_t j)
Definition: powerpack.cc:199
virtual bool IsGUI() const
Definition: stage.hh:1509
Definition: stage.hh:1924
const void * arg
Definition: stage.hh:724
DriveMode
Definition: stage.hh:2789
void Load(Worldfile *wf, int sec)
Definition: camera.cc:198
double Constrain(double value)
returns value, but no smaller than min and no larger than max.
Definition: model.cc:159
void DrawBoundingBoxTree()
Definition: worldgui.cc:859
kg_t GetTotalMass() const
Definition: model.cc:793
Pose GlobalToLocal(const Pose &pose) const
Definition: model.cc:398
void Log(Model *mod)
Definition: world.cc:1121
void DrawBoundingBox()
Definition: model_draw.cc:187
static Option showFov
Definition: stage.hh:2622
Definition: stage.hh:2838
void Quit()
Definition: stage.hh:1097
Size size
Definition: stage.hh:559
std::string EnergyString(void) const
Definition: worldgui.cc:445
double break_beam_inset[2]
distance from the end of the paddle
Definition: stage.hh:2452
void QuitAll()
Definition: stage.hh:1099
void SetFiducialKey(int key)
Definition: model.cc:1114
std::list< PowerPack * > pps_charging
Definition: stage.hh:1814
void Visualize(Vis *vis, ModelRanger *rgr) const
Definition: model_ranger.cc:268
Definition: stage.hh:2783
virtual void Load()
Definition: model_bumper.cc:118
void UnMap()
Definition: stage.hh:1985
void SetStored(joules_t j)
Definition: powerpack.cc:227
WaypointVis()
Definition: model_position.cc:742
void SetGuiNose(bool val)
Definition: model.cc:1139
Block & GetBlockMutable(unsigned int index)
Definition: stage.hh:1263
std::vector< Model * > children
Definition: stage.hh:664
void MapWithChildren(unsigned int layer)
Definition: model.cc:488
double constrain(double val, double minval, double maxval)
return val, or minval if val < minval, or maxval if val > maxval
Definition: stage.cc:236
ModelBumper class
Definition: stage.hh:2508
static const Color green
Definition: stage.hh:233
static const Color yellow
Definition: stage.hh:233
Definition: worldfile.hh:67
ModelActuator(World *world, Model *parent, const std::string &type)
Constructor.
Definition: model_actuator.cc:65
void Translate(double x, double y)
Definition: block.cc:36
struct timeval time_t
Definition: stage.hh:197
joules_t capacity
Definition: stage.hh:1584
void SetGeom(const Geom &src)
Definition: model.cc:1061
DissipationVis(meters_t width, meters_t height, meters_t cellsize)
Definition: powerpack.cc:257
void AppendValue(float value)
Definition: vis_strip.cc:44
void DrawPose(Pose pose)
Definition: model_draw.cc:159
Model * GetChild(const std::string &name) const
Definition: model.cc:862
Bounds & Load(Worldfile *wf, int section, const char *keyword)
Definition: model.cc:153
virtual void Shutdown()
Definition: model.cc:582
Definition: stage.hh:2555
Geom()
Definition: stage.hh:396
void SetCenterX(double y)
Definition: block.cc:102
paddle_state_t paddles
Definition: stage.hh:2443
void draw_octagon(float w, float h, float m)
Definition: gl.cc:90
Definition: stage.hh:1732
~ModelBlobfinder()
Destructor.
Definition: model_blobfinder.cc:98
usec_t RealTimeNow(void) const
Definition: worldgui.cc:885
SuperRegion * GetSuperRegion(const point_int_t &org)
Definition: world.cc:1069
double pitch(void) const
Definition: stage.hh:1284
Pose est_origin
Definition: stage.hh:2879
ModelActuator class
Definition: stage.hh:2892
Definition: stage.hh:2510
ModelFiducial(World *world, Model *parent, const std::string &type)
Definition: model_fiducial.cc:76
class Stg::Model::GuiState gui
Definition: stage.hh:1530
radians_t a
rotation about the z axis.
Definition: stage.hh:260
Definition: stage.hh:2789
static Option showStrikes
Definition: stage.hh:2621
std::map< std::string, unsigned int > child_type_counts
Definition: stage.hh:662
meters_t min_range
minimum detection range
Definition: stage.hh:2589
double y(void) const
Definition: stage.hh:1286
~Block()
Definition: block.cc:30
bool(* ray_test_func_t)(Model *candidate, const Model *finder, const void *arg)
Definition: stage.hh:569
void DisableEnergy(Model *m)
Definition: stage.hh:1013
Definition: stage.hh:1734
int GetFiducialReturn() const
Definition: stage.hh:2228
void setAspect(double aspect)
update vertical fov based on window aspect and current horizontal fov
Definition: stage.hh:1336
std::vector< meters_t > ranges
Definition: stage.hh:2643
virtual void Print(const char *prefix) const
Definition: stage.hh:278
void * arg
Definition: stage.hh:981
Definition: stage.hh:2399
int(* world_callback_t)(World *world, void *user)
Definition: stage.hh:542
void setPitch(double pitch)
Definition: stage.hh:1341
double friction
Definition: stage.hh:1773
joules_t RemainingCapacity() const
Definition: powerpack.cc:148
Model * CreateModel(Model *parent, const std::string &typestr)
Definition: world.cc:307
Definition: stage.hh:2895
std::vector< double > intensities
Definition: stage.hh:2644
Stg::ModelBlobfinder::Vis vis
void CallUpdateCallbacks()
Call all calbacks in cb_list, removing any that return true;.
Definition: world.cc:546
virtual bool Save(const char *filename)
Definition: world.cc:971
GuiState()
Definition: model.cc:215
Default state.
Definition: stage.hh:2432
void AddModelName(Model *mod, const std::string &name)
Definition: world.cc:270
void SetMass(kg_t mass)
Definition: model.cc:1087
virtual void Visualize(Model *mod, Camera *cam)
Definition: vis_strip.cc:24
void move(double x, double y, double z)
Definition: camera.cc:22
void setPitch(double pitch)
change the pitch
Definition: stage.hh:2760
Definition: stage.hh:2435
virtual void Load()
Definition: model_blobfinder.cc:136
double kg_t
Definition: stage.hh:206
double paddle_position
0.0 = full open, 1.0 full closed
Definition: stage.hh:2445
bool IsTopView()
Definition: worldgui.cc:892
Color color
Definition: stage.hh:2335
Color color
Definition: stage.hh:1753
int boundary
Definition: stage.hh:1683
Model * GetModel(const std::string &name) const
Definition: world.cc:688
virtual ~ModelGripper()
destructor
Definition: model_gripper.cc:105
bool log_state
iff true, model state is logged
Definition: stage.hh:1798
bool gripper_return
Definition: stage.hh:1929
Definition: stage.hh:2441
double x(void) const
Definition: stage.hh:1285
Velocity GetOdomError() const
Definition: stage.hh:2822
virtual void SetProjection(void) const
Definition: camera.cc:113
virtual void Shutdown()
Definition: model_ranger.cc:130
watts_t last_watts
Definition: stage.hh:1595
usec_t GetUpdateInterval() const
Definition: stage.hh:1939
bool outline
Definition: stage.hh:1785
static std::string ctrlargs
Definition: stage.hh:776
double yaw(void) const
Definition: stage.hh:1283
virtual void Redraw(void)
Definition: stage.hh:872
config_t GetConfig()
Definition: stage.hh:2493
static joules_t global_dissipated
Definition: stage.hh:1600
void move(double x, double y)
Definition: camera.cc:135
void setYaw(double yaw)
change the yaw
Definition: stage.hh:2767
Definition: stage.hh:2825
double joules_t
Definition: stage.hh:209
virtual void SetProjection(void) const
Definition: camera.cc:50
World(const std::string &name="MyWorld", double ppm=DEFAULT_PPM)
Definition: world.cc:128
bool HasCollision()
Definition: stage.hh:1951
virtual void Update()
Definition: model_ranger.cc:202
Definition: stage.hh:2341
virtual const char * PrintWithPose() const
Definition: model.cc:555
bool operator+=(const point_t &other)
Definition: stage.hh:449
cb_t()
Definition: stage.hh:1695
Model * mod
Definition: stage.hh:330
RaytraceResult()
Definition: stage.hh:334
virtual void Move()
Definition: model_position.cc:526
virtual void DrawStatus(Camera *cam)
Definition: model_draw.cc:282
void SetOdom(Pose odom)
Definition: model_position.cc:664
point_t * unit_square_points_create()
Definition: stage.cc:219
void * arg
Definition: stage.hh:1691
paddle_state_t
Definition: stage.hh:2417
~ModelBlinkenlight()
Definition: model_blinkenlight.cc:82
joules_t GetStored() const
Definition: powerpack.cc:217
void SetGuiOutline(bool val)
Definition: model.cc:1154
Visibility & Load(Worldfile *wf, int wf_entity)
Definition: model.cc:193
virtual ~Ancestor()
Definition: ancestor.cc:9
void DrawFootPrint()
Definition: block.cc:295
virtual void Draw() const
Definition: camera.cc:101
ModelBlobfinder class
Definition: stage.hh:2330
point3_t()
Definition: stage.hh:468
Size(meters_t x, meters_t y, meters_t z)
Definition: stage.hh:245
void BecomeParentOf(Model *child)
Definition: model.cc:819
void PopCoords()
Definition: model_draw.cc:237
virtual ~Vis(void)
Definition: stage.hh:2344
Velocity GetGlobalVelocity() const
Definition: model_position.cc:164
int id
Definition: stage.hh:2564
void UpdateTrail()
Definition: model.cc:725
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
Ancestor()
Definition: ancestor.cc:4
void SetAcceleration(double x, double y, double a)
Definition: model_position.cc:652
bounds3d_t()
Definition: stage.hh:433
Fiducial * GetFiducials(unsigned int *count)
Definition: stage.hh:2599
virtual std::string ClockString() const
Definition: worldgui.cc:415
double nearClip(void) const
Definition: stage.hh:1356
Definition: stage.hh:2420
void SetColor(Color col)
Definition: model.cc:1081
double radians_t
Definition: stage.hh:194
int RemoveUpdateCallback(world_callback_t cb, void *user)
Definition: world.cc:530
virtual void Update()
Definition: model_position.cc:283
meters_t x
Definition: stage.hh:259
void reset()
Definition: stage.hh:1364
void MapPoly(const std::vector< point_int_t > &poly, Block *block, unsigned int layer)
Definition: world.cc:990
BlockGroup * group
The BlockGroup to which this Block belongs.
Definition: stage.hh:1190
bool IsEnabled() const
Definition: stage.hh:2161
Definition: stage.hh:1741
void * GetProperty(std::string &key)
Definition: stage.hh:704
virtual ~ModelRanger()
Definition: model_ranger.cc:120
BumperVis()
Definition: model_bumper.cc:206
Color color
Definition: stage.hh:1858
Stg::PowerPack::DissipationVis event_vis
int sgn(int a)
Definition: stage.hh:173
double vertFov(void) const
Definition: stage.hh:1339
const char * Token() const
Definition: stage.hh:689
virtual bool Save(const char *filename)
Definition: worldgui.cc:351
const std::vector< Blob > & GetBlobs() const
Definition: stage.hh:2383
Definition: stage.hh:1780
Size size
Definition: stage.hh:2634
Model * gripped
Definition: stage.hh:2447
virtual void UnLoad()
Definition: worldgui.cc:346
int fiducial_key
Definition: stage.hh:1927
bool grid
Definition: stage.hh:1782
int subs
Definition: stage.hh:1832
void ClearBlocks()
Definition: model.cc:360
void SetObstacleReturn(bool val)
Definition: model.cc:1119
Model * GetGround()
Definition: stage.hh:1125
Model * parent
Definition: stage.hh:1803
void AddPowerPack(PowerPack *pp)
Definition: world.cc:1104
Velocity(double x, double y, double z, double a)
Definition: stage.hh:350
usec_t quit_time
Definition: stage.hh:851
Waypoint()
Definition: model_position.cc:804
void UnMap(unsigned int layer)
Definition: block.cc:183
Pose()
Definition: stage.hh:264
unsigned int scan_width
Width of the input image in pixels.
Definition: stage.hh:2367
usec_t last_update
time of last update in us
Definition: stage.hh:1797