Skip to content

Commit 690d349

Browse files
committed
Add option to generate trajectory2D for backward compatibility
1 parent 82115e3 commit 690d349

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/EnvironmentXYZTheta.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,11 @@ void EnvironmentXYZTheta::getTrajectory(const vector<int>& stateIDPath,
10141014
#ifdef ENABLE_DEBUG_DRAWINGS
10151015
V3DD::DRAW_SPHERE("ugv_nav4d_trajectory_poses", pointOnTravPlane, 0.01, V3DD::Color::red);
10161016
#endif
1017+
//TODO: Only left here until software which still uses trajectory2D is updated to use trajectory3D
1018+
if (setZToZero){
1019+
pointOnTravPlane.z() = 0;
1020+
}
1021+
10171022
Eigen::Vector3d pointOnBody = plan2Body.inverse(Eigen::Isometry) * pointOnTravPlane;
10181023
if (positions.empty() || !(positions.back().isApprox(pointOnBody)))
10191024
{

0 commit comments

Comments
 (0)