Thunderbots Project
Loading...
Searching...
No Matches
trajectory_path_with_cost.h
1#pragma once
2
3#include "software/ai/navigator/obstacle/obstacle.hpp"
4#include "software/ai/navigator/trajectory/trajectory_path.h"
5
11{
12 public:
13 TrajectoryPathWithCost() = delete;
14
15 explicit TrajectoryPathWithCost(const TrajectoryPath& traj_path);
16
22 bool collides() const;
23
24 // The trajectory path that the costs are associated with
25 TrajectoryPath traj_path;
26
27 // The duration before the trajectory leaves an obstacle that it starts
28 // within. 0 if the trajectory does not start within an obstacle.
29 double collision_duration_front_s = 0.0;
30
31 // The duration we're within an obstacle before the trajectory end.
32 // 0 if the trajectory does not end within an obstacle.
33 double collision_duration_back_s = 0.0;
34
35 // The time and obstacle at which the trajectory first collides with an obstacle
36 // first_collision_time_s is set to infinity and colliding_obstacle is nullptr
37 // if the trajectory does not collide.
38 // Note that collisions that the trajectory starts or ends in are not considered as
39 // those are unavoidable + they are handled by collision_duration_front_s and
40 // collision_duration_back_s.
41 double first_collision_time_s = std::numeric_limits<double>::max();
42 ObstaclePtr colliding_obstacle = nullptr;
43
44 // Total cost of the trajectory path
45 double cost = 0.0;
46};
Definition trajectory_path_with_cost.h:11
bool collides() const
Definition trajectory_path_with_cost.cpp:8
Definition trajectory_path.h:19