Public Types | Public Member Functions | Protected Attributes
vigir_step_control::StepQueue Class Reference

#include <step_queue.h>

List of all members.

Public Types

typedef boost::shared_ptr
< const StepQueue
ConstPtr
typedef boost::shared_ptr
< StepQueue
Ptr

Public Member Functions

bool empty () const
 Checks if there are steps in queue.
int firstStepIndex () const
 Returns next step index enqueued for execution.
bool getStep (msgs::Step &step, unsigned int step_index=0u)
 Retrieves step of execution queue.
bool getStepAt (msgs::Step &step, unsigned int position=0u)
 Retrieves step of execution queue.
std::vector< msgs::Step > getSteps (unsigned int start_index, unsigned int end_index) const
 getSteps Retrieves all steps with index in range of [start_index; end_index]
int lastStepIndex () const
 Returns last step index enqueued for execution.
bool popStep (msgs::Step &step)
 Dequeues and returns next step from execution queue.
bool popStep ()
void removeStep (unsigned int step_index)
 Remove steps with specific index from queue.
void removeSteps (unsigned int from_step_index, int to_step_index=-1)
 Remove steps in the given range [from_step_index, to_step_index].
void reset ()
size_t size () const
 Returns size of step queue.
 StepQueue ()
bool updateStepPlan (const msgs::StepPlan &step_plan, int min_step_index=0)
 Merges given step plan to the current execution queue of steps. Hereby, two cases have to considered: 1. In case of an empty execution queue (robot is standing) the step plan has to begin with step index 0. 2. In case of an non-empty execution queue (robot is walking) TODO: Stitching rules, new total step plan length.
virtual ~StepQueue ()

Protected Attributes

boost::shared_mutex queue_mutex_
StepPlan step_plan_

Detailed Description

Definition at line 43 of file step_queue.h.


Member Typedef Documentation

typedef boost::shared_ptr<const StepQueue> vigir_step_control::StepQueue::ConstPtr

Definition at line 48 of file step_queue.h.

typedef boost::shared_ptr<StepQueue> vigir_step_control::StepQueue::Ptr

Definition at line 47 of file step_queue.h.


Constructor & Destructor Documentation

Definition at line 7 of file step_queue.cpp.

Definition at line 11 of file step_queue.cpp.


Member Function Documentation

Checks if there are steps in queue.

Returns:
True if any steps has been enqueued.

Definition at line 21 of file step_queue.cpp.

Returns next step index enqueued for execution.

Returns:
Step index of next step in queue. If queue is empty -1 will be returned.

Definition at line 158 of file step_queue.cpp.

bool vigir_step_control::StepQueue::getStep ( msgs::Step &  step,
unsigned int  step_index = 0u 
)

Retrieves step of execution queue.

Parameters:
stepOutgoing variable for retrieved step.
indexPosition of step in queue to be returned. 0 points to the next step to be executed next.
Returns:
True If step could been returned.

Definition at line 106 of file step_queue.cpp.

bool vigir_step_control::StepQueue::getStepAt ( msgs::Step &  step,
unsigned int  position = 0u 
)

Retrieves step of execution queue.

Parameters:
stepOutgoing variable for retrieved step.
positionPosition of step in queue to be returned. 0 points to the next step to be executed next.
Returns:
True If step could been returned.

Definition at line 112 of file step_queue.cpp.

std::vector< msgs::Step > vigir_step_control::StepQueue::getSteps ( unsigned int  start_index,
unsigned int  end_index 
) const

getSteps Retrieves all steps with index in range of [start_index; end_index]

Parameters:
start_indexStarting index
end_indexEnding index
Returns:
List of all found steps within given range of [start_index; end_index]

Definition at line 118 of file step_queue.cpp.

Returns last step index enqueued for execution.

Returns:
Step index of last step in queue. If queue is empty -1 will be returned.

Definition at line 169 of file step_queue.cpp.

bool vigir_step_control::StepQueue::popStep ( msgs::Step &  step)

Dequeues and returns next step from execution queue.

Parameters:
stepOutgoing variable for dequeued step.
Returns:
True if step could been dequeued.

Definition at line 146 of file step_queue.cpp.

Definition at line 152 of file step_queue.cpp.

void vigir_step_control::StepQueue::removeStep ( unsigned int  step_index)

Remove steps with specific index from queue.

Parameters:
step_indexStep to be removed

Definition at line 134 of file step_queue.cpp.

void vigir_step_control::StepQueue::removeSteps ( unsigned int  from_step_index,
int  to_step_index = -1 
)

Remove steps in the given range [from_step_index, to_step_index].

Parameters:
from_step_indexstart index
to_step_indexend index; to_step_index < 0 is equal to removing all steps with index >= from_step_index

Definition at line 140 of file step_queue.cpp.

Definition at line 15 of file step_queue.cpp.

Returns size of step queue.

Returns:
Size of step queue

Definition at line 27 of file step_queue.cpp.

bool vigir_step_control::StepQueue::updateStepPlan ( const msgs::StepPlan &  step_plan,
int  min_step_index = 0 
)

Merges given step plan to the current execution queue of steps. Hereby, two cases have to considered: 1. In case of an empty execution queue (robot is standing) the step plan has to begin with step index 0. 2. In case of an non-empty execution queue (robot is walking) TODO: Stitching rules, new total step plan length.

Parameters:
step_planStep plan to be merged into execution queue.
min_step_indexOnly steps with index >= min_step_index are considered for merge
Returns:
True if step plan could be merged.

check for consistency

merge step plan

Definition at line 33 of file step_queue.cpp.


Member Data Documentation

boost::shared_mutex vigir_step_control::StepQueue::queue_mutex_ [mutable, protected]

Definition at line 139 of file step_queue.h.

Definition at line 136 of file step_queue.h.


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


vigir_step_control
Author(s): Alexander Stumpf
autogenerated on Fri Jul 14 2017 02:42:09