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