Classes | Signals | Public Member Functions | Protected Types | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
rviz::InteractiveMarker Class Reference

#include <interactive_marker.h>

Inheritance diagram for rviz::InteractiveMarker:
Inheritance graph
[legend]

Classes

struct  MenuNode
 

Signals

void statusUpdate (StatusProperty::Level level, const std::string &name, const std::string &text)
 
void userFeedback (visualization_msgs::InteractiveMarkerFeedback &feedback)
 

Public Member Functions

boost::shared_ptr< QMenu > getMenu ()
 
const std::string & getName ()
 
const Ogre::Quaternion & getOrientation ()
 
const Ogre::Vector3 & getPosition ()
 
const std::string & getReferenceFrame ()
 
float getSize ()
 
bool handle3DCursorEvent (ViewportMouseEvent &event, const Ogre::Vector3 &cursor_pos, const Ogre::Quaternion &cursor_rot, const std::string &control_name)
 
bool handleMouseEvent (ViewportMouseEvent &event, const std::string &control_name)
 
bool hasMenu ()
 
 InteractiveMarker (Ogre::SceneNode *scene_node, DisplayContext *context)
 
bool processMessage (const visualization_msgs::InteractiveMarker &message)
 
void processMessage (const visualization_msgs::InteractiveMarkerPose &message)
 
void publishFeedback (visualization_msgs::InteractiveMarkerFeedback &feedback, bool mouse_point_valid=false, const Ogre::Vector3 &mouse_point_rel_world=Ogre::Vector3(0, 0, 0))
 
void requestPoseUpdate (Ogre::Vector3 position, Ogre::Quaternion orientation)
 
void rotate (Ogre::Quaternion delta_orientation, const std::string &control_name)
 
void setPose (Ogre::Vector3 position, Ogre::Quaternion orientation, const std::string &control_name)
 
void setShowAxes (bool show)
 
void setShowDescription (bool show)
 
void setShowVisualAids (bool show)
 
void showMenu (ViewportMouseEvent &event, const std::string &control_name, const Ogre::Vector3 &three_d_point, bool valid_point)
 
void startDragging ()
 
void stopDragging ()
 
void translate (Ogre::Vector3 delta_position, const std::string &control_name)
 
void update (float wall_dt)
 
 ~InteractiveMarker () override
 

Protected Types

typedef boost::shared_ptr< InteractiveMarkerControlInteractiveMarkerControlPtr
 
typedef std::map< std::string, InteractiveMarkerControlPtrM_ControlPtr
 

Protected Slots

void handleMenuSelect (int menu_item_id)
 

Protected Member Functions

QString makeMenuString (const std::string &entry)
 
void populateMenu (QMenu *menu, std::vector< uint32_t > &ids)
 
void publishPose ()
 
void reset ()
 
void updateReferencePose ()
 

Protected Attributes

Axesaxes_
 
std::string client_id_
 
DisplayContextcontext_
 
M_ControlPtr controls_
 
std::string description_
 
InteractiveMarkerControlPtr description_control_
 
bool dragging_
 
bool frame_locked_
 
bool got_3d_point_for_menu_
 
bool has_menu_
 
double heart_beat_t_
 
std::string last_control_name_
 
boost::shared_ptr< QMenu > menu_
 
std::map< uint32_t, MenuNodemenu_entries_
 
boost::recursive_mutex mutex_
 
std::string name_
 
Ogre::Quaternion orientation_
 
bool pose_changed_
 
bool pose_update_requested_
 
Ogre::Vector3 position_
 
std::string reference_frame_
 
Ogre::SceneNode * reference_node_
 
ros::Time reference_time_
 
Ogre::Quaternion requested_orientation_
 
Ogre::Vector3 requested_position_
 
float scale_
 
bool show_visual_aids_
 
boost::shared_ptr< boost::thread > sys_thread_
 
Ogre::Vector3 three_d_point_for_menu_
 
double time_since_last_feedback_
 
std::vector< uint32_t > top_level_menu_ids_
 
std::string topic_ns_
 

Detailed Description

