trailRefPos = new Trail(QPen(Qt::darkBlue));
trailRefPos->setZValue(11);
- robotEstPosOdo = new Robot("Odo", QPen(Qt::white), QBrush(Qt::darkRed));
+ robotEstPosOdo = new Robot("Mot", QPen(Qt::white), QBrush(Qt::darkRed));
robotEstPosOdo->setZValue(10);
trailOdoPos = new Trail(QPen(Qt::white));
trailOdoPos->setZValue(10);
- robotEstPosUzv = new Robot("Uzv", QPen(), QBrush(Qt::darkGray));
- robotEstPosUzv->setZValue(10);
- trailUzvPos = new Trail(QPen());
- trailUzvPos->setZValue(10);
+ robotEstPosIndepOdo = new Robot("Odo", QPen(), QBrush(Qt::darkGray));
+ robotEstPosIndepOdo->setZValue(10);
+ trailPosIndepOdo = new Trail(QPen());
+ trailPosIndepOdo->setZValue(10);
playgroundScene->addItem(robotActPos);
- playgroundScene->addItem(robotEstPosUzv);
+ playgroundScene->addItem(robotEstPosIndepOdo);
playgroundScene->addItem(robotEstPosOdo);
showTrails(false);
playgroundScene->addItem(trailRefPos);
- playgroundScene->addItem(trailUzvPos);
+ playgroundScene->addItem(trailPosIndepOdo);
playgroundScene->addItem(trailOdoPos);
}
case QEVENT(QEV_REFERENCE_POSITION):
emit actualPositionReceivedSignal();
break;
- case QEVENT(QEV_ESTIMATED_POSITION_UZV):
- emit estimatedPositionReceivedSignal();
+ case QEVENT(QEV_ESTIMATED_POSITION_INDEP_ODO):
+ estPosX->setText(QString("%1").arg(orte.est_pos_indep_odo.x, 0, 'f', 3));
+ estPosY->setText(QString("%1").arg(orte.est_pos_indep_odo.y, 0, 'f', 3));
+ estPosPhi->setText(QString("%1(%2)")
+ .arg(DEGREES(orte.est_pos_indep_odo.phi), 0, 'f', 0)
+ .arg(orte.est_pos_indep_odo.phi, 0, 'f', 1));
+ robotEstPosIndepOdo->moveRobot(orte.est_pos_indep_odo.x,
+ orte.est_pos_indep_odo.y, orte.est_pos_indep_odo.phi);
+ trailPosIndepOdo->addPoint(QPointF(orte.est_pos_indep_odo.x,
+ orte.est_pos_indep_odo.y));
break;
case QEVENT(QEV_ESTIMATED_POSITION_ODO):
robotEstPosOdo->moveRobot(orte.est_pos_odo.x,
receiveMotionStatusCallBack, this);
robottype_subscriber_ref_pos_create(&orte,
receiveActualPositionCallBack, this);
- robottype_subscriber_est_pos_uzv_create(&orte,
- generic_rcv_cb, new OrteCallbackInfo(this, QEV_ESTIMATED_POSITION_UZV));
robottype_subscriber_est_pos_odo_create(&orte,
generic_rcv_cb, new OrteCallbackInfo(this, QEV_ESTIMATED_POSITION_ODO));
+ robottype_subscriber_est_pos_indep_odo_create(&orte,
+ generic_rcv_cb, new OrteCallbackInfo(this, QEV_ESTIMATED_POSITION_INDEP_ODO));
robottype_subscriber_fsm_main_create(&orte,
rcv_fsm_main_cb, this);
robottype_subscriber_fsm_motion_create(&orte,
this, SLOT(motionStatusReceived()));
connect(this, SIGNAL(actualPositionReceivedSignal()),
this, SLOT(actualPositionReceived()));
- connect(this, SIGNAL(estimatedPositionReceivedSignal()),
- this, SLOT(estimatedPositionReceived()));
connect(this, SIGNAL(powerVoltageReceivedSignal()),
this, SLOT(powerVoltageReceived()));
}
trailRefPos->addPoint(QPointF(orte.ref_pos.x, orte.ref_pos.y));
}
-void RobomonAtlantis::estimatedPositionReceived()
-{
- estPosX->setText(QString("%1").arg(orte.est_pos_uzv.x, 0, 'f', 3));
- estPosY->setText(QString("%1").arg(orte.est_pos_uzv.y, 0, 'f', 3));
- estPosPhi->setText(QString("%1(%2)")
- .arg(DEGREES(orte.est_pos_uzv.phi), 0, 'f', 0)
- .arg(orte.est_pos_uzv.phi, 0, 'f', 1));
- robotEstPosUzv->moveRobot(orte.est_pos_uzv.x,
- orte.est_pos_uzv.y, orte.est_pos_uzv.phi);
- trailUzvPos->addPoint(QPointF(orte.est_pos_uzv.x,
- orte.est_pos_uzv.y));
-}
-
void RobomonAtlantis::powerVoltageReceived()
{
voltage33LineEdit->setText(QString("%1").arg(
*/
double RobomonAtlantis::distanceToObstacleHokuyo(int beamnum, Point obstacle, double obstacleSize)
{
- struct robot_pos_type e = orte.est_pos_uzv;
+ struct robot_pos_type e = orte.est_pos_indep_odo;
double sensor_a;
struct sharp_pos s;
void RobomonAtlantis::resetTrails()
{
trailRefPos->reset();
- trailUzvPos->reset();
+ trailPosIndepOdo->reset();
trailOdoPos->reset();
}
void RobomonAtlantis::showTrails(bool show)
{
trailRefPos->setVisible(show);
- trailUzvPos->setVisible(show);
+ trailPosIndepOdo->setVisible(show);
trailOdoPos->setVisible(show);
}