createActions();
createMap();
-// connect(vidle, SIGNAL(valueChanged(int)),
-// robotEstPosBest, SLOT(setVidle(int)));
-
setFocusPolicy(Qt::StrongFocus);
sharedMemoryOpened = false;
WDBG("Youuuhouuuu!!");
rightLayout->addWidget(obstSimGroupBox);
rightLayout->addWidget(miscGroupBox);
rightLayout->addWidget(fsmGroupBox);
- //rightLayout->addWidget(powerGroupBox);
rightLayout->addWidget(actuatorsGroupBox);
}
playgroundScene = new PlaygroundScene();
playgroundSceneView = new PlaygroundView(playgroundScene);
- //playgroundSceneView->setMinimumWidth(630);
- //playgroundSceneView->setMinimumHeight(445);
playgroundSceneView->setMatrix(QMatrix(1,0,0,-1,0,0), true);
playgroundSceneView->fitInView(playgroundScene->itemsBoundingRect());
playgroundSceneView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
actuatorsGroupBox = new QGroupBox(tr("Actuators"));
actuatorsGroupBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
QHBoxLayout *layout = new QHBoxLayout();
-// vidle = new QDial();
-
-// vidle->setMinimum(VIDLE_VYSIP);
-// vidle->setMaximum((VIDLE_UP-VIDLE_VYSIP)+VIDLE_VYSIP);
-// vidle->setEnabled(true);
-
- //createMotorsGroupBox();
layout->setAlignment(Qt::AlignLeft);
-// layout->addWidget(vidle);
- //layout->addWidget(enginesGroupBox);
actuatorsGroupBox->setLayout(layout);
}
connect(voltage80CheckBox, SIGNAL(stateChanged(int)),
this, SLOT(setVoltage80(int)));
- /* motors */
-// connect(leftMotorSlider, SIGNAL(valueChanged(int)),
-// this, SLOT(setLeftMotor(int)));
-// connect(rightMotorSlider, SIGNAL(valueChanged(int)),
-// this, SLOT(setRightMotor(int)));
-// connect(stopMotorsPushButton, SIGNAL(clicked()),
-// this, SLOT(stopMotors()));
-
connect(startPlug, SIGNAL(stateChanged(int)), this, SLOT(sendStart(int)));
connect(colorChoser, SIGNAL(stateChanged(int)), this, SLOT(setTeamColor(int)));
connect(strategyButton, SIGNAL(pressed()), this, SLOT(changeStrategy_1()));
orte.pwr_ctrl.voltage80 = false;
}
-// void RobomonAtlantis::setLeftMotor(int value)
-// {
-// short int leftMotor;
-// short int rightMotor;
-
-// if(bothMotorsCheckBox->isChecked())
-// rightMotorSlider->setValue(value);
-
-// leftMotor = (short int)(MOTOR_LIMIT * (leftMotorSlider->value()/100.0));
-// rightMotor = (short int)(MOTOR_LIMIT * (rightMotorSlider->value()/100.0));
-
-// orte.motion_speed.left = leftMotor;
-// orte.motion_speed.right = rightMotor;
-
-// }
-
-// void RobomonAtlantis::setRightMotor(int value)
-// {
-// short int leftMotor;
-// short int rightMotor;
-
-// if(bothMotorsCheckBox->isChecked())
-// leftMotorSlider->setValue(value);
-
-// leftMotor = (short int)(MOTOR_LIMIT * (leftMotorSlider->value()/100.0));
-// rightMotor = (short int)(MOTOR_LIMIT * (rightMotorSlider->value()/100.0));
-
-// orte.motion_speed.left = leftMotor;
-// orte.motion_speed.right = rightMotor;
-
-// }
-
-// void RobomonAtlantis::stopMotors()
-// {
-// leftMotorSlider->setValue(0);
-// rightMotorSlider->setValue(0);
-// }
-
void RobomonAtlantis::useOpenGL(bool use)
{
playgroundSceneView->useOpenGL(&use);
}
}
-// void RobomonAtlantis::setSimulation(int state)
-// {
-// if(state) {
-// robottype_publisher_sick_scan_create(&orte, NULL, this);
-// robottype_publisher_hokuyo_scan_create(&orte, NULL, this);
-// } else {
-// if (!simulationEnabled)
-// return;
-// robottype_publisher_sick_scan_destroy(&orte);
-// robottype_publisher_hokuyo_scan_destroy(&orte);
-// }
-// simulationEnabled = state;
-// }
-
void RobomonAtlantis::setHokuyoSimulation(int state)
{
if(state) {
sick551SimEnabled = state;
}
-/*!
- \fn RobomonAtlantis::setObstacleSimulation(int state)
- */
-// void RobomonAtlantis::setObstacleSimulation(int state)
-// {
-// if (state) {
-// /* TODO Maybe it is possible to attach only once to Shmap */
-// ShmapInit(0);
-// obstacleSimulationTimer = new QTimer(this);
-// connect(obstacleSimulationTimer, SIGNAL(timeout()),
-// this, SLOT(simulateObstaclesHokuyo()));
-// connect(obstacleSimulationTimer, SIGNAL(timeout()),
-// this, SLOT(simulateObstaclesSick()));
-// obstacleSimulationTimer->start(100);
-// setMouseTracking(true);
-// hokuyoScan->setVisible(true);
-// sickScan->setVisible(true);
-// } else {
-// if (obstacleSimulationTimer)
-// delete obstacleSimulationTimer;
-// // Hide scans of lidars
-// hokuyoScan->setVisible(false);
-// sickScan->setVisible(false);
-// }
-// }
-
void RobomonAtlantis::setHokuyoObstacleSimulation(int state)
{
if (state) {