137 this->setWindowTitle(
"yarpMobilebaseGUI");
139 mainTimer =
new QTimer(
this);
140 connect(mainTimer,
SIGNAL(timeout()),
this, SLOT(updateMain()));
141 mainTimer->start(1000*refresh_period);
145 this->setWindowFlags(Qt::MSWindowsFixedSizeDialogHint);
147 this->setWindowFlags(Qt::WindowStaysOnTopHint);
150 yInfo() <<
"--port <name> the full name of the output port";
151 yInfo() <<
"--step_lin_vel the increase step of linear velocity (m/s)";
152 yInfo() <<
"--step_ang_vel the increase step of angular velocity (deg/s)";
153 yInfo() <<
"--default_lin_vel the default value for max linear velocity (m/s)";
154 yInfo() <<
"--default_ang_vel the default value for max angular velocity (deg/s)";
156 if (rf.
check(
"port"))
158 if (rf.
check(
"step_lin_vel"))
160 if (rf.
check(
"step_ang_vel"))
162 if (rf.
check(
"default_lin_vel"))
164 if (rf.
check(
"default_ang_vel"))
169 connect(ui->pushButton_W,
SIGNAL(pressed()),
this, SLOT(handleButton_Wp()));
170 connect(ui->pushButton_W,
SIGNAL(released()),
this, SLOT(handleButton_Wr()));
171 connect(ui->pushButton_S,
SIGNAL(pressed()),
this, SLOT(handleButton_Sp()));
172 connect(ui->pushButton_S,
SIGNAL(released()),
this, SLOT(handleButton_Sr()));
173 connect(ui->pushButton_A,
SIGNAL(pressed()),
this, SLOT(handleButton_Ap()));
174 connect(ui->pushButton_A,
SIGNAL(released()),
this, SLOT(handleButton_Ar()));
175 connect(ui->pushButton_D,
SIGNAL(pressed()),
this, SLOT(handleButton_Dp()));
176 connect(ui->pushButton_D,
SIGNAL(released()),
this, SLOT(handleButton_Dr()));
177 connect(ui->pushButton_Q,
SIGNAL(pressed()),
this, SLOT(handleButton_Qp()));
178 connect(ui->pushButton_Q,
SIGNAL(released()),
this, SLOT(handleButton_Qr()));
179 connect(ui->pushButton_E,
SIGNAL(pressed()),
this, SLOT(handleButton_Ep()));
180 connect(ui->pushButton_E,
SIGNAL(released()),
this, SLOT(handleButton_Er()));
182 connect(ui->pushButton_I,
SIGNAL(clicked()),
this, SLOT(handleButton_I()));
183 connect(ui->pushButton_K,
SIGNAL(clicked()),
this, SLOT(handleButton_K()));
184 connect(ui->pushButton_O,
SIGNAL(clicked()),
this, SLOT(handleButton_O()));
185 connect(ui->pushButton_L,
SIGNAL(clicked()),
this, SLOT(handleButton_L()));
188 ui->label_max_lin_vel->setText(buff);
191 ui->label_cur_lin_vel_x->setText(buff);
194 ui->label_cur_lin_vel_y->setText(buff);
197 ui->label_max_ang_vel->setText(buff);
200 ui->label_cur_ang_vel->setText(buff);
202 joy =
new Joywidget(ui->frame_2,
"joy1",135);
203 joy->move(QPoint(102,35));
206 QTimer::singleShot(0,
this, &MainWindow::updateMain);
MainWindow(const yarp::os::ResourceFinder &rf, yarp::dev::IBattery *ibat, QWidget *parent=0, double refresh_period=10.0)
yarp::os::Port outputport
void keyPressEvent(QKeyEvent *e) override
yarp::dev::MobileBaseVelocity output_data
void keyReleaseEvent(QKeyEvent *e) override