ArmarXSimulatorWindow.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package
19  * @author
20  * @date
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 #include "ArmarXSimulatorWindow.h"
25 
26 // ArmarX
30 
31 
32 // Qt
33 #include <QtCore/QDirIterator>
34 #include <QFileDialog>
35 #include <QLabel>
36 #include <QListView>
37 #include <QInputDialog>
38 #include <QPushButton>
39 #include <QFile>
40 #include <QLabel>
41 #include <QToolButton>
42 #include <QTimer>
43 #include <QImage>
44 #include <QGLWidget>
45 
46 #include <filesystem>
47 
48 #include <QMessageBox>
49 
50 #include <stdlib.h>
51 
52 #include <VirtualRobot/Visualization/CoinVisualization/CoinVisualization.h>
53 #include <VirtualRobot/Visualization/CoinVisualization/CoinVisualizationNode.h>
54 #include <VirtualRobot/Visualization/CoinVisualization/CoinVisualizationFactory.h>
55 #include <SimDynamics/DynamicsEngine/DynamicsRobot.h>
56 
57 #include <Inventor/actions/SoBoxHighlightRenderAction.h>
58 #include <Inventor/nodes/SoUnits.h>
59 
60 #define ARMARX_GUI_APPLICATION_NAME "ArmarXSimulator"
61 
62 
63 #define TIMER_MS 30.0f
64 
65 using namespace armarx;
66 using namespace VirtualRobot;
67 using namespace SimDynamics;
68 
70  : QMainWindow(NULL),
71  viewer(nullptr),
72  sceneSep(nullptr)
73 {
74 
75 }
76 
78 {
79  drawTimeMS = 0;
80  guiWindowBaseName = ARMARX_GUI_APPLICATION_NAME;
81  setWindowTitle(guiWindowBaseName);
83  ARMARX_INFO << " ************** ArmarXSimulatorWindow INIT ************** " << armarx::flush;
84 
85  setAttribute(Qt::WA_QuitOnClose);
86 
87  this->physicsVisu = physicsVisu;
88  this->debugDrawer = debugDrawer;
89 
90  sceneSep = new SoSeparator;
91  sceneSep->ref();
92 
93  if (physicsVisu && physicsVisu->getVisualization())
94  {
95  sceneSep->addChild(physicsVisu->getVisualization());
96  }
97 
98  if (debugDrawer && debugDrawer->getVisualization())
99  {
100  sceneSep->addChild(debugDrawer->getVisualization());
101  }
102 
103  setupUI();
104 }
105 
107 {
108 }
109 
111 {
112  float x = getProperty<float>("Camera.x").getValue();
113  float y = getProperty<float>("Camera.y").getValue();
114  float z = getProperty<float>("Camera.z").getValue();
115  float ro = getProperty<float>("Camera.roll").getValue();
116  float pi = getProperty<float>("Camera.pitch").getValue();
117  float ya = getProperty<float>("Camera.yaw").getValue();
118  setCamPose(x, y, z, ro, pi, ya);
119 }
120 
122 {
124 
125  bool showBase = getProperty<bool>("ShowBaseCoordSystem").getValue();
126  showBaseCoordSystem(showBase);
127 
128  int alias = getProperty<int>("AntiAliasingRenderPasses").getValue();
129  setAntiAliasing(alias);
130 
131  saveVideo = getProperty<bool>("SaveVideo").getValue();
132  tmpDir = getProperty<std::string>("TempDir").getValue();
133 
134 }
135 
137 {
138 }
139 
141 {
142 }
143 
145 {
146  ui.setupUi(this);
147 
148  viewer = new CoinViewer(ui.frameViewer, "ArmarXSimulator", TRUE, SoQtExaminerViewer::BUILD_POPUP, SoQtExaminerViewer::BROWSER);
150 
151  // setup
152  viewer->setBackgroundColor(
153  SbColor
154  {
155  getProperty<float>("Background.r").getValue(),
156  getProperty<float>("Background.g").getValue(),
157  getProperty<float>("Background.b").getValue()
158  }
159  );
160 
161  int numPasses = getProperty<int>("AntiAliasingRenderPasses").getValue();
162  viewer->setAccumulationBuffer(numPasses > 0);
163  //viewer->setAntialiasing(false, 1);
164 
165  viewer->setGLRenderAction(new SoBoxHighlightRenderAction);
166  viewer->setTransparencyType(SoGLRenderAction::SORTED_OBJECT_BLEND);
167  viewer->setFeedbackVisibility(true);
168  viewer->setSceneGraph(sceneSep);
169  viewer->viewAll();
170  // really needed?
171  //viewer->setAccumulationBuffer(numPasses > 0);
172 
173  SoSensorManager* sensor_mgr = SoDB::getSensorManager();
174  SoTimerSensor* timer = new SoTimerSensor(timerCB, this);
175  timer->setInterval(SbTime(TIMER_MS / 1000.0f));
176  sensor_mgr->insertTimerSensor(timer);
177 }
178 
179 
181 {
182  if (sceneSep)
183  {
184  sceneSep->unref();
185  }
186  delete viewer;
187  ARMARX_INFO << "~ArmarXSimulatorWindow() ";
188 
189 }
190 
191 void ArmarXSimulatorWindow::closeEvent(QCloseEvent* event)
192 {
193  emit closeRequest();
194  event->accept();
195 }
196 
197 
198 void ArmarXSimulatorWindow::timerCB(void* data, SoSensor* /*sensor*/)
199 {
200  ArmarXSimulatorWindow* simWindow = static_cast<ArmarXSimulatorWindow*>(data);
201 
202  //simWindow->redraw();
203  simWindow->saveScreenshot();
204 }
205 
207 {
208  if (!saveVideo)
209  {
210  return;
211  }
212 
213  static long counter = 0;
214  clock_t start = clock();
215 
216  //framefile.sprintf("renderFrame_%06d.png", counter);
217  std::stringstream ss;
218  ss << tmpDir << "/armarx-render-frame-" << counter << ".bmp";
219  std::string fn = ss.str();
220  counter++;
221  //redraw();
222 
223  viewer->getSceneManager()->render();
224  //viewer->getSceneManager()->scheduleRedraw();
225 
226  QGLWidget* w = (QGLWidget*)viewer->getGLWidget();
227 
228  QImage i = w->grabFrameBuffer();
229  QString fnQ(fn.c_str());
230  bool res = i.save(fnQ, "BMP");
231  if (!res)
232  {
233  ARMARX_WARNING << deactivateSpam(5) << "Could not write screenshot to file " << fn;
234  }
235  else
236  {
237  clock_t end = clock();
238  float timeMS = (float)(end - start) / (float)CLOCKS_PER_SEC * 1000.0f;
239  ARMARX_INFO << deactivateSpam(5) << "Wrote image " << fn << " in " << timeMS << " ms";
240  }
241 }
242 
244 {
245  auto l = getScopedLock();
246 
247  if (viewer)
248  {
249  viewer->setAccumulationBuffer(numPasses > 0);
250  viewer->setAntialiasing((numPasses > 0), numPasses);
251  }
252 }
253 
254 void ArmarXSimulatorWindow::slotShowBaseCoord(bool show, float scale)
255 {
256  if (physicsVisu)
257  {
258  physicsVisu->showBaseCoord(show, scale);
259  }
260 }
261 
262 
264 {
265  auto l = getScopedLock();
266 
267  if (show && sceneSep && debugDrawer && debugDrawer->getVisualization() && sceneSep->findChild(debugDrawer->getVisualization()) < 0)
268  {
269  sceneSep->addChild(debugDrawer->getVisualization());
270  }
271 
272  if (!show && sceneSep && debugDrawer && debugDrawer->getVisualization() && sceneSep->findChild(debugDrawer->getVisualization()) >= 0)
273  {
274  sceneSep->removeChild(debugDrawer->getVisualization());
275  }
276 }
277 
278 
279 
281 {
282  auto l = getScopedLock();
283  ARMARX_DEBUG << "viewall" << flush;
284 
285  if (!viewer || !physicsVisu)
286  {
287  return;
288  }
289 
290  SoCamera* cam = viewer->getCamera();
291  SoSeparator* sceneViewableSep = physicsVisu->getViewableScene();
292 
293  if (cam && sceneViewableSep)
294  {
295  cam->viewAll(sceneViewableSep, viewer->getViewportRegion());
296  }
297 }
298 
300 {
301  auto l = getScopedLock();
303 
304  if (viewer && viewer->getCamera())
305  {
306  SbVec3f position = viewer->getCamera()->position.getValue();
307  SbRotation orientation = viewer->getCamera()->orientation.getValue();
308  SbVec3f rotAxis;
309  float angle;
310  orientation.getValue(rotAxis, angle);
311  Eigen::Vector3f axE;
312  axE(0) = rotAxis[0];
313  axE(1) = rotAxis[1];
314  axE(2) = rotAxis[2];
315  camPose = MathTools::axisangle2eigen4f(axE, angle);
316  camPose(0, 3) = position[0];
317  camPose(1, 3) = position[1];
318  camPose(2, 3) = position[2];
319  }
320 
321  return camPose;
322 }
323 
324 
325 void ArmarXSimulatorWindow::setCamPose(float x, float y, float z, float roll, float pitch, float yaw)
326 {
327  ARMARX_VERBOSE << "setting cam pose " << VAROUT(x) << VAROUT(y) << VAROUT(z) << VAROUT(roll) << VAROUT(pitch) << VAROUT(yaw);
328  auto l = getScopedLock();
329 
330  if (viewer && viewer->getCamera())
331  {
332  SbVec3f position(x * 0.001f, y * 0.001f, z * 0.001f);
333  SbRotation orientation;
334  Eigen::Matrix4f m;
335  MathTools::rpy2eigen4f(roll, pitch, yaw, m);
336  float ang;
337  Eigen::Vector3f ax;
338  MathTools::eigen4f2axisangle(m, ax, ang);
339  SbVec3f ax2(ax(0), ax(1), ax(2));
340  orientation.setValue(ax2, ang);
341  viewer->getCamera()->position.setValue(position);
342  viewer->getCamera()->orientation.setValue(orientation);
343  }
344 }
345 
347 {
348  return viewer;
349 }
350 
352 {
353  return sceneSep;
354 }
355 
357 {
358  mutex = m;
359 
360  if (viewer)
361  {
362  viewer->setMutex(m);
363  }
364 }
365 
367 {
369  return l;
370 }
371 
372 
373 
374 void ArmarXSimulatorWindow::enableSimulatorWindow(bool show, const Ice::Current& c)
375 {
376  {
377  auto l = getScopedLock();
378  info.windowEnabled = show;
379  }
380 
381  if (show)
382  {
383  ARMARX_INFO << "Showing simulator window";
384  QMetaObject::invokeMethod(this, "show");//, Q_ARG(float, currentPlatformPositionX), Q_ARG(float, currentPlatformPositionY), Q_ARG(float, currentPlatformRotation));
385 
386  //simWindow->show();
387  }
388  else
389  {
390  ARMARX_INFO << "Hiding simulator window";
391  QMetaObject::invokeMethod(this, "hide");
392  //simWindow->hide();
393  }
394 }
395 
396 void ArmarXSimulatorWindow::showBaseCoordSystem(bool show, float scale, const Ice::Current& c)
397 {
398  QMetaObject::invokeMethod(this, "slotShowBaseCoord", Qt::QueuedConnection, Q_ARG(bool, show), Q_ARG(float, scale));
399 }
400 /*
401 void ArmarXSimulatorWindow::showContacts(bool show, const Ice::Current &c)
402 {
403  QMetaObject::invokeMethod(this, "slotShowContacts", Qt::QueuedConnection, Q_ARG(bool, show));
404 }*/
405 
406 armarx::SimulatorViewerInformation ArmarXSimulatorWindow::getSimulatorInformation(const Ice::Current& c)
407 {
408  auto l = getScopedLock();
409 
410  // update data
411  if (physicsVisu)
412  {
413  info.comTimeMS = physicsVisu->getSyncVisuTime();
414  }
415  else
416  {
417  info.comTimeMS = 0;
418  }
419 
420  info.drawTimeMS = drawTimeMS;
421 
422  return info;
423 }
424 
426 {
427  drawTimeMS = ms;
428 }
429 
430 void ArmarXSimulatorWindow::setAntiAliasing(int steps, const Ice::Current& c)
431 {
432  if (steps < 0)
433  {
434  steps = 0;
435  }
436 
437 
438  if (!QMetaObject::invokeMethod(this, "setupAntiAliasing", Qt::QueuedConnection, Q_ARG(int, steps)))
439  {
440  ARMARX_VERBOSE << "Failed to invoke method";
441  }
442 
443 }
444 
445 PoseBasePtr ArmarXSimulatorWindow::getCameraPose(const Ice::Current& c)
446 {
447  // maybe we should invoke a qt-thread safe method, but a lock (used in getCamPose) seems to be fine for now...
448  Eigen::Matrix4f camPose = getCamPose();
449  PosePtr p(new Pose(camPose));
450  return p;
451 }
452 
453 void ArmarXSimulatorWindow::showDebugDrawLayer(bool show, const Ice::Current& c)
454 {
455  if (!QMetaObject::invokeMethod(this, "slotEnableDebugDrawLayer", Qt::QueuedConnection, Q_ARG(bool, show)))
456  {
457  ARMARX_VERBOSE << "Failed to invoke method";
458  }
459 }
460 
462 {
463  ARMARX_VERBOSE << "Clearing debug layer...";
464 
465  if (debugDrawer)
466  {
467  debugDrawer->clearLayer("debug");
468  }
469 }
470 
472 {
473  if (!QMetaObject::invokeMethod(this, "slotClearDebugDrawLayer", Qt::QueuedConnection))
474  {
475  ARMARX_VERBOSE << "Failed to invoke method";
476  }
477 }
478 
479 
480 void ArmarXSimulatorWindow::clearLayer(const std::string& layerName, const ::Ice::Current&)
481 {
482  QString s(layerName.c_str());
483 
484  if (!QMetaObject::invokeMethod(this, "slotClearLayer", Qt::QueuedConnection, Q_ARG(QString, s)))
485  {
486  ARMARX_VERBOSE << "Failed to invoke method";
487  }
488 }
489 
490 void ArmarXSimulatorWindow::removeLayer(const std::string& layerName, const ::Ice::Current&)
491 {
492  QString s(layerName.c_str());
493 
494  if (!QMetaObject::invokeMethod(this, "slotRemoveLayer", Qt::QueuedConnection, Q_ARG(QString, s)))
495  {
496  ARMARX_VERBOSE << "Failed to invoke method";
497  }
498 }
499 
500 void ArmarXSimulatorWindow::enableLayerVisu(const std::string& layerName, bool visible, const ::Ice::Current&)
501 {
502  QString s(layerName.c_str());
503 
504  if (!QMetaObject::invokeMethod(this, "slotEnableLayerVisu", Qt::QueuedConnection, Q_ARG(QString, s), Q_ARG(bool, visible)))
505  {
506  ARMARX_VERBOSE << "Failed to invoke method";
507  }
508 }
509 
510 void ArmarXSimulatorWindow::slotClearLayer(const QString layerName)
511 {
512  if (debugDrawer)
513  {
514  debugDrawer->clearLayer(layerName.toStdString());
515  }
516 }
517 
518 void ArmarXSimulatorWindow::slotRemoveLayer(const QString layerName)
519 {
520  if (debugDrawer)
521  {
522  debugDrawer->removeLayer(layerName.toStdString());
523  }
524 }
525 
526 void ArmarXSimulatorWindow::slotEnableLayerVisu(const QString layerName, bool visible)
527 {
528  if (debugDrawer)
529  {
530  debugDrawer->enableLayerVisu(layerName.toStdString(), visible);
531  }
532 }
533 
534 
535 ::armarx::LayerInformationSequence ArmarXSimulatorWindow::layerInformation(const ::Ice::Current&)
536 {
537  if (debugDrawer)
538  {
539  return debugDrawer->layerInformation();
540  }
541 
542  return ::armarx::LayerInformationSequence {};
543 }
544 
545 void ArmarXSimulatorWindow::setTempPath(const std::string& p, const Ice::Current&)
546 {
547  tmpDir = p;
548 }
549 
550 void ArmarXSimulatorWindow::saveScreenshots(bool enable, const Ice::Current&)
551 {
552  saveVideo = enable;
553 }
554 
555 void ArmarXSimulatorWindow::selectVisuType(bool fullModel, const Ice::Current& c)
556 {
557  if (!QMetaObject::invokeMethod(this, "slotSelectVisuType", Qt::QueuedConnection, Q_ARG(bool, fullModel)))
558  {
559  ARMARX_VERBOSE << "Failed to invoke method";
560  }
561 }
562 
564 {
565  if (physicsVisu)
566  {
567  physicsVisu->enableVisuType(fullModel);
568  }
569 }
570 
armarx::ArmarXSimulatorWindow::initialize
void initialize(ArmarXPhysicsWorldVisualizationPtr physicsVisu, DebugDrawerComponentPtr debugDrawer)
Definition: ArmarXSimulatorWindow.cpp:77
ARMARX_VERBOSE
#define ARMARX_VERBOSE
Definition: Logging.h:180
ArmarXSimulatorWindow.h
armarx::ArmarXSimulatorWindow::sceneSep
SoSeparator * sceneSep
Definition: ArmarXSimulatorWindow.h:240
armarx::CoinViewer::RecursiveMutexLock
std::unique_lock< RecursiveMutex > RecursiveMutexLock
Definition: CoinViewer.h:53
armarx::navigation::core::Pose
Eigen::Isometry3f Pose
Definition: basic_types.h:31
armarx::ArmarXSimulatorWindow::debugDrawer
DebugDrawerComponentPtr debugDrawer
Definition: ArmarXSimulatorWindow.h:232
armarx::ArmarXSimulatorWindow::drawTimeMS
float drawTimeMS
Definition: ArmarXSimulatorWindow.h:246
armarx::ArmarXSimulatorWindow::viewer
CoinViewer * viewer
Definition: ArmarXSimulatorWindow.h:229
armarx::ArmarXSimulatorWindow::setMutex
void setMutex(CoinViewer::RecursiveMutexPtr const &m)
Definition: ArmarXSimulatorWindow.cpp:356
VirtualRobot
Definition: FramedPose.h:43
armarx::ArmarXSimulatorWindow::slotSelectVisuType
void slotSelectVisuType(bool visible)
Definition: ArmarXSimulatorWindow.cpp:563
armarx::ArmarXSimulatorWindow::layerInformation
::armarx::LayerInformationSequence layerInformation(const ::Ice::Current &=Ice::emptyCurrent) override
Definition: ArmarXSimulatorWindow.cpp:535
armarx::ArmarXSimulatorWindow::setTempPath
void setTempPath(const std::string &p, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: ArmarXSimulatorWindow.cpp:545
armarx::ArmarXSimulatorWindow::physicsVisu
ArmarXPhysicsWorldVisualizationPtr physicsVisu
Definition: ArmarXSimulatorWindow.h:231
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
armarx::ArmarXSimulatorWindow::slotClearDebugDrawLayer
void slotClearDebugDrawLayer()
Definition: ArmarXSimulatorWindow.cpp:461
armarx::ArmarXSimulatorWindow::enableLayerVisu
void enableLayerVisu(const std::string &layerName, bool visible, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: ArmarXSimulatorWindow.cpp:500
armarx::ArmarXSimulatorWindow::onDisconnectComponent
void onDisconnectComponent() override
Hook for subclass.
Definition: ArmarXSimulatorWindow.cpp:136
armarx::ArmarXSimulatorWindow::saveScreenshots
void saveScreenshots(bool enable, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: ArmarXSimulatorWindow.cpp:550
armarx::ArmarXSimulatorWindow::ui
Ui::MainWindowArmarXSimulator ui
Definition: ArmarXSimulatorWindow.h:227
armarx::ArmarXSimulatorWindow::setCamPose
void setCamPose(float x, float y, float z, float roll, float pitch, float yaw)
Definition: ArmarXSimulatorWindow.cpp:325
pi
#define pi
Definition: Transition.cpp:37
armarx::ArmarXSimulatorWindow::slotShowBaseCoord
void slotShowBaseCoord(bool show, float scale)
Definition: ArmarXSimulatorWindow.cpp:254
armarx::ArmarXSimulatorWindow::closeRequest
void closeRequest()
emitted, when the main window should be closed
IceInternal::Handle< ArmarXPhysicsWorldVisualization >
armarx::ArmarXSimulatorWindow::slotEnableDebugDrawLayer
void slotEnableDebugDrawLayer(bool show)
Definition: ArmarXSimulatorWindow.cpp:263
TIMER_MS
#define TIMER_MS
Definition: ArmarXSimulatorWindow.cpp:63
GfxTL::Identity
void Identity(MatrixXX< N, N, T > *a)
Definition: MatrixXX.h:523
armarx::ArmarXSimulatorWindow::mutex
CoinViewer::RecursiveMutexPtr mutex
Definition: ArmarXSimulatorWindow.h:242
armarx::ArmarXSimulatorWindow::setAntiAliasing
void setAntiAliasing(int steps, const Ice::Current &c=Ice::emptyCurrent) override
Definition: ArmarXSimulatorWindow.cpp:430
armarx::ArmarXSimulatorWindow::setupUI
void setupUI()
Definition: ArmarXSimulatorWindow.cpp:144
ARMARX_GUI_APPLICATION_NAME
#define ARMARX_GUI_APPLICATION_NAME
Definition: ViewerWidget.cpp:50
armarx::ArmarXSimulatorWindow::showBaseCoordSystem
void showBaseCoordSystem(bool show, float scale=1.0, const Ice::Current &c=Ice::emptyCurrent) override
Definition: ArmarXSimulatorWindow.cpp:396
armarx::CoinViewer
Definition: CoinViewer.h:38
armarx::ArmarXSimulatorWindow::saveVideo
bool saveVideo
Definition: ArmarXSimulatorWindow.h:248
armarx::ArmarXSimulatorWindow::getViewer
CoinViewer * getViewer()
Definition: ArmarXSimulatorWindow.cpp:346
armarx::flush
const LogSender::manipulator flush
Definition: LogSender.h:251
data
uint8_t data[1]
Definition: EtherCATFrame.h:68
ARMARX_DEBUG
#define ARMARX_DEBUG
Definition: Logging.h:177
armarx::ArmarXSimulatorWindow::clearLayer
void clearLayer(const std::string &layerName, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: ArmarXSimulatorWindow.cpp:480
armarx::ArmarXSimulatorWindow::onConnectComponent
void onConnectComponent() override
Pure virtual hook for the subclass.
Definition: ArmarXSimulatorWindow.cpp:121
armarx::ArmarXSimulatorWindow::showDebugDrawLayer
void showDebugDrawLayer(bool show, const Ice::Current &c=Ice::emptyCurrent) override
Definition: ArmarXSimulatorWindow.cpp:453
armarx::ArmarXSimulatorWindow::viewAll
void viewAll()
Definition: ArmarXSimulatorWindow.cpp:280
armarx::CoinViewer::RecursiveMutexPtr
std::shared_ptr< RecursiveMutex > RecursiveMutexPtr
Definition: CoinViewer.h:52
armarx::ArmarXSimulatorWindow::onExitComponent
void onExitComponent() override
Hook for subclass.
Definition: ArmarXSimulatorWindow.cpp:140
armarx::ArmarXSimulatorWindow::removeLayer
void removeLayer(const std::string &layerName, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: ArmarXSimulatorWindow.cpp:490
armarx::ArmarXSimulatorWindow::ArmarXSimulatorWindow
ArmarXSimulatorWindow()
Definition: ArmarXSimulatorWindow.cpp:69
armarx::ArmarXSimulatorWindow::saveScreenshot
void saveScreenshot()
Definition: ArmarXSimulatorWindow.cpp:206
armarx::ArmarXSimulatorWindow::~ArmarXSimulatorWindow
~ArmarXSimulatorWindow() override
Definition: ArmarXSimulatorWindow.cpp:180
Component.h
armarx::ArmarXSimulatorWindow::slotEnableLayerVisu
void slotEnableLayerVisu(const QString layerName, bool visible)
Definition: ArmarXSimulatorWindow.cpp:526
armarx::ArmarXSimulatorWindow::setCamPoseFromConfig
void setCamPoseFromConfig()
Definition: ArmarXSimulatorWindow.cpp:110
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:601
float
#define float
Definition: 16_Level.h:22
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:174
armarx::ArmarXSimulatorWindow::getSimulatorInformation
SimulatorViewerInformation getSimulatorInformation(const Ice::Current &c=Ice::emptyCurrent) override
Definition: ArmarXSimulatorWindow.cpp:406
armarx::ArmarXSimulatorWindow::slotClearLayer
void slotClearLayer(const QString layerName)
Definition: ArmarXSimulatorWindow.cpp:510
VAROUT
#define VAROUT(x)
Definition: StringHelpers.h:182
armarx::ArmarXSimulatorWindow::getCamPose
Eigen::Matrix4f getCamPose()
Definition: ArmarXSimulatorWindow.cpp:299
armarx::ArmarXSimulatorWindow::enableSimulatorWindow
void enableSimulatorWindow(bool show, const Ice::Current &c=Ice::emptyCurrent) override
Definition: ArmarXSimulatorWindow.cpp:374
LogSender.h
armarx::ArmarXSimulatorWindow::setDrawTimeMeasured
void setDrawTimeMeasured(float ms)
Definition: ArmarXSimulatorWindow.cpp:425
armarx::ArmarXSimulatorWindow::getScopedLock
CoinViewer::RecursiveMutexLockPtr getScopedLock()
Protect access with this lock.
Definition: ArmarXSimulatorWindow.cpp:366
armarx::ArmarXSimulatorWindow::tmpDir
std::string tmpDir
Definition: ArmarXSimulatorWindow.h:249
armarx::ArmarXSimulatorWindow::clearDebugDrawLayer
void clearDebugDrawLayer(const Ice::Current &c=Ice::emptyCurrent) override
Definition: ArmarXSimulatorWindow.cpp:471
armarx::ArmarXSimulatorWindow::timerCB
static void timerCB(void *data, SoSensor *sensor)
Definition: ArmarXSimulatorWindow.cpp:198
angle
double angle(const Point &a, const Point &b, const Point &c)
Definition: point.hpp:100
armarx::ArmarXSimulatorWindow::selectVisuType
void selectVisuType(bool fullModel, const Ice::Current &c=Ice::emptyCurrent) override
Switch between full/collision model.
Definition: ArmarXSimulatorWindow.cpp:555
armarx::Logging::deactivateSpam
SpamFilterDataPtr deactivateSpam(float deactivationDurationSec=10.0f, const std::string &identifier="", bool deactivate=true) const
disables the logging for the current line for the given amount of seconds.
Definition: Logging.cpp:92
armarx::CoinViewer::RecursiveMutexLockPtr
std::shared_ptr< RecursiveMutexLock > RecursiveMutexLockPtr
Definition: CoinViewer.h:54
armarx::ArmarXSimulatorWindow::slotRemoveLayer
void slotRemoveLayer(const QString layerName)
Definition: ArmarXSimulatorWindow.cpp:518
armarx::Logging::setTag
void setTag(const LogTag &tag)
Definition: Logging.cpp:55
ARMARX_WARNING
#define ARMARX_WARNING
Definition: Logging.h:186
armarx::ArmarXSimulatorWindow::getScene
SoNode * getScene()
Definition: ArmarXSimulatorWindow.cpp:351
armarx::ArmarXSimulatorWindow
Definition: ArmarXSimulatorWindow.h:118
ArmarXDataPath.h
armarx::ArmarXSimulatorWindow::closeEvent
void closeEvent(QCloseEvent *event) override
emits the closeRequest signal
Definition: ArmarXSimulatorWindow.cpp:191
armarx::CoinViewer::setMutex
void setMutex(RecursiveMutexPtr const &m)
Definition: CoinViewer.cpp:45
armarx::ArmarXSimulatorWindow::onInitComponent
void onInitComponent() override
Pure virtual hook for the subclass.
Definition: ArmarXSimulatorWindow.cpp:106
armarx::ctrlutil::s
double s(double t, double s0, double v0, double a0, double j)
Definition: CtrlUtil.h:33
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::ArmarXSimulatorWindow::setupAntiAliasing
void setupAntiAliasing(int numPasses)
Definition: ArmarXSimulatorWindow.cpp:243
armarx::ArmarXSimulatorWindow::getCameraPose
PoseBasePtr getCameraPose(const Ice::Current &c=Ice::emptyCurrent) override
Definition: ArmarXSimulatorWindow.cpp:445
armarx::ArmarXSimulatorWindow::info
armarx::SimulatorViewerInformation info
Definition: ArmarXSimulatorWindow.h:244