Displays Interactive Markers. More...
#include <interactive_marker_display.h>
Public Member Functions | |
virtual void | fixedFrameChanged () |
Called by setFixedFrame(). Override to respond to changes to fixed_frame_. | |
InteractiveMarkerDisplay () | |
virtual void | onInitialize () |
Override this function to do subclass-specific initialization. | |
virtual void | reset () |
Called to tell the display to clear its state. | |
virtual void | setTopic (const QString &topic, const QString &datatype) |
Set the ROS topic to listen to for this display. | |
virtual void | update (float wall_dt, float ros_dt) |
Called periodically by the visualization manager. | |
Protected Slots | |
void | onStatusUpdate (StatusProperty::Level level, const std::string &name, const std::string &text) |
void | publishFeedback (visualization_msgs::InteractiveMarkerFeedback &feedback) |
void | updateEnableTransparency () |
void | updateShowAxes () |
void | updateShowDescriptions () |
void | updateShowVisualAids () |
void | updateTopic () |
Protected Member Functions | |
virtual void | onDisable () |
Derived classes override this to do the actual work of disabling themselves. | |
virtual void | onEnable () |
Derived classes override this to do the actual work of enabling themselves. | |
Private Types | |
typedef boost::shared_ptr < InteractiveMarker > | IMPtr |
typedef std::map< std::string, IMPtr > | M_StringToIMPtr |
typedef std::map< std::string, M_StringToIMPtr > | M_StringToStringToIMPtr |
Private Member Functions | |
void | eraseMarkers (const std::string &server_id, const std::vector< std::string > &names) |
M_StringToIMPtr & | getImMap (std::string server_id) |
void | initCb (visualization_msgs::InteractiveMarkerInitConstPtr msg) |
void | processMarkerChanges (const std::vector< visualization_msgs::InteractiveMarker > *markers=NULL, const std::vector< visualization_msgs::InteractiveMarkerPose > *poses=NULL, const std::vector< std::string > *erases=NULL) |
void | resetCb (std::string server_id) |
void | statusCb (interactive_markers::InteractiveMarkerClient::StatusT, const std::string &server_id, const std::string &msg) |
void | subscribe () |
void | unsubscribe () |
void | updateCb (visualization_msgs::InteractiveMarkerUpdateConstPtr msg) |
void | updateMarkers (const std::string &server_id, const std::vector< visualization_msgs::InteractiveMarker > &markers) |
void | updatePoses (const std::string &server_id, const std::vector< visualization_msgs::InteractiveMarkerPose > &marker_poses) |
Private Attributes | |
std::string | client_id_ |
BoolProperty * | enable_transparency_property_ |
ros::Publisher | feedback_pub_ |
boost::shared_ptr < interactive_markers::InteractiveMarkerClient > | im_client_ |
M_StringToStringToIMPtr | interactive_markers_ |
RosTopicProperty * | marker_update_topic_property_ |
BoolProperty * | show_axes_property_ |
BoolProperty * | show_descriptions_property_ |
BoolProperty * | show_visual_aids_property_ |
std::string | topic_ns_ |
Displays Interactive Markers.
Definition at line 65 of file interactive_marker_display.h.
typedef boost::shared_ptr<InteractiveMarker> rviz::InteractiveMarkerDisplay::IMPtr [private] |
Definition at line 128 of file interactive_marker_display.h.
typedef std::map< std::string, IMPtr > rviz::InteractiveMarkerDisplay::M_StringToIMPtr [private] |
Definition at line 129 of file interactive_marker_display.h.
typedef std::map< std::string, M_StringToIMPtr > rviz::InteractiveMarkerDisplay::M_StringToStringToIMPtr [private] |
Definition at line 130 of file interactive_marker_display.h.
Definition at line 68 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::eraseMarkers | ( | const std::string & | server_id, |
const std::vector< std::string > & | names | ||
) | [private] |
Definition at line 248 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::fixedFrameChanged | ( | ) | [virtual] |
Called by setFixedFrame(). Override to respond to changes to fixed_frame_.
Reimplemented from rviz::Display.
Definition at line 319 of file interactive_marker_display.cpp.
InteractiveMarkerDisplay::M_StringToIMPtr & rviz::InteractiveMarkerDisplay::getImMap | ( | std::string | server_id | ) | [private] |
Definition at line 188 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::initCb | ( | visualization_msgs::InteractiveMarkerInitConstPtr | msg | ) | [private] |
Definition at line 292 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::onDisable | ( | ) | [protected, virtual] |
Derived classes override this to do the actual work of disabling themselves.
Reimplemented from rviz::Display.
Definition at line 117 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::onEnable | ( | ) | [protected, virtual] |
Derived classes override this to do the actual work of enabling themselves.
Reimplemented from rviz::Display.
Definition at line 112 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::onInitialize | ( | ) | [virtual] |
Override this function to do subclass-specific initialization.
This is called after vis_manager_ and scene_manager_ are set, and before load() or setEnabled().
setName() may or may not have been called before this.
Reimplemented from rviz::Display.
Definition at line 92 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::onStatusUpdate | ( | StatusProperty::Level | level, |
const std::string & | name, | ||
const std::string & | text | ||
) | [protected, slot] |
Definition at line 158 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::processMarkerChanges | ( | const std::vector< visualization_msgs::InteractiveMarker > * | markers = NULL , |
const std::vector< visualization_msgs::InteractiveMarkerPose > * | poses = NULL , |
||
const std::vector< std::string > * | erases = NULL |
||
) | [private] |
void rviz::InteractiveMarkerDisplay::publishFeedback | ( | visualization_msgs::InteractiveMarkerFeedback & | feedback | ) | [protected, slot] |
Definition at line 152 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::reset | ( | ) | [virtual] |
Called to tell the display to clear its state.
Reimplemented from rviz::Display.
Definition at line 326 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::resetCb | ( | std::string | server_id | ) | [private] |
Definition at line 305 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::setTopic | ( | const QString & | topic, |
const QString & | datatype | ||
) | [virtual] |
Set the ROS topic to listen to for this display.
By default, do nothing. Subclasses should override this method if they subscribe to a single ROS topic.
setTopic() is used by the "New display by topic" window; it is called with a user selected topic and its type.
topic | The published topic to be visualized. |
datatype | The datatype of the topic. |
Reimplemented from rviz::Display.
Definition at line 107 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::statusCb | ( | interactive_markers::InteractiveMarkerClient::StatusT | status, |
const std::string & | server_id, | ||
const std::string & | msg | ||
) | [private] |
Definition at line 311 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::subscribe | ( | ) | [private] |
Definition at line 141 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::unsubscribe | ( | ) | [private] |
Definition at line 163 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::update | ( | float | wall_dt, |
float | ros_dt | ||
) | [virtual] |
Called periodically by the visualization manager.
wall_dt | Wall-clock time, in seconds, since the last time the update list was run through. |
ros_dt | ROS time, in seconds, since the last time the update list was run through. |
Reimplemented from rviz::Display.
Definition at line 173 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::updateCb | ( | visualization_msgs::InteractiveMarkerUpdateConstPtr | msg | ) | [private] |
Definition at line 298 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::updateEnableTransparency | ( | ) | [protected, slot] |
Definition at line 378 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::updateMarkers | ( | const std::string & | server_id, |
const std::vector< visualization_msgs::InteractiveMarker > & | markers | ||
) | [private] |
Definition at line 200 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::updatePoses | ( | const std::string & | server_id, |
const std::vector< visualization_msgs::InteractiveMarkerPose > & | marker_poses | ||
) | [private] |
Definition at line 261 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::updateShowAxes | ( | ) | [protected, slot] |
Definition at line 348 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::updateShowDescriptions | ( | ) | [protected, slot] |
Definition at line 333 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::updateShowVisualAids | ( | ) | [protected, slot] |
Definition at line 363 of file interactive_marker_display.cpp.
void rviz::InteractiveMarkerDisplay::updateTopic | ( | ) | [protected, slot] |
Definition at line 122 of file interactive_marker_display.cpp.
std::string rviz::InteractiveMarkerDisplay::client_id_ [private] |
Definition at line 135 of file interactive_marker_display.h.
Definition at line 142 of file interactive_marker_display.h.
Definition at line 146 of file interactive_marker_display.h.
boost::shared_ptr<interactive_markers::InteractiveMarkerClient> rviz::InteractiveMarkerDisplay::im_client_ [private] |
Definition at line 144 of file interactive_marker_display.h.
Definition at line 131 of file interactive_marker_display.h.
Definition at line 138 of file interactive_marker_display.h.
Definition at line 140 of file interactive_marker_display.h.
Definition at line 139 of file interactive_marker_display.h.
Definition at line 141 of file interactive_marker_display.h.
std::string rviz::InteractiveMarkerDisplay::topic_ns_ [private] |
Definition at line 148 of file interactive_marker_display.h.