Skip to content

Commit ac5ea9d

Browse files
committed
evaluation - global path planner logs loaded into the main executable [#25]
- adjusted `evaluate_from_dir` script invoking the executable
1 parent 4a0cb9c commit ac5ea9d

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

srpb_evaluation/scripts/evaluate_from_dir.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ echo "groups data: $newest_groups"
4343
echo "global planner data: $newest_gplanner"
4444
echo ""
4545

46-
rosrun srpb_evaluation srpb_evaluation $newest_robot $newest_people $newest_groups $safety_dist
46+
rosrun srpb_evaluation srpb_evaluation $newest_robot $newest_people $newest_groups $newest_gplanner $safety_dist

srpb_evaluation/src/main.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
#include <angles/angles.h>
22
#include <srpb_logger/robot_logger.h>
33
#include <srpb_logger/people_logger.h>
4+
#include <srpb_logger/global_planner_logger.h>
45

56
#include "srpb_evaluation/utils.h"
67

78
using namespace srpb::logger;
89
using namespace srpb::evaluation;
910

1011
int main(int argc, char* argv[]) {
11-
if (argc != 5) {
12+
if (argc != 6) {
1213
printf(
1314
"Please input\r\n"
1415
"\t* the path to the log file of the robot\r\n"
1516
"\t* the path to the log file of the people\r\n"
1617
"\t* the path to the log file of the people groups\r\n"
18+
"\t* the path to the log file of the global planner\r\n"
1719
"\t* and value of the safety distance [m].\r\n"
1820
);
1921
return 1;
@@ -22,7 +24,8 @@ int main(int argc, char* argv[]) {
2224
auto file_robot = std::string(argv[1]);
2325
auto file_people = std::string(argv[2]);
2426
auto file_groups = std::string(argv[3]);
25-
auto safety_distance = std::atof(argv[4]);
27+
auto file_gplanner = std::string(argv[4]);
28+
auto safety_distance = std::atof(argv[5]);
2629

2730
// goal reached values
2831
double goal_tolerance_xy = 0.2;
@@ -58,6 +61,7 @@ int main(int argc, char* argv[]) {
5861
auto timed_robot_data = parseFile<RobotData>(file_robot, &RobotLogger::robotFromString);
5962
auto timed_people_data = parseFile<people_msgs_utils::Person>(file_people, &PeopleLogger::personFromString);
6063
auto timed_groups_data = parseFile<people_msgs_utils::Group>(file_groups, &PeopleLogger::groupFromString);
64+
auto timed_gplanner_data = parseFile<GlobalPlannerData>(file_gplanner, &GlobalPlannerLogger::plannerFromString);
6165
// since Person and Group are logged in separation, so by default Group does not contain members, only their IDs
6266
timed_groups_data = fillGroupsWithMembers(timed_groups_data, timed_people_data);
6367

0 commit comments

Comments
 (0)