forked from arpg/CarPlanner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectBoundarySolver.cpp
More file actions
26 lines (20 loc) · 1.02 KB
/
DirectBoundarySolver.cpp
File metadata and controls
26 lines (20 loc) · 1.02 KB
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
#include "DirectBoundarySolver.h"
DirectBoundarySolver::DirectBoundarySolver()
{
}
///////////////////////////////////////////////////////////////////////////////
void DirectBoundarySolver::Solve(BoundaryProblem *pProblem)
{
//DirectBoundaryProblem* directProblem = (DirectBoundaryProblem*)pProblem;
//first find the distance to the goal
//double dDist = (directProblem->m_dGoalPose.head(2) - directProblem->m_dStartPose.head(2)).norm();
//now split this in 3 to calculate the turning radii
//double dRad1 = dDist/3;
//double dRad2 = dDist/3;
//place the center of the circles perpendicular to the travel direction
// Eigen::Vector2d dDir(sin(directProblem->m_dStartPose(2)),cos(directProblem->m_dStartPose(2)));
// Eigen::Vector2d dCircCenter1 = directProblem->m_dStartPose.head(2) + dDir*dRad1;
// dDir = Eigen::Vector2d(sin(directProblem->m_dGoalPose(2)),cos(directProblem->m_dGoalPose(2)));
// Eigen::Vector2d dCircCenter2 = directProblem->m_dGoalPose.head(2) + dDir*dRad1;
//calcuate the
}