SMACC
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
cl_move_group_interface::CpTrajectoryHistory Class Reference

#include <cp_trajectory_history.h>

Inheritance diagram for cl_move_group_interface::CpTrajectoryHistory:
Inheritance graph
Collaboration diagram for cl_move_group_interface::CpTrajectoryHistory:
Collaboration graph

Public Member Functions

bool getLastTrajectory (int backIndex, moveit_msgs::RobotTrajectory &trajectory)
 
bool getLastTrajectory (moveit_msgs::RobotTrajectory &trajectory)
 
void pushTrajectory (std::string name, const moveit_msgs::RobotTrajectory &trajectory, moveit_msgs::MoveItErrorCodes result)
 
- Public Member Functions inherited from smacc::ISmaccComponent
 ISmaccComponent ()
 
virtual ~ISmaccComponent ()
 
virtual std::string getName () const
 

Private Attributes

std::vector< TrajectoryHistoryEntrytrajectoryHistory_
 

Additional Inherited Members

- Protected Member Functions inherited from smacc::ISmaccComponent
virtual void initialize (ISmaccClient *owner)
 
void setStateMachine (ISmaccStateMachine *stateMachine)
 
template<typename EventType >
void postEvent (const EventType &ev)
 
template<typename EventType >
void postEvent ()
 
template<typename TOrthogonal , typename TSourceObject >
void onOrthogonalAllocation ()
 
template<typename TComponent >
void requiresComponent (TComponent *&requiredComponentStorage)
 
template<typename TClient >
void requiresClient (TClient *&requiredClientStorage)
 
virtual void onInitialize ()
 
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs>
SmaccComponentType * createSiblingComponent (TArgs... targs)
 
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs>
SmaccComponentType * createSiblingNamedComponent (std::string name, TArgs... targs)
 
- Protected Attributes inherited from smacc::ISmaccComponent
ISmaccStateMachinestateMachine_
 
ISmaccClientowner_
 

Detailed Description

Definition at line 23 of file cp_trajectory_history.h.

Member Function Documentation

◆ getLastTrajectory() [1/2]

bool cl_move_group_interface::CpTrajectoryHistory::getLastTrajectory ( int  backIndex,
moveit_msgs::RobotTrajectory &  trajectory 
)

Definition at line 12 of file cp_trajectory_history.cpp.

13 {
14 if (trajectoryHistory_.size() == 0 )
15 {
16 return false;
17 }
18
19 if (backIndex < 0)
20 {
21 backIndex = 0;
22 }
23 else if(backIndex >= this->trajectoryHistory_.size())
24 {
25 return false;
26 }
27
28 trajectory = this->trajectoryHistory_[this->trajectoryHistory_.size() - 1 - backIndex].trajectory;
29 return true;
30 }
std::vector< TrajectoryHistoryEntry > trajectoryHistory_

References trajectoryHistory_.

Referenced by getLastTrajectory(), cl_move_group_interface::CbExecuteLastTrajectory::onEntry(), cl_move_group_interface::CbMoveLastTrajectoryInitialState::onEntry(), and cl_move_group_interface::CbUndoLastTrajectory::onEntry().

Here is the caller graph for this function:

◆ getLastTrajectory() [2/2]

bool cl_move_group_interface::CpTrajectoryHistory::getLastTrajectory ( moveit_msgs::RobotTrajectory &  trajectory)

Definition at line 32 of file cp_trajectory_history.cpp.

33 {
34 return getLastTrajectory(-1, trajectory);
35 }
bool getLastTrajectory(int backIndex, moveit_msgs::RobotTrajectory &trajectory)

References getLastTrajectory().

Here is the call graph for this function:

◆ pushTrajectory()

void cl_move_group_interface::CpTrajectoryHistory::pushTrajectory ( std::string  name,
const moveit_msgs::RobotTrajectory &  trajectory,
moveit_msgs::MoveItErrorCodes  result 
)

Definition at line 37 of file cp_trajectory_history.cpp.

38 {
39 TrajectoryHistoryEntry entry;
40 this->trajectoryHistory_.push_back(entry);
41
42 auto &last = this->trajectoryHistory_.back();
43 last.trajectory = trajectory;
44 last.result = result;
45 last.name = name;
46 }

References trajectoryHistory_.

Referenced by cl_move_group_interface::CbMoveEndEffectorTrajectory::onEntry().

Here is the caller graph for this function:

Member Data Documentation

◆ trajectoryHistory_

std::vector<TrajectoryHistoryEntry> cl_move_group_interface::CpTrajectoryHistory::trajectoryHistory_
private

Definition at line 34 of file cp_trajectory_history.h.

Referenced by getLastTrajectory(), and pushTrajectory().


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