Definition at line 69 of file interactive_marker.h.

Member Typedef Documentation

◆ InteractiveMarkerControlPtr

Definition at line 222 of file interactive_marker.h.

◆ M_ControlPtr

typedef std::map<std::string, InteractiveMarkerControlPtr> rviz::InteractiveMarker::M_ControlPtr
protected

Definition at line 223 of file interactive_marker.h.

Constructor & Destructor Documentation

◆ InteractiveMarker()

rviz::InteractiveMarker::InteractiveMarker ( Ogre::SceneNode *  scene_node,
DisplayContext context 
)

Definition at line 59 of file interactive_marker.cpp.

◆ ~InteractiveMarker()

rviz::InteractiveMarker::~InteractiveMarker ( )
override

Definition at line 72 of file interactive_marker.cpp.

Member Function Documentation

◆ getMenu()

boost::shared_ptr<QMenu> rviz::InteractiveMarker::getMenu ( )
inline
Returns
A shared_ptr to the QMenu owned by this InteractiveMarker.

Definition at line 176 of file interactive_marker.h.

◆ getName()

const std::string& rviz::InteractiveMarker::getName ( )
inline

Definition at line 117 of file interactive_marker.h.

◆ getOrientation()

const Ogre::Quaternion& rviz::InteractiveMarker::getOrientation ( )
inline

Definition at line 104 of file interactive_marker.h.

◆ getPosition()

const Ogre::Vector3& rviz::InteractiveMarker::getPosition ( )
inline

Definition at line 100 of file interactive_marker.h.

◆ getReferenceFrame()

const std::string& rviz::InteractiveMarker::getReferenceFrame ( )
inline

Definition at line 113 of file interactive_marker.h.

◆ getSize()

float rviz::InteractiveMarker::getSize ( )
inline

Definition at line 109 of file interactive_marker.h.

◆ handle3DCursorEvent()

bool rviz::InteractiveMarker::handle3DCursorEvent ( ViewportMouseEvent event,
const Ogre::Vector3 &  cursor_pos,
const Ogre::Quaternion &  cursor_rot,
const std::string &  control_name 
)

Supports selection and menu events from a 3D cursor.

Parameters
eventA struct holding certain event data (see full description InteractiveMarkerControl::handle3DCursorEvent)
cursor_posThe world-relative position of the 3D cursor.
cursor_rotThe world-relative orientation of the 3D cursor.
control_nameThe name of the child InteractiveMarkerControl calling this function.
Returns
true if the cursor event was intercepted, false if it was ignored

Definition at line 493 of file interactive_marker.cpp.

◆ handleMenuSelect

void rviz::InteractiveMarker::handleMenuSelect ( int  menu_item_id)
protectedslot

Definition at line 605 of file interactive_marker.cpp.

◆ handleMouseEvent()

bool rviz::InteractiveMarker::handleMouseEvent ( ViewportMouseEvent event,
const std::string &  control_name 
)

Definition at line 543 of file interactive_marker.cpp.

◆ hasMenu()

bool rviz::InteractiveMarker::hasMenu ( )
inline

Definition at line 170 of file interactive_marker.h.

◆ makeMenuString()

QString rviz::InteractiveMarker::makeMenuString ( const std::string &  entry)
protected

Definition at line 276 of file interactive_marker.cpp.

◆ populateMenu()

void rviz::InteractiveMarker::populateMenu ( QMenu *  menu,
std::vector< uint32_t > &  ids 
)
protected

Definition at line 250 of file interactive_marker.cpp.

◆ processMessage() [1/2]

bool rviz::InteractiveMarker::processMessage ( const visualization_msgs::InteractiveMarker &  message)

Definition at line 98 of file interactive_marker.cpp.

◆ processMessage() [2/2]

void rviz::InteractiveMarker::processMessage ( const visualization_msgs::InteractiveMarkerPose &  message)

Definition at line 78 of file interactive_marker.cpp.

◆ publishFeedback()

