Skip to content

mkyun2/FollowGapMethod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FollowGapMethod

C++ 11 Environment

This algorithm was experimented in simulation and realworld (using 2D Lidar)

log

for example(main.cpp)


//yaw - vehicle heading in reference coordinates
//desired yaw - radian from Vehicle Position to Goal Position 
//distance array - distance data array from lidar
//min, max angle - start angle, end angle on horizontal of view >= 0
//Clearance - blue Point
//Obstacle - red point

//final Distance, returnAngle: green line
//final Dist1, PI1: black line
//final Dist2, PI2: red line

//finalAngle: GapAngle between obstacles
#include "FollowGap.h"
FollowGapMethod followGap;
result = followGap.Solve(yaw, DesiredYaw,Distance array, minimum angle, maximum angle);

double finalX=followGap.finalDistance/1000.0*cosf(followGap.returnAngle*M_PI/180.0);
double finalY=followGap.finalDistance/1000.0*sinf(followGap.returnAngle*M_PI/180.0);
double obs1X=followGap.finalDist1*cosf(followGap.finalPI1*M_PI/180.0);
double obs1Y=followGap.finalDist1*sinf(followGap.finalPI1*M_PI/180.0);
double obs2X=followGap.finalDist2*cosf(followGap.finalPI2*M_PI/180.0);
double obs2Y=followGap.finalDist2*sinf(followGap.finalPI2*M_PI/180.0);

yaw error = followGap.finalAngle - yaw;

//ex result=followGap.Solve(yaw,desiredYaw,inputRanges,40,140); my horizontal of view is 100.
//if(result) control

About

Obstacle Avoidance Method

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages