Public Member Functions | List of all members
ORCAAgent Class Reference

ORCAAgent class implements agent with ORCA algoritm behavior. More...

#include <ORCAAgent.h>

Inheritance diagram for ORCAAgent:
Inheritance graph
[legend]

Public Member Functions

void ApplyNewVelocity () override
 Method for state updating and appling computed velocity. More...
 
ORCAAgentClone () const override
 Method for cloning objects. Creates copy of object in memmory and return pointer to copy. More...
 
void ComputeNewVelocity () override
 Computes new velocity of agent using ORCA algorithm and linear programing. More...
 
bool operator!= (const ORCAAgent &another) const
 Comparisons operator. Compares id of agents. More...
 
ORCAAgentoperator= (const ORCAAgent &obj)
 Assignment operator. More...
 
bool operator== (const ORCAAgent &another) const
 Comparisons operator. Compares id of agents. More...
 
 ORCAAgent ()
 ORCAAgent default constructor. More...
 
 ORCAAgent (const int &id, const Point &start, const Point &goal, const Map &map, const EnvironmentOptions &options, AgentParam param)
 ORCAAgent constructor with parameters. More...
 
 ORCAAgent (const ORCAAgent &obj)
 ORCAAgent copy constructor. More...
 
bool UpdatePrefVelocity () override
 Method for computing preffered velocity and chosing current goal from global path. More...
 
 ~ORCAAgent ()
 Virtual destructor. More...
 
- Public Member Functions inherited from Agent
virtual void AddNeighbour (Agent &neighbour, float distSq)
 Adds new neighbour. Only agents inside sight radius will be adeed. Can be ovveriden. More...
 
 Agent ()
 Agent default constructor. More...
 
 Agent (const int &id, const Point &start, const Point &goal, const Map &map, const EnvironmentOptions &options, AgentParam param)
 Agent constructor with parameters. More...
 
 Agent (const Agent &obj)
 Agent copy constructor. More...
 
std::pair< unsigned int, unsigned int > GetCollision () const
 Returns collisions count. For debug purposes. More...
 
Point GetGoal () const
 Returns goal of agent. For ROS Simulation purposes. More...
 
int GetID () const
 Returns identifier of agent. More...
 
Point GetNext () const
 Returns current goal of agent. For debug purposes. More...
 
AgentParam GetParam () const
 Returns parameters of agent. For ROS Simulation purposes. More...
 
Point GetPosition () const
 Returns current position of Agent. More...
 
float GetRadius () const
 Returns radius of agent. More...
 
Point GetStart () const
 Returns start of agent. For ROS Simulation purposes. More...
 
Point GetVelocity () const
 Returns current velocity of agent. More...
 
bool InitPath ()
 Starts pathfinding from start to goal position. More...
 
virtual bool isFinished ()
 Checks, what the agent is on finish. To achieve finish agent should be at least in delta distance from goal position. More...
 
bool operator!= (const Agent &another) const
 Comparisons operator. Compares id of agents. More...
 
Agentoperator= (const Agent &obj)
 Assignment operator. More...
 
bool operator== (const Agent &another) const
 Comparisons operator. Compares id of agents. More...
 
template<class Planner >
void SetPlanner (const Planner &pl)
 Set global planner object. More...
 
virtual void SetPosition (const Point &pos)
 SetsS current position of agent. Can be ovveriden. More...
 
virtual void SetVelocity (const Point &vel)
 Sets current velocity. Should be used if the new velocity may not coincide with the computed. More...
 
void UpdateNeighbourObst ()
 Computes neighbouring obstacles. More...
 
virtual ~Agent ()
 Virtual destructor. More...
 

Detailed Description

ORCAAgent class implements agent with ORCA algoritm behavior.

This class describes the interaction interface with the navigation algorithm. This class implements a collision avoidance algorithm ORCA the interaction between ORCA and path planner.

An illustration of the agent is presented in the figure below.

Agent sheme

Definition at line 26 of file ORCAAgent.h.

Constructor & Destructor Documentation

ORCAAgent::ORCAAgent ( )

ORCAAgent default constructor.

Definition at line 9 of file ORCAAgent.cpp.

ORCAAgent::ORCAAgent ( const int &  id,
const Point start,
const Point goal,
const Map map,
const EnvironmentOptions options,
AgentParam  param 
)

ORCAAgent constructor with parameters.

Parameters
idAgent identifier number for debug and comparison.
startStart position of agent.
goalGoal position of agent.
mapStatic environment map. It contains information about grid and static obstacles boundaries. More about it see in Main page and Map class.
optionsEnvironment and algorithm options. See EnvironmentOptions class.
paramagent and algorithm options. See AgentParam class.

Definition at line 12 of file ORCAAgent.cpp.

ORCAAgent::ORCAAgent ( const ORCAAgent obj)

ORCAAgent copy constructor.

Parameters
objORCAAgent object to copy.

Definition at line 17 of file ORCAAgent.cpp.

ORCAAgent::~ORCAAgent ( )
default

Virtual destructor.

Member Function Documentation

void ORCAAgent::ApplyNewVelocity ( )
overridevirtual

Method for state updating and appling computed velocity.

Implements Agent.

Definition at line 332 of file ORCAAgent.cpp.

ORCAAgent * ORCAAgent::Clone ( ) const
overridevirtual

Method for cloning objects. Creates copy of object in memmory and return pointer to copy.

Returns
Pointer to copy of object

Implements Agent.

Definition at line 384 of file ORCAAgent.cpp.

void ORCAAgent::ComputeNewVelocity ( )
overridevirtual

Computes new velocity of agent using ORCA algorithm and linear programing.

Implements Agent.

Definition at line 23 of file ORCAAgent.cpp.

bool ORCAAgent::operator!= ( const ORCAAgent another) const

Comparisons operator. Compares id of agents.

Parameters
anotherORCAAgent to compare.
Returns
Inequality of this and another identifiers.

Definition at line 379 of file ORCAAgent.cpp.

ORCAAgent & ORCAAgent::operator= ( const ORCAAgent obj)

Assignment operator.

Parameters
objORCAAgent to assignment.
Returns
Reference to agent.

Definition at line 363 of file ORCAAgent.cpp.

bool ORCAAgent::operator== ( const ORCAAgent another) const

Comparisons operator. Compares id of agents.

Parameters
anotherORCAAgent to compare.
Returns
equality of this and another identifiers.

Definition at line 374 of file ORCAAgent.cpp.

bool ORCAAgent::UpdatePrefVelocity ( )
overridevirtual

Method for computing preffered velocity and chosing current goal from global path.

Returns
Success of finding new current goal.

Implements Agent.

Definition at line 338 of file ORCAAgent.cpp.


The documentation for this class was generated from the following files:


ORCAStar
Author(s): Stepan Drgachev
autogenerated on Wed Jul 15 2020 16:13:14