Do not enable the obstacle as soon as someone enables any LIDAR.
Now I do not know how to "connect" all three checkboxes together so when
any of them is being unchecked the obstacle is not removed.
Now even if two lidars are enabled, disabling one of them removes
the obstacle from the scene.
{
QGraphicsScene::mousePressEvent(mouseEvent);
QPointF pos = scene2world(mouseEvent->scenePos());
{
QGraphicsScene::mousePressEvent(mouseEvent);
QPointF pos = scene2world(mouseEvent->scenePos());
+ obstacle->setVisible(true);
obstacle->setPos(mouseEvent->scenePos().x(),
mouseEvent->scenePos().y());
emit obstacleChanged(pos);
obstacle->setPos(mouseEvent->scenePos().x(),
mouseEvent->scenePos().y());
emit obstacleChanged(pos);
this, SLOT(setHokuyoSimulation(int)));
connect(hokuyoSimCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(setHokuyoObstacleSimulation(int)));
this, SLOT(setHokuyoSimulation(int)));
connect(hokuyoSimCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(setHokuyoObstacleSimulation(int)));
- connect(hokuyoSimCheckBox, SIGNAL(stateChanged(int)),
- playgroundScene, SLOT(showObstacle(int)));
connect(sick331SimCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(setSick331Simulation(int)));
connect(sick331SimCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(setSick331ObstacleSimulation(int)));
connect(sick331SimCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(setSick331Simulation(int)));
connect(sick331SimCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(setSick331ObstacleSimulation(int)));
- connect(sick331SimCheckBox, SIGNAL(stateChanged(int)),
- playgroundScene, SLOT(showObstacle(int)));
connect(sick551SimCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(setSick551Simulation(int)));
connect(sick551SimCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(setSick551ObstacleSimulation(int)));
connect(sick551SimCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(setSick551Simulation(int)));
connect(sick551SimCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(setSick551ObstacleSimulation(int)));
- connect(sick551SimCheckBox, SIGNAL(stateChanged(int)),
- playgroundScene, SLOT(showObstacle(int)));
connect(playgroundScene, SIGNAL(obstacleChanged(QPointF)),
this, SLOT(changeObstacle(QPointF)));
connect(playgroundScene, SIGNAL(obstacleChanged(QPointF)),
this, SLOT(changeObstacle(QPointF)));