moveit2
The MoveIt Motion Planning Framework for ROS 2.
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
robot_interaction::LockedRobotState Class Reference

Maintain a RobotState in a multithreaded environment. More...

#include <locked_robot_state.h>

Inheritance diagram for robot_interaction::LockedRobotState:
Inheritance graph
[legend]

Public Types

typedef std::function< void(moveit::core::RobotState *)> ModifyStateFunction
 

Public Member Functions

 LockedRobotState (const moveit::core::RobotState &state)
 
 LockedRobotState (const moveit::core::RobotModelPtr &model)
 
virtual ~LockedRobotState ()
 
moveit::core::RobotStateConstPtr getState () const
 get read-only access to the state. More...
 
void setState (const moveit::core::RobotState &state)
 Set the state to the new value. More...
 
void modifyState (const ModifyStateFunction &modify)
 

Protected Member Functions

virtual void robotStateChanged ()
 

Protected Attributes

std::mutex state_lock_
 

Detailed Description

Maintain a RobotState in a multithreaded environment.

Definition at line 61 of file locked_robot_state.h.

Member Typedef Documentation

◆ ModifyStateFunction

Definition at line 82 of file locked_robot_state.h.

Constructor & Destructor Documentation

◆ LockedRobotState() [1/2]

robot_interaction::LockedRobotState::LockedRobotState ( const moveit::core::RobotState state)

Definition at line 41 of file locked_robot_state.cpp.

◆ LockedRobotState() [2/2]

robot_interaction::LockedRobotState::LockedRobotState ( const moveit::core::RobotModelPtr &  model)

Definition at line 47 of file locked_robot_state.cpp.

◆ ~LockedRobotState()

robot_interaction::LockedRobotState::~LockedRobotState ( )
virtualdefault

Member Function Documentation

◆ getState()

moveit::core::RobotStateConstPtr robot_interaction::LockedRobotState::getState ( ) const

get read-only access to the state.

Definition at line 56 of file locked_robot_state.cpp.

Here is the caller graph for this function:

◆ modifyState()

void robot_interaction::LockedRobotState::modifyState ( const ModifyStateFunction modify)

Definition at line 79 of file locked_robot_state.cpp.

Here is the caller graph for this function:

◆ robotStateChanged()

void robot_interaction::LockedRobotState::robotStateChanged ( )
protectedvirtual

Reimplemented in Super1.

Definition at line 95 of file locked_robot_state.cpp.

◆ setState()

void robot_interaction::LockedRobotState::setState ( const moveit::core::RobotState state)

Set the state to the new value.

Definition at line 62 of file locked_robot_state.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ state_lock_

std::mutex robot_interaction::LockedRobotState::state_lock_
mutableprotected

Definition at line 103 of file locked_robot_state.h.


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