Esempio n. 1
0
void Controller::update()
{	
	std_srvs::Empty srv;

  // initialization: start with random walking
  if(!initialized) {
    rnd_walk_start.call(srv);
    initialized=true; // will never bet to false again
    std::cerr<<"Look at this *gaze*!"<<std::endl;
		startGaze();
}

	if (new_task)
	{
		new_task = false;
		std::cerr<<"Let's stop here for a while..."<<std::endl;
		rnd_walk_stop.call(srv);


		std::cerr<<"I feel active...*talk*"<<std::endl;
		startDialog();		

		// update our people memory
		updatePersonSeen(person_id);
		
    std::cerr<<"Stop staring ... this is embarassing."<<std::endl;
		//ac_gaze.cancelAllGoals();
		std::cerr<<"I would like to start roaming again..."<<std::endl;
		rnd_walk_start.call(srv);

    // discard perception from now on
    sleepStarted = ros::Time::now();
	}
}
Esempio n. 2
0
int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    Dialog *dialog = new Dialog(a.applicationDirPath(), &a);
    QObject::connect(dialog, SIGNAL(quit()), &a, SLOT(quit()));
    QTimer::singleShot(0, dialog, SLOT(setSwitcher()));
    QTimer *timer = new QTimer(&a);
    QObject::connect(timer, SIGNAL(timeout()), dialog, SLOT(startDialog()));
    timer->start(2000);

    return a.exec();
}
Esempio n. 3
0
void UserMenuDialog::slotNewClicked()
{
	KILE_DEBUG() << "start new menutree ... ";

	if ( !m_menutree->isEmpty() && m_modified  ) {
		if ( KMessageBox::questionYesNo(this, i18n("Current menu tree was modified, but not saved.\nDiscard this tree?")) == KMessageBox::No ) {
			return;
		}
	}

	m_menutree->clear();
	m_modified = false;
	startDialog();   // includes buttons update
}