SITL: Allows last_letter to start at the location specified by the SITL arguments

This commit is contained in:
Georacer 2015-06-13 20:28:03 +03:00 committed by Andrew Tridgell
parent 8426553609
commit b375a8debf

View File

@ -60,11 +60,17 @@ void last_letter::start_last_letter(void)
close(i);
}
int ret = execlp("roslaunch",
"roslaunch",
char argHome[50];
sprintf(argHome,"home:=[%f,%f,%f]",home.lat*1.0e-7,home.lng*1.0e-7,(double)home.alt*1.0e-2);
int ret = execlp("roslaunch",
"roslaunch",
"last_letter",
"launcher.launch",
"ArduPlane:=true",
"simRate:=500",
"deltaT:=0.002",
argHome,
NULL);
if (ret != 0) {
perror("roslaunch");