moveit2
The MoveIt Motion Planning Framework for ROS 2.
Public Member Functions | List of all members
moveit_rviz_plugin::JMGItemModel Class Reference

#include <motion_planning_frame_joints_widget.h>

Inheritance diagram for moveit_rviz_plugin::JMGItemModel:
Inheritance graph
[legend]
Collaboration diagram for moveit_rviz_plugin::JMGItemModel:
Collaboration graph
[legend]

Public Member Functions

 JMGItemModel (const moveit::core::RobotState &robot_state, const std::string &group_name, QObject *parent=nullptr)
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
QVariant data (const QModelIndex &index, int role) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role) const override
 
bool setData (const QModelIndex &index, const QVariant &value, int role) override
 
void updateRobotState (const moveit::core::RobotState &state)
 call this on any external change of the RobotState More...
 
moveit::core::RobotStategetRobotState ()
 
const moveit::core::RobotStategetRobotState () const
 
const moveit::core::JointModelGroupgetJointModelGroup () const
 

Detailed Description

TableModel to display joint values of a referenced RobotState.

Unfortunately we cannot store the RobotStatePtr (and thus ensure existence of the state during the lifetime of this class instance), because RobotInteraction (which is the initial use case) allocates internally a new RobotState if any other copy is held somewhere else. Hence, we also store an (unsafe) raw pointer. Lifetime of this raw pointer needs to be ensured.

Definition at line 67 of file motion_planning_frame_joints_widget.h.

Constructor & Destructor Documentation

◆ JMGItemModel()

moveit_rviz_plugin::JMGItemModel::JMGItemModel ( const moveit::core::RobotState robot_state,
const std::string &  group_name,
QObject *  parent = nullptr 
)

Definition at line 50 of file motion_planning_frame_joints_widget.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ columnCount()

int moveit_rviz_plugin::JMGItemModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
override

Definition at line 65 of file motion_planning_frame_joints_widget.cpp.

◆ data()

QVariant moveit_rviz_plugin::JMGItemModel::data ( const QModelIndex &  index,
int  role 
) const
override

Definition at line 85 of file motion_planning_frame_joints_widget.cpp.

Here is the call graph for this function:

◆ flags()

Qt::ItemFlags moveit_rviz_plugin::JMGItemModel::flags ( const QModelIndex &  index) const
override

Definition at line 70 of file motion_planning_frame_joints_widget.cpp.

Here is the call graph for this function:

◆ getJointModelGroup()

const moveit::core::JointModelGroup* moveit_rviz_plugin::JMGItemModel::getJointModelGroup ( ) const
inline

Definition at line 95 of file motion_planning_frame_joints_widget.h.

Here is the caller graph for this function:

◆ getRobotState() [1/2]

moveit::core::RobotState& moveit_rviz_plugin::JMGItemModel::getRobotState ( )
inline

Definition at line 87 of file motion_planning_frame_joints_widget.h.

Here is the caller graph for this function:

◆ getRobotState() [2/2]

const moveit::core::RobotState& moveit_rviz_plugin::JMGItemModel::getRobotState ( ) const
inline

Definition at line 91 of file motion_planning_frame_joints_widget.h.

◆ headerData()

QVariant moveit_rviz_plugin::JMGItemModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role 
) const
override

Definition at line 130 of file motion_planning_frame_joints_widget.cpp.

◆ rowCount()

int moveit_rviz_plugin::JMGItemModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
override

Definition at line 57 of file motion_planning_frame_joints_widget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setData()

bool moveit_rviz_plugin::JMGItemModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role 
)
override

Definition at line 137 of file motion_planning_frame_joints_widget.cpp.

Here is the call graph for this function:

◆ updateRobotState()

void moveit_rviz_plugin::JMGItemModel::updateRobotState ( const moveit::core::RobotState state)

call this on any external change of the RobotState

Definition at line 181 of file motion_planning_frame_joints_widget.cpp.

Here is the call graph for this function:

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