|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
41 #ifndef YARP_ROSMSG_visualization_msgs_InteractiveMarker_h
42 #define YARP_ROSMSG_visualization_msgs_InteractiveMarker_h
66 std::vector<yarp::rosmsg::visualization_msgs::MenuEntry>
menu_entries;
67 std::vector<yarp::rosmsg::visualization_msgs::InteractiveMarkerControl>
controls;
136 for (
int i=0; i<len; i++) {
145 for (
int i=0; i<len; i++) {
191 for (
int i=0; i<len; i++) {
203 for (
int i=0; i<len; i++) {
252 for (
size_t i=0; i<
controls.size(); i++) {
302 for (
size_t i=0; i<
controls.size(); i++) {
325 static constexpr
const char*
typeName =
"visualization_msgs/InteractiveMarker";
328 static constexpr
const char*
typeChecksum =
"dd86d22909d5a3364b384492e35c10af";
332 # Time/frame info.\n\
333 # If header.time is set to 0, the marker will be retransformed into\n\
334 # its frame on each timestep. You will receive the pose feedback\n\
335 # in the same frame.\n\
336 # Otherwise, you might receive feedback in a different frame.\n\
337 # For rviz, this will be the current 'fixed frame' set by the user.\n\
340 # Initial pose. Also, defines the pivot point for rotations.\n\
341 geometry_msgs/Pose pose\n\
343 # Identifying string. Must be globally unique in\n\
344 # the topic that this message is sent through.\n\
347 # Short description (< 40 characters).\n\
348 string description\n\
350 # Scale to be used for default controls (default=1).\n\
353 # All menu and submenu entries associated with this marker.\n\
354 MenuEntry[] menu_entries\n\
356 # List of controls displayed for this marker.\n\
357 InteractiveMarkerControl[] controls\n\
359 ================================================================================\n\
360 MSG: std_msgs/Header\n\
361 # Standard metadata for higher-level stamped data types.\n\
362 # This is generally used to communicate timestamped data \n\
363 # in a particular coordinate frame.\n\
365 # sequence ID: consecutively increasing ID \n\
367 #Two-integer timestamp that is expressed as:\n\
368 # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')\n\
369 # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')\n\
370 # time-handling sugar is provided by the client library\n\
372 #Frame this data is associated with\n\
377 ================================================================================\n\
378 MSG: geometry_msgs/Pose\n\
379 # A representation of pose in free space, composed of position and orientation. \n\
381 Quaternion orientation\n\
383 ================================================================================\n\
384 MSG: geometry_msgs/Point\n\
385 # This contains the position of a point in free space\n\
390 ================================================================================\n\
391 MSG: geometry_msgs/Quaternion\n\
392 # This represents an orientation in free space in quaternion form.\n\
399 ================================================================================\n\
400 MSG: visualization_msgs/MenuEntry\n\
401 # MenuEntry message.\n\
403 # Each InteractiveMarker message has an array of MenuEntry messages.\n\
404 # A collection of MenuEntries together describe a\n\
405 # menu/submenu/subsubmenu/etc tree, though they are stored in a flat\n\
406 # array. The tree structure is represented by giving each menu entry\n\
407 # an ID number and a \"parent_id\" field. Top-level entries are the\n\
408 # ones with parent_id = 0. Menu entries are ordered within their\n\
409 # level the same way they are ordered in the containing array. Parent\n\
410 # entries must appear before their children.\n\
418 # title = \"robot\"\n\
424 # title = \"turtle\"\n\
426 # Gives a menu tree like this:\n\
432 # ID is a number for each menu entry. Must be unique within the\n\
433 # control, and should never be 0.\n\
436 # ID of the parent of this menu entry, if it is a submenu. If this\n\
437 # menu entry is a top-level entry, set parent_id to 0.\n\
440 # menu / entry title\n\
443 # Arguments to command indicated by command_type (below)\n\
446 # Command_type stores the type of response desired when this menu\n\
447 # entry is clicked.\n\
448 # FEEDBACK: send an InteractiveMarkerFeedback message with menu_entry_id set to this entry's id.\n\
449 # ROSRUN: execute \"rosrun\" with arguments given in the command field (above).\n\
450 # ROSLAUNCH: execute \"roslaunch\" with arguments given in the command field (above).\n\
454 uint8 command_type\n\
456 ================================================================================\n\
457 MSG: visualization_msgs/InteractiveMarkerControl\n\
458 # Represents a control that is to be displayed together with an interactive marker\n\
460 # Identifying string for this control.\n\
461 # You need to assign a unique value to this to receive feedback from the GUI\n\
462 # on what actions the user performs on this control (e.g. a button click).\n\
466 # Defines the local coordinate frame (relative to the pose of the parent\n\
467 # interactive marker) in which is being rotated and translated.\n\
468 # Default: Identity\n\
469 geometry_msgs/Quaternion orientation\n\
472 # Orientation mode: controls how orientation changes.\n\
473 # INHERIT: Follow orientation of interactive marker\n\
474 # FIXED: Keep orientation fixed at initial state\n\
475 # VIEW_FACING: Align y-z plane with screen (x: forward, y:left, z:up).\n\
476 uint8 INHERIT = 0 \n\
478 uint8 VIEW_FACING = 2\n\
480 uint8 orientation_mode\n\
482 # Interaction mode for this control\n\
484 # NONE: This control is only meant for visualization; no context menu.\n\
485 # MENU: Like NONE, but right-click menu is active.\n\
486 # BUTTON: Element can be left-clicked.\n\
487 # MOVE_AXIS: Translate along local x-axis.\n\
488 # MOVE_PLANE: Translate in local y-z plane.\n\
489 # ROTATE_AXIS: Rotate around local x-axis.\n\
490 # MOVE_ROTATE: Combines MOVE_PLANE and ROTATE_AXIS.\n\
494 uint8 MOVE_AXIS = 3 \n\
495 uint8 MOVE_PLANE = 4\n\
496 uint8 ROTATE_AXIS = 5\n\
497 uint8 MOVE_ROTATE = 6\n\
498 # \"3D\" interaction modes work with the mouse+SHIFT+CTRL or with 3D cursors.\n\
499 # MOVE_3D: Translate freely in 3D space.\n\
500 # ROTATE_3D: Rotate freely in 3D space about the origin of parent frame.\n\
501 # MOVE_ROTATE_3D: Full 6-DOF freedom of translation and rotation about the cursor origin.\n\
503 uint8 ROTATE_3D = 8\n\
504 uint8 MOVE_ROTATE_3D = 9\n\
506 uint8 interaction_mode\n\
509 # If true, the contained markers will also be visible\n\
510 # when the gui is not in interactive mode.\n\
511 bool always_visible\n\
514 # Markers to be displayed as custom visual representation.\n\
515 # Leave this empty to use the default control handles.\n\
518 # - The markers can be defined in an arbitrary coordinate frame,\n\
519 # but will be transformed into the local frame of the interactive marker.\n\
520 # - If the header of a marker is empty, its pose will be interpreted as \n\
521 # relative to the pose of the parent interactive marker.\n\
525 # In VIEW_FACING mode, set this to true if you don't want the markers\n\
526 # to be aligned with the camera view point. The markers will show up\n\
527 # as in INHERIT mode.\n\
528 bool independent_marker_orientation\n\
531 # Short description (< 40 characters) of what this control does,\n\
532 # e.g. \"Move the robot\". \n\
533 # Default: A generic description based on the interaction mode\n\
534 string description\n\
536 ================================================================================\n\
537 MSG: visualization_msgs/Marker\n\
538 # See http://www.ros.org/wiki/rviz/DisplayTypes/Marker and http://www.ros.org/wiki/rviz/Tutorials/Markers%3A%20Basic%20Shapes for more information on using this message with rviz\n\
544 uint8 LINE_STRIP=4\n\
547 uint8 SPHERE_LIST=7\n\
549 uint8 TEXT_VIEW_FACING=9\n\
550 uint8 MESH_RESOURCE=10\n\
551 uint8 TRIANGLE_LIST=11\n\
558 Header header # header for time/frame information\n\
559 string ns # Namespace to place this object in... used in conjunction with id to create a unique name for the object\n\
560 int32 id # object ID useful in conjunction with the namespace for manipulating and deleting the object later\n\
561 int32 type # Type of object\n\
562 int32 action # 0 add/modify an object, 1 (deprecated), 2 deletes an object, 3 deletes all objects\n\
563 geometry_msgs/Pose pose # Pose of the object\n\
564 geometry_msgs/Vector3 scale # Scale of the object 1,1,1 means default (usually 1 meter square)\n\
565 std_msgs/ColorRGBA color # Color [0.0-1.0]\n\
566 duration lifetime # How long the object should last before being automatically deleted. 0 means forever\n\
567 bool frame_locked # If this marker should be frame-locked, i.e. retransformed into its frame every timestep\n\
569 #Only used if the type specified has some use for them (eg. POINTS, LINE_STRIP, ...)\n\
570 geometry_msgs/Point[] points\n\
571 #Only used if the type specified has some use for them (eg. POINTS, LINE_STRIP, ...)\n\
572 #number of colors must either be 0 or equal to the number of points\n\
573 #NOTE: alpha is not yet used\n\
574 std_msgs/ColorRGBA[] colors\n\
576 # NOTE: only used for text markers\n\
579 # NOTE: only used for MESH_RESOURCE markers\n\
580 string mesh_resource\n\
581 bool mesh_use_embedded_materials\n\
583 ================================================================================\n\
584 MSG: geometry_msgs/Vector3\n\
585 # This represents a vector in free space. \n\
586 # It is only meant to represent a direction. Therefore, it does not\n\
587 # make sense to apply a translation to it (e.g., when applying a \n\
588 # generic rigid transformation to a Vector3, tf2 will only apply the\n\
589 # rotation). If you want your data to be translatable too, use the\n\
590 # geometry_msgs/Point message instead.\n\
595 ================================================================================\n\
596 MSG: std_msgs/ColorRGBA\n\
616 #endif // YARP_ROSMSG_visualization_msgs_InteractiveMarker_h
virtual void appendFloat32(yarp::conf::float32_t data)=0
Send a representation of a 32-bit floating point number to the network connection.
bool readString(std::string &str, bool *is_vocab=nullptr)
yarp::os::idl::BareStyle< yarp::rosmsg::visualization_msgs::InteractiveMarker > rosStyle
yarp::conf::float32_t expectFloat32()
virtual bool read(yarp::os::idl::WireReader &reader)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
virtual bool isBareMode() const =0
Check if the connection is bare mode.
#define BOTTLE_TAG_STRING
static constexpr const char * typeText
bool readBottle(yarp::os::ConnectionReader &connection) override
virtual bool isError() const =0
#define BOTTLE_TAG_FLOAT32
static Type byName(const char *name)
virtual std::int32_t expectInt32()=0
Read a 32-bit integer from the network connection.
Type & addProperty(const char *key, const Value &val)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
An interface for writing to a network connection.
virtual bool isError() const =0
static constexpr const char * typeName
std::vector< yarp::rosmsg::visualization_msgs::MenuEntry > menu_entries
virtual bool convertTextMode()=0
Reads in a standard description in text mode, and converts it to a standard description in binary.
A "tamed" Portable, that promises to serialize itself in an IDL-friendly way.
virtual bool isBareMode() const =0
Check if the connection is bare mode.
yarp::conf::float32_t scale
virtual bool convertTextMode()=0
Converts a standard description in binary into a textual description, if the connection is in text-mo...
bool writeBare(yarp::os::ConnectionWriter &connection) const override
std::vector< yarp::rosmsg::visualization_msgs::InteractiveMarkerControl > controls
virtual void appendInt32(std::int32_t data)=0
Send a representation of a 32-bit integer to the network connection.
IDL-friendly connection reader.
An interface for reading from a network connection.
yarp::rosmsg::std_msgs::Header header
static constexpr const char * typeChecksum
yarp::rosmsg::geometry_msgs::Pose pose
The main, catch-all namespace for YARP.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readBare(yarp::os::ConnectionReader &connection) override
virtual yarp::conf::float32_t expectFloat32()=0
Read a 32-bit floating point number from the network connection.
bool writeBottle(yarp::os::ConnectionWriter &connection) const override
virtual void appendExternalBlock(const char *data, size_t len)=0
Send a block of data to the network connection, without making a copy.
virtual bool expectBlock(char *data, size_t len)=0
Read a block of data from the network connection.
A single value (typically within a Bottle).
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
yarp::os::idl::BottleStyle< yarp::rosmsg::visualization_msgs::InteractiveMarker > bottleStyle
yarp::os::Type getType() const override
virtual bool write(const yarp::os::idl::WireWriter &writer) const