void rviz::InteractiveMarker::publishFeedback ( visualization_msgs::InteractiveMarkerFeedback &  feedback,
bool  mouse_point_valid = false,
const Ogre::Vector3 &  mouse_point_rel_world = Ogre::Vector3(0, 0, 0) 
)

Definition at line 646 of file interactive_marker.cpp.

◆ publishPose()

void rviz::InteractiveMarker::publishPose ( )
protected

Definition at line 386 of file interactive_marker.cpp.

◆ requestPoseUpdate()

void rviz::InteractiveMarker::requestPoseUpdate ( Ogre::Vector3  position,
Ogre::Quaternion  orientation 
)

Definition at line 396 of file interactive_marker.cpp.

◆ reset()

void rviz::InteractiveMarker::reset ( )
protected

◆ rotate()

void rviz::InteractiveMarker::rotate ( Ogre::Quaternion  delta_orientation,
const std::string &  control_name 
)

Definition at line 468 of file interactive_marker.cpp.

◆ setPose()

void rviz::InteractiveMarker::setPose ( Ogre::Vector3  position,
Ogre::Quaternion  orientation,
const std::string &  control_name 
)

Definition at line 412 of file interactive_marker.cpp.

◆ setShowAxes()

void rviz::InteractiveMarker::setShowAxes ( bool  show)

Definition at line 445 of file interactive_marker.cpp.

◆ setShowDescription()

void rviz::InteractiveMarker::setShowDescription ( bool  show)

Definition at line 436 of file interactive_marker.cpp.

◆ setShowVisualAids()

void rviz::InteractiveMarker::setShowVisualAids ( bool  show)

Definition at line 451 of file interactive_marker.cpp.

◆ showMenu()

void rviz::InteractiveMarker::showMenu ( ViewportMouseEvent event,
const std::string &  control_name,
const Ogre::Vector3 &  three_d_point,
bool  valid_point 
)

Pop up the context menu for this marker.

Parameters
eventA struct holding certain event data (see full description on InteractiveMarkerControl::handle3DCursorEvent)
control_nameThe name of the InteractiveMarkerControl that was selected.
three_d_pointThe world-relative position associated with this mouse-click or cursor event.
valid_pointTrue if three_d_point is valid (e.g. if the mouse ray was successfully intersected with marker geometry).

Definition at line 591 of file interactive_marker.cpp.

◆ startDragging()

void rviz::InteractiveMarker::startDragging ( )

Definition at line 474 of file interactive_marker.cpp.

◆ statusUpdate

void rviz::InteractiveMarker::statusUpdate ( StatusProperty::Level  level,
const std::string &  name,
const std::string &  text 
)
signal

◆ stopDragging()

void rviz::InteractiveMarker::stopDragging ( )

Definition at line 481 of file interactive_marker.cpp.

◆ translate()

void rviz::InteractiveMarker::translate ( Ogre::Vector3  delta_position,
const std::string &  control_name 
)

Definition at line 462 of file interactive_marker.cpp.

◆ update()

void rviz::InteractiveMarker::update ( float  wall_dt)

Definition at line 351 of file interactive_marker.cpp.

◆ updateReferencePose()

void rviz::InteractiveMarker::updateReferencePose ( )
protected

Definition at line 295 of file interactive_marker.cpp.

◆ userFeedback

void rviz::InteractiveMarker::userFeedback ( visualization_msgs::InteractiveMarkerFeedback &  feedback)
signal

Member Data Documentation

◆ axes_

Axes* rviz::InteractiveMarker::axes_
protected

Definition at line 261 of file interactive_marker.h.

◆ client_id_

std::string rviz::InteractiveMarker::client_id_
protected

Definition at line 266 of file interactive_marker.h.

◆ context_

DisplayContext* rviz::InteractiveMarker::context_
protected

Definition at line 204 of file interactive_marker.h.

◆ controls_

M_ControlPtr rviz::InteractiveMarker::controls_
protected

Definition at line 224 of file interactive_marker.h.

◆ description_

std::string rviz::InteractiveMarker::description_
protected

Definition at line 227 of file interactive_marker.h.

◆ description_control_

