00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef COLLVOID_ORCA_H
00031 #define COLLVOID_ORCA_H
00032
00033 #include "collvoid_local_planner/Agent.h"
00034
00035 namespace collvoid{
00036
00037
00038
00039 Line createOrcaLine(Agent* me, Agent* other, double trunc_time, double timestep, double left_pref, double cur_allowed_error);
00040
00041 Line createOrcaLine(double combinedRadius, const Vector2& relativePosition, const Vector2& me_vel,const Vector2& other_vel, double trunc_time, double timestep, double left_pref, double cur_allowed_error, bool controlled);
00042
00043
00044 Line createStationaryAgent(Agent* me, Agent* other);
00045 void addAccelerationConstraintsXY(double max_vel_x, double acc_lim_x, double max_vel_y, double acc_lim_y, Vector2 cur_vel, double heading, double sim_period, bool holo_robot, std::vector<Line>& additional_orca_lines);
00046
00047 void addMovementConstraintsDiffSimple(double max_track_speed, double heading, std::vector<Line>& additional_orca_lines);
00048
00049 void addMovementConstraintsDiff(double error, double T, double max_vel_x, double max_vel_th, double heading, double v_max_ang, std::vector<Line>& additional_orca_lines);
00050 double beta(double T, double theta, double v_max_ang);
00051 double gamma(double T, double theta, double error, double v_max_ang);
00052 double calcVstar(double vh, double theta);
00053 double calcVstarError(double T,double theta, double error);
00054 double calculateMaxTrackSpeedAngle(double T, double theta, double error, double max_vel_x, double max_vel_th, double v_max_ang);
00055
00056
00057
00058 bool linearProgram1(const std::vector<Line>& lines, size_t lineNo, float radius, const Vector2& optVelocity, bool dirOpt, Vector2& result);
00059 size_t linearProgram2(const std::vector<Line>& lines, float radius, const Vector2& optVelocity, bool dirOpt, Vector2& result);
00060 void linearProgram3(const std::vector<Line>& lines, size_t numObstLines, size_t beginLine, float radius, Vector2& result);
00061
00062 }
00063
00064 #endif