Voila. Je dois faire une interface, et je dois mettre un boutton pour me connecter a un robot. Par contre, quand je veux me connecter, j'ai un pb. Tout se passe bien, jusqu'a la fin de la fonction ^^

Code code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 
void Interface::connection()
{
	cout << "Connection" <<endl;
 
	robot = new Robot();
	arm = new ArmUse();
 
	Aria::init();
 
	ArArgumentParser parser(&argc, argv);
	ArSimpleConnector con(&parser);
 
 
	parser.loadDefaultArguments();
	con.parseArgs();
 
	if (!con.parseArgs() || !parser.checkHelpAndWarnUnparsed())
	{
		con.logOptions();
		exit(1);
	}
 
	if (!con.connectRobot(robot->getRobot()))
	{
		cout << "Could not connect to robot... exiting" << endl;
		Aria::exit(1);
	}
 
	arm->setRobot(robot->getRobot());
 
	cout << "connection done " << endl;
 
	robot->getRobot()->runAsync(true);
 
 
}


Code console : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 
Connection
Connecting to simulator through tcp.
 
Syncing 0
Syncing 1
Syncing 2
Connected to robot.
Name: MobileSim
Type: Pioneer
Subtype: p3dx
ArConfig: parameter 'AngleConvFactor' is a double parameter but was given non-double argument of '0.001534'
## Last error on line 25 of file '/usr/local/Aria/params/p3dx.p'
ArConfig: parameter 'DistConvFactor' is a double parameter but was given non-double argument of '0.485'
## Last error on line 26 of file '/usr/local/Aria/params/p3dx.p'
ArConfig: parameter 'DiffConvFactor' is a double parameter but was given non-double argument of '0.0056'
## Last error on line 29 of file '/usr/local/Aria/params/p3dx.p'
ArConfig: parameter 'GyroScaler' is a double parameter but was given non-double argument of '1.626'
## Last error on line 32 of file '/usr/local/Aria/params/p3dx.p'
Using default parameters for a p3dx robot
Initializing the arm.
Arm initialization failed.
connection done 
Aria: Received signal 'SIGSEGV'. Exiting.
Disconnecting from robot.
Aria: Received signal 'SIGSEGV'. Exiting.


Donc, quand je click sur le boutton, j'ai bien l'activation qui se fait, mais une fois que j'ai atteint la fin de la fonction associé au click du bouton c'est comme si le [g]robot->getRobot()->runAsync(true);[/g] se terminait aussi. Comment est ce que je peux arriver a le maintenir en vie? Je dois créer un thread? et le laisser tourner dedans jusqu'a la fin de mon programme?

Si oui, c'est quoi la librairie standard pour les thread en c++?^^

Merci bien