InteractiveMarkerControlPtr rviz::InteractiveMarker::description_control_
protected

Definition at line 263 of file interactive_marker.h.

◆ dragging_

bool rviz::InteractiveMarker::dragging_
protected

Definition at line 229 of file interactive_marker.h.

◆ frame_locked_

bool rviz::InteractiveMarker::frame_locked_
protected

Definition at line 209 of file interactive_marker.h.

◆ got_3d_point_for_menu_

bool rviz::InteractiveMarker::got_3d_point_for_menu_
protected

Definition at line 272 of file interactive_marker.h.

◆ has_menu_

bool rviz::InteractiveMarker::has_menu_
protected

Definition at line 239 of file interactive_marker.h.

◆ heart_beat_t_

double rviz::InteractiveMarker::heart_beat_t_
protected

Definition at line 257 of file interactive_marker.h.

◆ last_control_name_

std::string rviz::InteractiveMarker::last_control_name_
protected

Definition at line 255 of file interactive_marker.h.

◆ menu_

boost::shared_ptr<QMenu> rviz::InteractiveMarker::menu_
protected

Definition at line 238 of file interactive_marker.h.

◆ menu_entries_

std::map<uint32_t, MenuNode> rviz::InteractiveMarker::menu_entries_
protected

Definition at line 249 of file interactive_marker.h.

◆ mutex_

boost::recursive_mutex rviz::InteractiveMarker::mutex_
protected

Definition at line 268 of file interactive_marker.h.

◆ name_

std::string rviz::InteractiveMarker::name_
protected

Definition at line 226 of file interactive_marker.h.

◆ orientation_

Ogre::Quaternion rviz::InteractiveMarker::orientation_
protected

Definition at line 216 of file interactive_marker.h.

◆ pose_changed_

bool rviz::InteractiveMarker::pose_changed_
protected

Definition at line 219 of file interactive_marker.h.

◆ pose_update_requested_

bool rviz::InteractiveMarker::pose_update_requested_
protected

Definition at line 232 of file interactive_marker.h.

◆ position_

Ogre::Vector3 rviz::InteractiveMarker::position_
protected

Definition at line 215 of file interactive_marker.h.

◆ reference_frame_

std::string rviz::InteractiveMarker::reference_frame_
protected

Definition at line 207 of file interactive_marker.h.

◆ reference_node_

Ogre::SceneNode* rviz::InteractiveMarker::reference_node_
protected

Definition at line 212 of file interactive_marker.h.

◆ reference_time_

ros::Time rviz::InteractiveMarker::reference_time_
protected

Definition at line 208 of file interactive_marker.h.

◆ requested_orientation_

Ogre::Quaternion rviz::InteractiveMarker::requested_orientation_
protected

Definition at line 234 of file interactive_marker.h.

◆ requested_position_

Ogre::Vector3 rviz::InteractiveMarker::requested_position_
protected

Definition at line 233 of file interactive_marker.h.

◆ scale_

float rviz::InteractiveMarker::scale_
protected

Definition at line 236 of file interactive_marker.h.

◆ show_visual_aids_

bool rviz::InteractiveMarker::show_visual_aids_
protected

Definition at line 275 of file interactive_marker.h.

◆ sys_thread_

boost::shared_ptr<boost::thread> rviz::InteractiveMarker::sys_thread_
protected

Definition at line 270 of file interactive_marker.h.

◆ three_d_point_for_menu_

Ogre::Vector3 rviz::InteractiveMarker::three_d_point_for_menu_
protected

Definition at line 273 of file interactive_marker.h.

◆ time_since_last_feedback_

double rviz::InteractiveMarker::time_since_last_feedback_
protected

Definition at line 220 of file interactive_marker.h.

◆ top_level_menu_ids_

std::vector<uint32_t> rviz::InteractiveMarker::top_level_menu_ids_
protected

Definition at line 252 of file interactive_marker.h.

◆ topic_ns_

std::string rviz::InteractiveMarker::topic_ns_
protected

Definition at line 265 of file interactive_marker.h.


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


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Dec 13 2024 03:31:03