27 using namespace std::literals;
40 mrpt::make_aligned_shared<opengl::CGridPlaneXY>(
41 -20, 20, -20, 20, 0, 1);
42 obj->setColor(0.4, 0.4, 0.4);
48 obj->enableTickMarks();
49 obj->setAxisLimits(-10, -10, -10, 10, 10, 10);
54 obj->setColor(0, 0, 1);
56 obj->setLocation(0, 0, 1);
57 obj->setName(
"ball_1");
62 obj->setColor(1, 0, 0);
64 obj->setLocation(-1, -1, 1);
65 obj->setName(
"ball_2");
77 CCamera& camera = render.getCamera(scene);
85 obj->getPoseX() + cos(
obj->getPoseY() / 2) * 0.05,
86 obj->getPoseY() - sin(
obj->getPoseX() / 2) * 0.09,
87 obj->getPoseZ() - sin(
obj->getPoseX() / 2) * 0.08);
91 obj->getPoseX() + cos(
obj->getPoseY() / 2) * 0.05,
92 obj->getPoseY() - sin(
obj->getPoseX() / 2) * 0.09,
93 obj->getPoseZ() - sin(
obj->getPoseX() / 2) * 0.08);
104 render.getFrame2(scene, frame);
107 win.showImage(frame);
109 std::this_thread::sleep_for(50ms);
116 int main(
int argc,
char* argv[])
123 catch (std::exception& e)
125 std::cout <<
"MRPT exception caught: " << e.what() << std::endl;
130 printf(
"Untyped exception!!");