diff --git a/build/sim/testmanager.sh b/build/sim/testmanager.sh index 2ef8d868cd62bbe3443d4a9c014dceecef82f839..4e67a320cffe39deb9f6fb8f4a73a304b6994953 100644 --- a/build/sim/testmanager.sh +++ b/build/sim/testmanager.sh @@ -1,24 +1,30 @@ #!/bin/bash -cd ~/catkin_ws - + +# Vor erstem Start muss catkin_make in ~/catkin_ws ausgeführt werden echo "testing ..." +# Log-Skripte ausführbar machen + chmod +x ~/catkin_ws/src/semesterprojekt-modulbasiertes-testen/src/sim/location_monitor/scripts/bot_listener.py chmod +x ~/catkin_ws/src/semesterprojekt-modulbasiertes-testen/src/sim/location_monitor/scripts/location_monitor_node.py +# Art des Roboters festlegen (für dieses Beispiel mit turtlebot3 notwendig, für individuelle Verwendung bitte eventuell anpassen) + type=$(cat ~/catkin_ws/src/semesterprojekt-modulbasiertes-testen/build/sim/botname.txt) -if [ "$type" = "burger" ] # für dieses Beispiel für eigene Verwendung den Teil anpassen + + +if [ "$type" = "burger" ] # für dieses Beispiel je nach 'type' den then - botradius=0.069 + botlaenge=0.069 else - botradius=0.1405 + botlaenge=0.1405 fi @@ -82,9 +88,6 @@ for ((i=0; i<${anzahlTests}; i++)); do sleep 1 gnome-terminal -- bash -c 'cd ~/catkin_ws; source devel/setup.bash; cd ~/catkin_ws/src/semesterprojekt-modulbasiertes-testen/build/sim/log; rosrun location_monitor bot_listener.py;' - #location_monitor -# gnome-terminal -- bash -c 'cd ~/catkin_ws; source devel/setup.bash; cd ~/catkin_ws/src/semesterprojekt-modulbasiertes-testen/build/sim/log; rosrun location_monitor location_monitor_node.py '$botradius' '$dist' 500 '$timeout';' - #Launch Test gnome-terminal -- bash -c 'cd ~/catkin_ws; source devel/setup.bash; export TURTLEBOT3_MODEL=burger; rosrun sim turtlebot3_obstacle '$dist';' @@ -99,28 +102,17 @@ for ((i=0; i<${anzahlTests}; i++)); do echo "Location_Monitor:" echo "" - if [ "$type" = "burger" ] # Breite von waffle berücksichtigen + if [ "$type" = "burger" ] # Breite von waffle berücksichtigen - then + then - rosrun location_monitor location_monitor_node.py $botradius 0 0 $dist 500 $timeout + rosrun location_monitor location_monitor_node.py $botlaenge 0 0 $dist 500 $timeout - else + else - rosrun location_monitor location_monitor_node.py $botradius 0.07 68 $dist 500 $timeout + rosrun location_monitor location_monitor_node.py $botlaenge 0.07 68 $dist 500 $timeout - fi - - -# if ( rosrun location_monitor location_monitor_node.py $botradius $dist 500 $timeout & ) | grep -q -m 1 'Collision\|Stop\|Timeout'; then - -# ps ax | grep -i python | awk {'print $1'} | xargs kill -9 -# ps ax | grep -i gzclient | awk {'print $1'} | xargs kill -9 -# ps ax | grep -i gzserver | awk {'print $1'} | xargs kill -9 - -# fi - -# sleep 30 + fi ps ax | grep -i python | awk {'print $1'} | xargs kill -9 > /dev/null 2> /dev/null || : ps ax | grep -i gzclient | awk {'print $1'} | xargs kill -9 > /dev/null 2> /dev/null || : @@ -132,7 +124,6 @@ for ((i=0; i<${anzahlTests}; i++)); do done -cd ~/catkin_ws +cd ~/catkin_ws/src/semesterprojekt-modulbasiertes-testen/src/test/log_analyzer -echo "" -echo "Done" +python main.py -t config/ -l log/