Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
rviz_visual_tools::RvizVisualTools Class Reference

#include <rviz_visual_tools.h>

Public Member Functions

std_msgs::ColorRGBA createRandColor () const
 Create a random color that is not too light. More...
 
bool deleteAllMarkers ()
 Tell Rviz to clear all markers on a particular display. More...
 
void enableBatchPublishing (bool enable=true)
 Enable batch publishing - useful for when many markers need to be published at once and the ROS topic can get overloaded. This collects all published markers into array and only publishes them with trigger() is called. More...
 
void enableFrameLocking (bool enable=true)
 Enable frame locking - useful for when the markers is attached to a moving TF, the marker will be re-transformed into its frame every time-step. More...
 
const std::string getBaseFrame () const
 Get the base frame. More...
 
Eigen::Vector3d getCenterPoint (const Eigen::Vector3d &a, const Eigen::Vector3d &b) const
 Find the center between to points. More...
 
std_msgs::ColorRGBA getColor (colors color) const
 Get the RGB value of standard colors. More...
 
std_msgs::ColorRGBA getColorScale (double value) const
 Convert a value from [0,1] to a color Green->Red. More...
 
double getGlobalScale () const
 Getter for the global scale used for changing size of all markers. More...
 
bool getPsychedelicMode () const
 Getter for PsychedelicMode. More...
 
RemoteControlPtrgetRemoteControl ()
 Ability to load remote control on the fly. More...
 
geometry_msgs::Vector3 getScale (scales scale, double marker_scale=1.0) const
 Get the rviz marker scale of standard sizes. More...
 
Eigen::Affine3d getVectorBetweenPoints (const Eigen::Vector3d &a, const Eigen::Vector3d &b) const
 Create a vector that points from point a to point b. More...
 
void loadMarkerPub (bool wait_for_subscriber=false, bool latched=false)
 Load publishers as needed. More...
 
void loadRemoteControl ()
 Pre-load remote control. More...
 
bool loadRvizMarkers ()
 Pre-load rviz markers for better efficiency. More...
 
void prompt (const std::string &msg)
 Wait for user feedback i.e. through a button or joystick. More...
 
bool publishArrow (const Eigen::Affine3d &pose, colors color=BLUE, scales scale=MEDIUM, double length=0.0, std::size_t id=0)
 Display an arrow along the x-axis of a pose. More...
 
bool publishArrow (const geometry_msgs::Pose &pose, colors color=BLUE, scales scale=MEDIUM, double length=0.0, std::size_t id=0)
 
bool publishArrow (const geometry_msgs::PoseStamped &pose, colors color=BLUE, scales scale=MEDIUM, double length=0.0, std::size_t id=0)
 
bool publishArrow (const geometry_msgs::Point &start, const geometry_msgs::Point &end, colors color=BLUE, scales scale=MEDIUM, std::size_t id=0)
 
bool publishAxis (const geometry_msgs::Pose &pose, scales scale=MEDIUM, const std::string &ns="Axis")
 Display a red/green/blue coordinate frame axis. More...
 
bool publishAxis (const Eigen::Affine3d &pose, scales scale=MEDIUM, const std::string &ns="Axis")
 
bool publishAxis (const geometry_msgs::Pose &pose, double length, double radius=0.01, const std::string &ns="Axis")
 
bool publishAxis (const Eigen::Affine3d &pose, double length, double radius=0.01, const std::string &ns="Axis")
 
bool publishAxisLabeled (const Eigen::Affine3d &pose, const std::string &label, scales scale=MEDIUM, colors color=WHITE)
 Display a marker of a coordinate frame axis with a text label describing it. More...
 
bool publishAxisLabeled (const geometry_msgs::Pose &pose, const std::string &label, scales scale=MEDIUM, colors color=WHITE)
 
bool publishAxisPath (const EigenSTL::vector_Affine3d &path, scales scale=MEDIUM, const std::string &ns="Axis Path")
 Display a series of red/green/blue coordinate axis along a path. More...
 
bool publishAxisPath (const EigenSTL::vector_Affine3d &path, double length=0.1, double radius=0.01, const std::string &ns="Axis Path")
 
bool publishCone (const Eigen::Affine3d &pose, double angle, colors color=TRANSLUCENT, double scale=1.0)
 Display a cone of a given angle along the x-axis. More...
 
bool publishCone (const geometry_msgs::Pose &pose, double angle, colors color=TRANSLUCENT, double scale=1.0)
 
bool publishCuboid (const Eigen::Vector3d &point1, const Eigen::Vector3d &point2, colors color=BLUE)
 Display a rectangular cuboid. More...
 
bool publishCuboid (const geometry_msgs::Point &point1, const geometry_msgs::Point &point2, colors color=BLUE, const std::string &ns="Cuboid", std::size_t id=0)
 
bool publishCuboid (const geometry_msgs::Pose &pose, double depth, double width, double height, colors color=BLUE)
 Display a rectangular cuboid. More...
 
bool publishCuboid (const Eigen::Affine3d &pose, double depth, double width, double height, colors color=BLUE)
 
bool publishCylinder (const Eigen::Vector3d &point1, const Eigen::Vector3d &point2, colors color=BLUE, scales scale=MEDIUM, const std::string &ns="Cylinder")
 Display a marker of a cylinder. More...
 
bool publishCylinder (const Eigen::Vector3d &point1, const Eigen::Vector3d &point2, colors color, double radius=0.01, const std::string &ns="Cylinder")
 
bool publishCylinder (const Eigen::Vector3d &point1, const Eigen::Vector3d &point2, const std_msgs::ColorRGBA &color, double radius=0.01, const std::string &ns="Cylinder")
 
bool publishCylinder (const Eigen::Affine3d &pose, colors color=BLUE, double height=0.1, double radius=0.01, const std::string &ns="Cylinder")
 Display a marker of a cylinder. More...
 
bool publishCylinder (const geometry_msgs::Pose &pose, colors color=BLUE, double height=0.1, double radius=0.01, const std::string &ns="Cylinder")
 
bool publishCylinder (const geometry_msgs::Pose &pose, const std_msgs::ColorRGBA &color, double height=0.1, double radius=0.01, const std::string &ns="Cylinder")
 
bool publishGraph (const graph_msgs::GeometryGraph &graph, colors color, double radius)
 Display a graph. More...
 
bool publishLine (const Eigen::Affine3d &point1, const Eigen::Affine3d &point2, colors color=BLUE, scales scale=MEDIUM)
 Display a marker of line. More...
 
bool publishLine (const Eigen::Vector3d &point1, const Eigen::Vector3d &point2, colors color=BLUE, scales scale=MEDIUM)
 
bool publishLine (const Eigen::Vector3d &point1, const Eigen::Vector3d &point2, colors color, double radius)
 
bool publishLine (const Eigen::Vector3d &point1, const Eigen::Vector3d &point2, const std_msgs::ColorRGBA &color, scales scale=MEDIUM)
 
bool publishLine (const Eigen::Vector3d &point1, const Eigen::Vector3d &point2, const std_msgs::ColorRGBA &color, double radius)
 
bool publishLine (const geometry_msgs::Point &point1, const geometry_msgs::Point &point2, colors color=BLUE, scales scale=MEDIUM)
 
bool publishLine (const geometry_msgs::Point &point1, const geometry_msgs::Point &point2, const std_msgs::ColorRGBA &color, scales scale=MEDIUM)
 
bool publishLine (const geometry_msgs::Point &point1, const geometry_msgs::Point &point2, const std_msgs::ColorRGBA &color, const geometry_msgs::Vector3 &scale)
 
bool publishLines (const EigenSTL::vector_Vector3d &aPoints, const EigenSTL::vector_Vector3d &bPoints, const std::vector< colors > &colors, scales scale=MEDIUM)
 Display a marker of lines. More...
 
bool publishLines (const std::vector< geometry_msgs::Point > &aPoints, const std::vector< geometry_msgs::Point > &bPoints, const std::vector< std_msgs::ColorRGBA > &colors, const geometry_msgs::Vector3 &scale)
 
bool publishLineStrip (const std::vector< geometry_msgs::Point > &path, colors color=RED, scales scale=MEDIUM, const std::string &ns="Path")
 Display a series of connected lines using the LINE_STRIP method - deprecated because visual bugs. More...
 
bool publishMarker (visualization_msgs::Marker &marker)
 Display a visualization_msgs Marker of a custom type. Allows reuse of the ros publisher. More...
 
bool publishMarkers (visualization_msgs::MarkerArray &markers)
 Display an array of markers, allows reuse of the ROS publisher. More...
 
bool publishMesh (const Eigen::Affine3d &pose, const std::string &file_name, colors color=CLEAR, double scale=1, const std::string &ns="mesh", std::size_t id=0)
 Display a mesh from file. More...
 
bool publishMesh (const geometry_msgs::Pose &pose, const std::string &file_name, colors color=CLEAR, double scale=1, const std::string &ns="mesh", std::size_t id=0)
 
bool publishPath (const std::vector< geometry_msgs::Pose > &path, colors color=RED, scales scale=MEDIUM, const std::string &ns="Path")
 Display a marker of a series of connected cylinders. More...
 
bool publishPath (const std::vector< geometry_msgs::Point > &path, colors color=RED, scales scale=MEDIUM, const std::string &ns="Path")
 
bool publishPath (const EigenSTL::vector_Affine3d &path, colors color=RED, scales scale=MEDIUM, const std::string &ns="Path")
 
bool publishPath (const EigenSTL::vector_Vector3d &path, colors color=RED, scales scale=MEDIUM, const std::string &ns="Path")
 
bool publishPath (const std::vector< geometry_msgs::Point > &path, colors color=RED, double radius=0.01, const std::string &ns="Path")
 
bool publishPath (const EigenSTL::vector_Vector3d &path, colors color=RED, double radius=0.01, const std::string &ns="Path")
 
bool publishPath (const EigenSTL::vector_Affine3d &path, colors color=RED, double radius=0.01, const std::string &ns="Path")
 
bool publishPath (const EigenSTL::vector_Vector3d &path, const std::vector< colors > &colors, double radius=0.01, const std::string &ns="Path")
 Display a marker of a series of connected colored cylinders. More...
 
bool publishPath (const EigenSTL::vector_Vector3d &path, const std::vector< std_msgs::ColorRGBA > &colors, double radius, const std::string &ns="Path")
 
bool publishPolygon (const geometry_msgs::Polygon &polygon, colors color=RED, scales scale=MEDIUM, const std::string &ns="Polygon")
 Display a marker of a polygon. More...
 
bool publishSphere (const Eigen::Affine3d &pose, colors color=BLUE, scales scale=MEDIUM, const std::string &ns="Sphere", std::size_t id=0)
 Display a marker of a sphere. More...
 
bool publishSphere (const Eigen::Vector3d &point, colors color=BLUE, scales scale=MEDIUM, const std::string &ns="Sphere", std::size_t id=0)
 
bool publishSphere (const Eigen::Vector3d &point, colors color, double scale, const std::string &ns="Sphere", std::size_t id=0)
 
bool publishSphere (const geometry_msgs::Point &point, colors color=BLUE, scales scale=MEDIUM, const std::string &ns="Sphere", std::size_t id=0)
 
bool publishSphere (const geometry_msgs::Pose &pose, colors color=BLUE, scales scale=MEDIUM, const std::string &ns="Sphere", std::size_t id=0)
 
bool publishSphere (const geometry_msgs::Pose &pose, colors color, double scale, const std::string &ns="Sphere", std::size_t id=0)
 
bool publishSphere (const geometry_msgs::Pose &pose, colors color, const geometry_msgs::Vector3 scale, const std::string &ns="Sphere", std::size_t id=0)
 
bool publishSphere (const geometry_msgs::Pose &pose, const std_msgs::ColorRGBA &color, const geometry_msgs::Vector3 scale, const std::string &ns="Sphere", std::size_t id=0)
 
bool publishSphere (const Eigen::Affine3d &pose, const std_msgs::ColorRGBA &color, const geometry_msgs::Vector3 scale, const std::string &ns="Sphere", std::size_t id=0)
 
bool publishSphere (const Eigen::Vector3d &point, const std_msgs::ColorRGBA &color, const geometry_msgs::Vector3 scale, const std::string &ns="Sphere", std::size_t id=0)
 
bool publishSphere (const geometry_msgs::PoseStamped &pose, colors color, const geometry_msgs::Vector3 scale, const std::string &ns="Sphere", std::size_t id=0)
 
bool publishSpheres (const EigenSTL::vector_Vector3d &points, colors color=BLUE, scales scale=MEDIUM, const std::string &ns="Spheres")
 Display a marker of a series of spheres. More...
 
bool publishSpheres (const EigenSTL::vector_Vector3d &points, colors color, double scale=0.1, const std::string &ns="Spheres")
 
bool publishSpheres (const std::vector< geometry_msgs::Point > &points, colors color=BLUE, scales scale=MEDIUM, const std::string &ns="Spheres")
 
bool publishSpheres (const std::vector< geometry_msgs::Point > &points, colors color=BLUE, double scale=0.1, const std::string &ns="Spheres")
 
bool publishSpheres (const std::vector< geometry_msgs::Point > &points, colors color, const geometry_msgs::Vector3 &scale, const std::string &ns="Spheres")
 
bool publishSpheres (const EigenSTL::vector_Vector3d &points, const std::vector< colors > &colors, scales scale=MEDIUM, const std::string &ns="Spheres")
 Display a marker of a series of spheres, with the possibility of different colors. More...
 
bool publishSpheres (const std::vector< geometry_msgs::Point > &points, const std::vector< std_msgs::ColorRGBA > &colors, const geometry_msgs::Vector3 &scale, const std::string &ns="Spheres")
 
bool publishText (const Eigen::Affine3d &pose, const std::string &text, colors color=WHITE, scales scale=MEDIUM, bool static_id=true)
 Display a marker of a text. More...
 
bool publishText (const Eigen::Affine3d &pose, const std::string &text, colors color, const geometry_msgs::Vector3 scale, bool static_id=true)
 
bool publishText (const geometry_msgs::Pose &pose, const std::string &text, colors color=WHITE, scales scale=MEDIUM, bool static_id=true)
 
bool publishText (const geometry_msgs::Pose &pose, const std::string &text, colors color, const geometry_msgs::Vector3 scale, bool static_id=true)
 
bool publishWireframeCuboid (const Eigen::Affine3d &pose, double depth, double width, double height, colors color=BLUE, const std::string &ns="Wireframe Cuboid", std::size_t id=0)
 Publish transformed wireframe cuboid. Useful eg to show an oriented bounding box. More...
 
bool publishWireframeCuboid (const Eigen::Affine3d &pose, const Eigen::Vector3d &min_point, const Eigen::Vector3d &max_point, colors color=BLUE, const std::string &ns="Wireframe Cuboid", std::size_t id=0)
 Publish transformed wireframe cuboid. Useful eg to show an oriented bounding box. More...
 
bool publishWireframeRectangle (const Eigen::Affine3d &pose, double height, double width, colors color=BLUE, scales scale=MEDIUM, std::size_t id=0)
 Publish outline of a rectangle. More...
 
bool publishWireframeRectangle (const Eigen::Affine3d &pose, const Eigen::Vector3d &p1_in, const Eigen::Vector3d &p2_in, const Eigen::Vector3d &p3_in, const Eigen::Vector3d &p4_in, colors color, scales scale)
 
bool publishXArrow (const Eigen::Affine3d &pose, colors color=RED, scales scale=MEDIUM, double length=0.0)
 Display an arrow along the x-axis of a pose. More...
 
bool publishXArrow (const geometry_msgs::Pose &pose, colors color=RED, scales scale=MEDIUM, double length=0.0)
 
bool publishXArrow (const geometry_msgs::PoseStamped &pose, colors color=RED, scales scale=MEDIUM, double length=0.0)
 
bool publishXYPlane (const Eigen::Affine3d &pose, colors color=TRANSLUCENT, double scale=1.0)
 Display the XY plane of a given pose. More...
 
bool publishXYPlane (const geometry_msgs::Pose &pose, colors color=TRANSLUCENT, double scale=1.0)
 
bool publishXZPlane (const Eigen::Affine3d &pose, colors color=TRANSLUCENT, double scale=1.0)
 Display the XY plane of a given pose. More...
 
bool publishXZPlane (const geometry_msgs::Pose &pose, colors color=TRANSLUCENT, double scale=1.0)
 
bool publishYArrow (const Eigen::Affine3d &pose, colors color=GREEN, scales scale=MEDIUM, double length=0.0)
 Display an arrow along the y-axis of a pose. More...
 
bool publishYArrow (const geometry_msgs::Pose &pose, colors color=GREEN, scales scale=MEDIUM, double length=0.0)
 
bool publishYArrow (const geometry_msgs::PoseStamped &pose, colors color=GREEN, scales scale=MEDIUM, double length=0.0)
 
bool publishYZPlane (const Eigen::Affine3d &pose, colors color=TRANSLUCENT, double scale=1.0)
 Display the XY plane of a given pose. More...
 
bool publishYZPlane (const geometry_msgs::Pose &pose, colors color=TRANSLUCENT, double scale=1.0)
 
bool publishZArrow (const Eigen::Affine3d &pose, colors color=BLUE, scales scale=MEDIUM, double length=0.0, std::size_t id=0)
 Display an arrow along the z-axis of a pose. More...
 
bool publishZArrow (const geometry_msgs::Pose &pose, colors color=BLUE, scales scale=MEDIUM, double length=0.0)
 
bool publishZArrow (const geometry_msgs::PoseStamped &pose, colors color=BLUE, scales scale=MEDIUM, double length=0.0)
 
bool publishZArrow (const geometry_msgs::PoseStamped &pose, colors color=BLUE, scales scale=MEDIUM, double length=0.0, std::size_t id=0)
 
void resetMarkerCounts ()
 Reset the id's of all published markers so that they overwrite themselves in the future NOTE you may prefer deleteAllMarkers() More...
 
 RvizVisualTools (std::string base_frame, std::string marker_topic=RVIZ_MARKER_TOPIC, ros::NodeHandle nh=ros::NodeHandle("~"))
 Constructor. More...
 
void setAlpha (double alpha)
 Change the transparency of all markers published. More...
 
void setBaseFrame (const std::string &base_frame)
 Change the global base frame Note: this might reset all your current markers. More...
 
void setGlobalScale (double global_scale)
 Setter for the global scale used for changing size of all markers. More...
 
void setLifetime (double lifetime)
 Set the lifetime of markers published to rviz. More...
 
void setMarkerTopic (const std::string &topic)
 Set marker array topic. More...
 
void setPsychedelicMode (bool psychedelic_mode=true)
 Setter for PsychedelicMode. More...
 
bool trigger ()
 
RVIZ_VISUAL_TOOLS_DEPRECATED bool triggerAndDisable ()
 Trigger the publish function to send out all collected markers. Also then turns off the batch mode. This is safer incase programmer forgets. More...
 
RVIZ_VISUAL_TOOLS_DEPRECATED bool triggerBatchPublish ()
 Trigger the publish function to send out all collected markers. More...
 
bool triggerEvery (std::size_t queueSize)
 Trigger the publish function to send out all collected markers IF there are at leats queueSize number of markers ready to be published. a * Warning: when using this in a loop be sure to call trigger() at end of loop in case there are any remainder markers in the queue. More...
 
void waitForMarkerPub ()
 Optional blocking function to call after calling loadMarkerPub(). Allows you to do some intermediate processing before wasting cycles waiting for the marker pub to find a subscriber. More...
 
void waitForMarkerPub (double wait_time)
 
bool waitForSubscriber (const ros::Publisher &pub, double wait_time=0.5, bool blocking=false)
 Wait until at least one subscriber connects to a publisher. More...
 
 ~RvizVisualTools ()
 Deconstructor. More...
 

Static Public Member Functions

static RVIZ_VISUAL_TOOLS_DEPRECATED Eigen::Affine3d convertFromXYZRPY (double x, double y, double z, double roll, double pitch, double yaw)
 Convert a 6-vector of x,y,z, roll,pitch,yall to an Affine3d with quaternion using Euler R-P-Y / X-Y-Z / 0-1-2 Euler Angle Standard. More...
 
static RVIZ_VISUAL_TOOLS_DEPRECATED Eigen::Affine3d convertFromXYZRPY (const std::vector< double > &transform6)
 
static Eigen::Affine3d convertFromXYZRPY (double tx, double ty, double tz, double rx, double ry, double rz, EulerConvention convention)
 Converts scalar translations and rotations to an Eigen Frame. This is achieved by chaining a translation with individual euler rotations in ZYX order (this is equivalent to fixed rotatins XYZ) http://en.wikipedia.org/wiki/Euler_angles#Conversion_between_intrinsic_and_extrinsic_rotations Euler conversion code sourced from Descartes, Copyright (c) 2014, Southwest Research Institute. More...
 
static Eigen::Affine3d convertFromXYZRPY (const std::vector< double > &transform6, EulerConvention convention)
 
static Eigen::Vector3d convertPoint (const geometry_msgs::Point &point)
 Convert a geometry_msg point to an Eigen point Note: Not thread safe but very convenient. More...
 
static geometry_msgs::Point convertPoint (const geometry_msgs::Vector3 &point)
 Convert a Vector3 to a geometry_msg Point Note: Not thread safe but very convenient. More...
 
static geometry_msgs::Point convertPoint (const Eigen::Vector3d &point)
 Convert a Eigen point to a geometry_msg Point Note: Not thread safe but very convenient. More...
 
static Eigen::Vector3d convertPoint32 (const geometry_msgs::Point32 &point)
 Convert a geometry_msg point to an Eigen point Note: Not thread safe but very convenient. More...
 
static geometry_msgs::Point32 convertPoint32 (const Eigen::Vector3d &point)
 Convert an Eigen point to a 32 bit geometry_msg point Note: Not thread safe but very convenient. More...
 
static Eigen::Affine3d convertPoint32ToPose (const geometry_msgs::Point32 &point)
 Convert a geometry_msg point (32bit) to an Eigen pose Note: Not thread safe but very convenient. More...
 
static geometry_msgs::Pose convertPointToPose (const geometry_msgs::Point &point)
 Add an identity rotation matrix to make a point have a full pose. More...
 
static Eigen::Affine3d convertPointToPose (const Eigen::Vector3d &point)
 
static geometry_msgs::Pose convertPose (const Eigen::Affine3d &pose)
 Convert an Eigen pose to a geometry_msg pose. More...
 
static Eigen::Affine3d convertPose (const geometry_msgs::Pose &pose)
 Convert a geometry_msg pose to an Eigen pose Note: Not thread safe but very convenient. More...
 
static void convertPoseSafe (const Eigen::Affine3d &pose, geometry_msgs::Pose &pose_msg)
 Convert an Eigen pose to a geometry_msg pose - thread safe. More...
 
static void convertPoseSafe (const geometry_msgs::Pose &pose_msg, Eigen::Affine3d &pose)
 Convert a geometry_msg pose to an Eigen pose - thread safe. More...
 
static geometry_msgs::Point convertPoseToPoint (const Eigen::Affine3d &pose)
 Convert an Eigen pose to a geometry_msg point Note: Not thread safe but very convenient. More...
 
static void convertToXYZRPY (const Eigen::Affine3d &pose, std::vector< double > &xyzrpy)
 Convert an affine3d to xyz rpy components R-P-Y / X-Y-Z / 0-1-2 Euler Angle Standard. More...
 
static void convertToXYZRPY (const Eigen::Affine3d &pose, double &x, double &y, double &z, double &roll, double &pitch, double &yaw)
 
static double dRand (double min, double max)
 Get random between min and max. More...
 
static float fRand (float min, float max)
 
static void generateEmptyPose (geometry_msgs::Pose &pose)
 Create a pose of position (0,0,0) and quaternion (0,0,0,1) More...
 
static void generateRandomCuboid (geometry_msgs::Pose &cuboid_pose, double &depth, double &width, double &height, RandomPoseBounds pose_bounds=RandomPoseBounds(), RandomCuboidBounds cuboid_bounds=RandomCuboidBounds())
 Create a random rectangular cuboid of some shape. More...
 
static void generateRandomPose (geometry_msgs::Pose &pose, RandomPoseBounds pose_bounds=RandomPoseBounds())
 Create a random pose within bounds of random_pose_bounds_. More...
 
static void generateRandomPose (Eigen::Affine3d &pose, RandomPoseBounds pose_bounds=RandomPoseBounds())
 
static colors getRandColor ()
 Get a random color from the list of hardcoded enum color types. More...
 
static colors intToRvizColor (std::size_t color)
 Used by interfaces that do not directly depend on Rviz Visual Tools, such as OMPL. More...
 
static rviz_visual_tools::scales intToRvizScale (std::size_t scale)
 Used by interfaces that do not directly depend on Rviz Visual Tools, such as OMPL. More...
 
static int iRand (int min, int max)
 
static bool posesEqual (const Eigen::Affine3d &pose1, const Eigen::Affine3d &pose2, double threshold=0.000001)
 Test if two Eigen poses are close enough. More...
 
static void printTransform (const Eigen::Affine3d &transform)
 Display in the console a transform in quaternions. More...
 
static void printTransformFull (const Eigen::Affine3d &transform)
 Display in the console a transform with full 3x3 rotation matrix. More...
 
static void printTransformRPY (const Eigen::Affine3d &transform)
 Display in the console a transform in roll pitch yaw. More...
 
static void printTranslation (const Eigen::Vector3d &translation)
 Display in the console the x,y,z values of a point. More...
 
static std::string scaleToString (scales scale)
 Convert an enum to its string name equivalent. More...
 
static double slerp (double start, double end, double range, double value)
 Interpolate from [start, end] with value of size steps with current value count. More...
 

Protected Attributes

double alpha_ = 1.0
 
visualization_msgs::Marker arrow_marker_
 
std::string base_frame_
 
bool batch_publishing_enabled_ = true
 
visualization_msgs::Marker block_marker_
 
visualization_msgs::Marker cuboid_marker_
 
visualization_msgs::Marker cylinder_marker_
 
bool frame_locking_enabled_ = false
 
double global_scale_ = 1.0
 
visualization_msgs::Marker line_list_marker_
 
visualization_msgs::Marker line_strip_marker_
 
ros::Duration marker_lifetime_
 
std::string marker_topic_
 
visualization_msgs::MarkerArray markers_
 
visualization_msgs::Marker mesh_marker_
 
ros::NodeHandle nh_
 
bool psychedelic_mode_ = false
 
ros::Publisher pub_rviz_markers_
 
bool pub_rviz_markers_connected_ = false
 
bool pub_rviz_markers_waited_ = false
 
RemoteControlPtr remote_control_
 
visualization_msgs::Marker reset_marker_
 
visualization_msgs::Marker sphere_marker_
 
visualization_msgs::Marker spheres_marker_
 
visualization_msgs::Marker text_marker_
 
visualization_msgs::Marker triangle_marker_
 

Static Protected Attributes

static const std::array< colors, 14 > all_rand_colors_
 
static const std::string name_ = "visual_tools"
 

Private Member Functions

void initialize ()
 Shared function for initilization by constructors. More...
 
bool publishAxisInternal (const Eigen::Affine3d &pose, double length=0.1, double radius=0.01, const std::string &ns="Axis")
 Display a red/green/blue coordinate axis - the 'internal' version does not do a batch publish. More...
 

Detailed Description

Definition at line 173 of file rviz_visual_tools.h.

Constructor & Destructor Documentation

rviz_visual_tools::RvizVisualTools::RvizVisualTools ( std::string  base_frame,
std::string  marker_topic = RVIZ_MARKER_TOPIC,
ros::NodeHandle  nh = ros::NodeHandle("~") 
)
explicit

Constructor.

Parameters
base_frame- common base for all visualization markers, usually "/world" or "/odom"
marker_topic- rostopic to publish markers to - your Rviz display should match
nh- optional ros node handle - defaults to "~"

Definition at line 60 of file rviz_visual_tools.cpp.

rviz_visual_tools::RvizVisualTools::~RvizVisualTools ( )
inline

Deconstructor.

Definition at line 192 of file rviz_visual_tools.h.

Member Function Documentation

Eigen::Affine3d rviz_visual_tools::RvizVisualTools::convertFromXYZRPY ( double  x,
double  y,
double  z,
double  roll,
double  pitch,
double  yaw 
)
static

Convert a 6-vector of x,y,z, roll,pitch,yall to an Affine3d with quaternion using Euler R-P-Y / X-Y-Z / 0-1-2 Euler Angle Standard.

Returns
4x4 matrix in form of affine3d Use new function (below) instead, that specifies what type of convention. The drop in replacement for this function is: convertFromXYZRPY(x, y, z, roll, pitch, yaw, rviz_visual_tools::XYZ);

Definition at line 2559 of file rviz_visual_tools.cpp.

Eigen::Affine3d rviz_visual_tools::RvizVisualTools::convertFromXYZRPY ( const std::vector< double > &  transform6)
static

Definition at line 2554 of file rviz_visual_tools.cpp.

Eigen::Affine3d rviz_visual_tools::RvizVisualTools::convertFromXYZRPY ( double  tx,
double  ty,
double  tz,
double  rx,
double  ry,
double  rz,
EulerConvention  convention 
)
static

Converts scalar translations and rotations to an Eigen Frame. This is achieved by chaining a translation with individual euler rotations in ZYX order (this is equivalent to fixed rotatins XYZ) http://en.wikipedia.org/wiki/Euler_angles#Conversion_between_intrinsic_and_extrinsic_rotations Euler conversion code sourced from Descartes, Copyright (c) 2014, Southwest Research Institute.

Parameters
tx,ty,tz- translations in x, y, z respectively
rx,ry,rz- rotations about x, y, z, respectively
convention- default is rviz_visual_tools::XYZ

Definition at line 2570 of file rviz_visual_tools.cpp.

Eigen::Affine3d rviz_visual_tools::RvizVisualTools::convertFromXYZRPY ( const std::vector< double > &  transform6,
EulerConvention  convention 
)
static

Definition at line 2600 of file rviz_visual_tools.cpp.

Eigen::Vector3d rviz_visual_tools::RvizVisualTools::convertPoint ( const geometry_msgs::Point point)
static

Convert a geometry_msg point to an Eigen point Note: Not thread safe but very convenient.

Parameters
point
Returns
converted pose

Definition at line 2509 of file rviz_visual_tools.cpp.

geometry_msgs::Point rviz_visual_tools::RvizVisualTools::convertPoint ( const geometry_msgs::Vector3 point)
static

Convert a Vector3 to a geometry_msg Point Note: Not thread safe but very convenient.

Parameters
point
Returns
converted point

Definition at line 2536 of file rviz_visual_tools.cpp.

geometry_msgs::Point rviz_visual_tools::RvizVisualTools::convertPoint ( const Eigen::Vector3d &  point)
static

Convert a Eigen point to a geometry_msg Point Note: Not thread safe but very convenient.

Parameters
point
Returns
converted point

Definition at line 2545 of file rviz_visual_tools.cpp.

Eigen::Vector3d rviz_visual_tools::RvizVisualTools::convertPoint32 ( const geometry_msgs::Point32 &  point)
static

Convert a geometry_msg point to an Eigen point Note: Not thread safe but very convenient.

Parameters
point
Returns
converted pose

Definition at line 2518 of file rviz_visual_tools.cpp.

geometry_msgs::Point32 rviz_visual_tools::RvizVisualTools::convertPoint32 ( const Eigen::Vector3d &  point)
static

Convert an Eigen point to a 32 bit geometry_msg point Note: Not thread safe but very convenient.

Parameters
point
Returns
converted pose

Definition at line 2527 of file rviz_visual_tools.cpp.

Eigen::Affine3d rviz_visual_tools::RvizVisualTools::convertPoint32ToPose ( const geometry_msgs::Point32 &  point)
static

Convert a geometry_msg point (32bit) to an Eigen pose Note: Not thread safe but very convenient.

Parameters
pose
Returns
converted point with default rotation matrix

Definition at line 2473 of file rviz_visual_tools.cpp.

geometry_msgs::Pose rviz_visual_tools::RvizVisualTools::convertPointToPose ( const geometry_msgs::Point point)
static

Add an identity rotation matrix to make a point have a full pose.

Definition at line 2483 of file rviz_visual_tools.cpp.

Eigen::Affine3d rviz_visual_tools::RvizVisualTools::convertPointToPose ( const Eigen::Vector3d &  point)
static

Definition at line 2494 of file rviz_visual_tools.cpp.

geometry_msgs::Pose rviz_visual_tools::RvizVisualTools::convertPose ( const Eigen::Affine3d &  pose)
static

Convert an Eigen pose to a geometry_msg pose.

Parameters
pose
Returns
converted pose

Definition at line 2449 of file rviz_visual_tools.cpp.

Eigen::Affine3d rviz_visual_tools::RvizVisualTools::convertPose ( const geometry_msgs::Pose pose)
static

Convert a geometry_msg pose to an Eigen pose Note: Not thread safe but very convenient.

Parameters
ROSmsg pose
Returns
converted pose

Definition at line 2461 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::convertPoseSafe ( const Eigen::Affine3d &  pose,
geometry_msgs::Pose pose_msg 
)
static

Convert an Eigen pose to a geometry_msg pose - thread safe.

Parameters
Eigenpose - input
ROSmsg pose - output

Definition at line 2456 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::convertPoseSafe ( const geometry_msgs::Pose pose_msg,
Eigen::Affine3d &  pose 
)
static

Convert a geometry_msg pose to an Eigen pose - thread safe.

Parameters
ROSmsg pose - input
Eigenpose - output

Definition at line 2468 of file rviz_visual_tools.cpp.

geometry_msgs::Point rviz_visual_tools::RvizVisualTools::convertPoseToPoint ( const Eigen::Affine3d &  pose)
static

Convert an Eigen pose to a geometry_msg point Note: Not thread safe but very convenient.

Parameters
pose
Returns
converted point with orientation discarded

Definition at line 2502 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::convertToXYZRPY ( const Eigen::Affine3d &  pose,
std::vector< double > &  xyzrpy 
)
static

Convert an affine3d to xyz rpy components R-P-Y / X-Y-Z / 0-1-2 Euler Angle Standard.

Parameters
inputEigen pose
outputvector of size 6 in order xyz rpy

Definition at line 2612 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::convertToXYZRPY ( const Eigen::Affine3d &  pose,
double &  x,
double &  y,
double &  z,
double &  roll,
double &  pitch,
double &  yaw 
)
static

Definition at line 2618 of file rviz_visual_tools.cpp.

std_msgs::ColorRGBA rviz_visual_tools::RvizVisualTools::createRandColor ( ) const

Create a random color that is not too light.

Returns
the RGB message of a random color

Definition at line 575 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::deleteAllMarkers ( )

Tell Rviz to clear all markers on a particular display.

Definition at line 74 of file rviz_visual_tools.cpp.

double rviz_visual_tools::RvizVisualTools::dRand ( double  min,
double  max 
)
static

Get random between min and max.

Definition at line 2729 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::enableBatchPublishing ( bool  enable = true)

Enable batch publishing - useful for when many markers need to be published at once and the ROS topic can get overloaded. This collects all published markers into array and only publishes them with trigger() is called.

Definition at line 845 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::enableFrameLocking ( bool  enable = true)

Enable frame locking - useful for when the markers is attached to a moving TF, the marker will be re-transformed into its frame every time-step.

Definition at line 850 of file rviz_visual_tools.cpp.

float rviz_visual_tools::RvizVisualTools::fRand ( float  min,
float  max 
)
static

Definition at line 2735 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::generateEmptyPose ( geometry_msgs::Pose pose)
static

Create a pose of position (0,0,0) and quaternion (0,0,0,1)

Parameters
Poseto fill in

Definition at line 2700 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::generateRandomCuboid ( geometry_msgs::Pose cuboid_pose,
double &  depth,
double &  width,
double &  height,
RandomPoseBounds  pose_bounds = RandomPoseBounds(),
RandomCuboidBounds  cuboid_bounds = RandomCuboidBounds() 
)
static

Create a random rectangular cuboid of some shape.

Definition at line 2639 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::generateRandomPose ( geometry_msgs::Pose pose,
RandomPoseBounds  pose_bounds = RandomPoseBounds() 
)
static

Create a random pose within bounds of random_pose_bounds_.

Parameters
Poseto fill in options bounds on the pose to generate

Definition at line 2632 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::generateRandomPose ( Eigen::Affine3d &  pose,
RandomPoseBounds  pose_bounds = RandomPoseBounds() 
)
static

Definition at line 2652 of file rviz_visual_tools.cpp.

const std::string rviz_visual_tools::RvizVisualTools::getBaseFrame ( ) const
inline

Get the base frame.

Returns
name of base frame

Definition at line 323 of file rviz_visual_tools.h.

Eigen::Vector3d rviz_visual_tools::RvizVisualTools::getCenterPoint ( const Eigen::Vector3d &  a,
const Eigen::Vector3d &  b 
) const

Find the center between to points.

Parameters
pointa - x,y,z in space of a point
pointb - x,y,z in space of a point
Returns
center point

Definition at line 714 of file rviz_visual_tools.cpp.

std_msgs::ColorRGBA rviz_visual_tools::RvizVisualTools::getColor ( colors  color) const

Get the RGB value of standard colors.

Parameters
color- an enum pre-defined name of a color
Returns
the RGB message equivalent

Definition at line 367 of file rviz_visual_tools.cpp.

std_msgs::ColorRGBA rviz_visual_tools::RvizVisualTools::getColorScale ( double  value) const

Convert a value from [0,1] to a color Green->Red.

Returns
interpolated color

Definition at line 609 of file rviz_visual_tools.cpp.

double rviz_visual_tools::RvizVisualTools::getGlobalScale ( ) const
inline

Getter for the global scale used for changing size of all markers.

Definition at line 341 of file rviz_visual_tools.h.

bool rviz_visual_tools::RvizVisualTools::getPsychedelicMode ( ) const
inline

Getter for PsychedelicMode.

Definition at line 1054 of file rviz_visual_tools.h.

colors rviz_visual_tools::RvizVisualTools::getRandColor ( )
static

Get a random color from the list of hardcoded enum color types.

Returns
Random color from colors

Definition at line 361 of file rviz_visual_tools.cpp.

RemoteControlPtr & rviz_visual_tools::RvizVisualTools::getRemoteControl ( )

Ability to load remote control on the fly.

Definition at line 2786 of file rviz_visual_tools.cpp.

geometry_msgs::Vector3 rviz_visual_tools::RvizVisualTools::getScale ( scales  scale,
double  marker_scale = 1.0 
) const

Get the rviz marker scale of standard sizes.

Parameters
scale- an enum pre-defined name of a size
marker_scale- amount to scale the scale for accounting for different types of markers
Returns
vector of 3 scales

Definition at line 656 of file rviz_visual_tools.cpp.

Eigen::Affine3d rviz_visual_tools::RvizVisualTools::getVectorBetweenPoints ( const Eigen::Vector3d &  a,
const Eigen::Vector3d &  b 
) const

Create a vector that points from point a to point b.

Parameters
pointa - x,y,z in space of a point
pointb - x,y,z in space of a point
Returns
vector from a to b

Definition at line 723 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::initialize ( )
private

Shared function for initilization by constructors.

Definition at line 66 of file rviz_visual_tools.cpp.

colors rviz_visual_tools::RvizVisualTools::intToRvizColor ( std::size_t  color)
static

Used by interfaces that do not directly depend on Rviz Visual Tools, such as OMPL.

Definition at line 500 of file rviz_visual_tools.cpp.

scales rviz_visual_tools::RvizVisualTools::intToRvizScale ( std::size_t  scale)
static

Used by interfaces that do not directly depend on Rviz Visual Tools, such as OMPL.

Definition at line 531 of file rviz_visual_tools.cpp.

int rviz_visual_tools::RvizVisualTools::iRand ( int  min,
int  max 
)
static

Definition at line 2741 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::loadMarkerPub ( bool  wait_for_subscriber = false,
bool  latched = false 
)

Load publishers as needed.

Parameters
wait_for_subscriber- whether a sleep for loop should be used to check for connectivity to an external node before proceeding

Definition at line 267 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::loadRemoteControl ( )

Pre-load remote control.

Definition at line 2795 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::loadRvizMarkers ( )

Pre-load rviz markers for better efficiency.

Returns
converted pose *
true on sucess

Definition at line 95 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::posesEqual ( const Eigen::Affine3d &  pose1,
const Eigen::Affine3d &  pose2,
double  threshold = 0.000001 
)
static

Test if two Eigen poses are close enough.

Parameters
pose1
pose2
threshold- how close in value they must be in order to be considered the same
Returns
true if equal

Definition at line 2714 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::printTransform ( const Eigen::Affine3d &  transform)
static

Display in the console a transform in quaternions.

Definition at line 2758 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::printTransformFull ( const Eigen::Affine3d &  transform)
static

Display in the console a transform with full 3x3 rotation matrix.

Definition at line 2774 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::printTransformRPY ( const Eigen::Affine3d &  transform)
static

Display in the console a transform in roll pitch yaw.

Definition at line 2766 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::printTranslation ( const Eigen::Vector3d &  translation)
static

Display in the console the x,y,z values of a point.

Definition at line 2753 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::prompt ( const std::string &  msg)

Wait for user feedback i.e. through a button or joystick.

Definition at line 2781 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishArrow ( const Eigen::Affine3d &  pose,
colors  color = BLUE,
scales  scale = MEDIUM,
double  length = 0.0,
std::size_t  id = 0 
)

Display an arrow along the x-axis of a pose.

Parameters
pose- the location to publish the marker with respect to the base frame
color- an enum pre-defined name of a color
scale- an enum pre-defined name of a size
length- how long the arrow tail should be. if zero, will auto set with scale
start- the starting point of the arrow
end- the ending point of the arrow
Returns
true on success

Definition at line 1302 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishArrow ( const geometry_msgs::Pose pose,
colors  color = BLUE,
scales  scale = MEDIUM,
double  length = 0.0,
std::size_t  id = 0 
)

Definition at line 1308 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishArrow ( const geometry_msgs::PoseStamped &  pose,
colors  color = BLUE,
scales  scale = MEDIUM,
double  length = 0.0,
std::size_t  id = 0 
)

Definition at line 1342 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishArrow ( const geometry_msgs::Point start,
const geometry_msgs::Point end,
colors  color = BLUE,
scales  scale = MEDIUM,
std::size_t  id = 0 
)

Definition at line 1378 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishAxis ( const geometry_msgs::Pose pose,
scales  scale = MEDIUM,
const std::string &  ns = "Axis" 
)

Display a red/green/blue coordinate frame axis.

Parameters
pose- the location to publish the marker with respect to the base frame
scale- size of axis
length- geometry of cylinder
radius- geometry of cylinder
ns- namespace
Returns
true on success

Definition at line 1431 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishAxis ( const Eigen::Affine3d &  pose,
scales  scale = MEDIUM,
const std::string &  ns = "Axis" 
)

Definition at line 1437 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishAxis ( const geometry_msgs::Pose pose,
double  length,
double  radius = 0.01,
const std::string &  ns = "Axis" 
)

Definition at line 1443 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishAxis ( const Eigen::Affine3d &  pose,
double  length,
double  radius = 0.01,
const std::string &  ns = "Axis" 
)

Definition at line 1448 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishAxisInternal ( const Eigen::Affine3d &  pose,
double  length = 0.1,
double  radius = 0.01,
const std::string &  ns = "Axis" 
)
private

Display a red/green/blue coordinate axis - the 'internal' version does not do a batch publish.

Parameters
pose- the location to publish the marker with respect to the base frame
length- geometry of cylinder
radius- geometry of cylinder
ns- namespace
Returns
true on success

Definition at line 1457 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishAxisLabeled ( const Eigen::Affine3d &  pose,
const std::string &  label,
scales  scale = MEDIUM,
colors  color = WHITE 
)

Display a marker of a coordinate frame axis with a text label describing it.

Parameters
pose- the location to publish the marker with respect to the base frame
label- name of axis/coordinate frame
scale- size of axis
color- an enum pre-defined name of a color
Returns
true on success

Definition at line 1411 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishAxisLabeled ( const geometry_msgs::Pose pose,
const std::string &  label,
scales  scale = MEDIUM,
colors  color = WHITE 
)

Definition at line 1417 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishAxisPath ( const EigenSTL::vector_Affine3d path,
scales  scale = MEDIUM,
const std::string &  ns = "Axis Path" 
)

Display a series of red/green/blue coordinate axis along a path.

Parameters
path- the location to publish each marker with respect to the base frame
length- geometry of cylinder
radius- geometry of cylinder
ns- namespace
Returns
true on success

Definition at line 1480 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishAxisPath ( const EigenSTL::vector_Affine3d path,
double  length = 0.1,
double  radius = 0.01,
const std::string &  ns = "Axis Path" 
)

Definition at line 1492 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishCone ( const Eigen::Affine3d &  pose,
double  angle,
colors  color = TRANSLUCENT,
double  scale = 1.0 
)

Display a cone of a given angle along the x-axis.

Parameters
pose- the location and orientation of the cone
color- color of the cone
scale- size of the cone
Returns
true on success

Definition at line 935 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishCone ( const geometry_msgs::Pose pose,
double  angle,
colors  color = TRANSLUCENT,
double  scale = 1.0 
)

Definition at line 940 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishCuboid ( const Eigen::Vector3d &  point1,
const Eigen::Vector3d &  point2,
colors  color = BLUE 
)

Display a rectangular cuboid.

Parameters
point1- x,y,z top corner location of box
point2- x,y,z bottom opposite corner location of box
color- an enum pre-defined name of a color
Returns
true on success

Definition at line 1650 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishCuboid ( const geometry_msgs::Point point1,
const geometry_msgs::Point point2,
colors  color = BLUE,
const std::string &  ns = "Cuboid",
std::size_t  id = 0 
)

Definition at line 1655 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishCuboid ( const geometry_msgs::Pose pose,
double  depth,
double  width,
double  height,
colors  color = BLUE 
)

Display a rectangular cuboid.

Parameters
pose- pose of the box
depth- depth of the box
width- width of the box
height- height of the box
color- an enum pre-defined name of a color
Returns
true on success

Definition at line 1709 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishCuboid ( const Eigen::Affine3d &  pose,
double  depth,
double  width,
double  height,
colors  color = BLUE 
)

Definition at line 1703 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishCylinder ( const Eigen::Vector3d &  point1,
const Eigen::Vector3d &  point2,
colors  color = BLUE,
scales  scale = MEDIUM,
const std::string &  ns = "Cylinder" 
)

Display a marker of a cylinder.

Parameters
point1- starting side of cylinder
point2- end side of cylinder
color- an enum pre-defined name of a color
radius- geometry of cylinder
Returns
true on success

Definition at line 1504 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishCylinder ( const Eigen::Vector3d &  point1,
const Eigen::Vector3d &  point2,
colors  color,
double  radius = 0.01,
const std::string &  ns = "Cylinder" 
)

Definition at line 1511 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishCylinder ( const Eigen::Vector3d &  point1,
const Eigen::Vector3d &  point2,
const std_msgs::ColorRGBA &  color,
double  radius = 0.01,
const std::string &  ns = "Cylinder" 
)

Definition at line 1517 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishCylinder ( const Eigen::Affine3d &  pose,
colors  color = BLUE,
double  height = 0.1,
double  radius = 0.01,
const std::string &  ns = "Cylinder" 
)

Display a marker of a cylinder.

Parameters
pose- the location to publish the marker with respect to the base frame
color- an enum pre-defined name of a color
height- geometry of cylinder
radius- geometry of cylinder
Returns
true on success

Definition at line 1539 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishCylinder ( const geometry_msgs::Pose pose,
colors  color = BLUE,
double  height = 0.1,
double  radius = 0.01,
const std::string &  ns = "Cylinder" 
)

Definition at line 1545 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishCylinder ( const geometry_msgs::Pose pose,
const std_msgs::ColorRGBA &  color,
double  height = 0.1,
double  radius = 0.01,
const std::string &  ns = "Cylinder" 
)

Definition at line 1551 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishGraph ( const graph_msgs::GeometryGraph &  graph,
colors  color,
double  radius 
)

Display a graph.

Parameters
graphof nodes and edges
color- an enum pre-defined name of a color
radius- width of cylinders
Returns
true on success

Definition at line 1618 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishLine ( const Eigen::Affine3d &  point1,
const Eigen::Affine3d &  point2,
colors  color = BLUE,
scales  scale = MEDIUM 
)

Display a marker of line.

Parameters
point1- x,y,z of start of line
point2- x,y,z of end of line
color- an enum pre-defined name of a color
scale- an enum pre-defined name of a size
Returns
true on success

Definition at line 1750 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishLine ( const Eigen::Vector3d &  point1,
const Eigen::Vector3d &  point2,
colors  color = BLUE,
scales  scale = MEDIUM 
)

Definition at line 1756 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishLine ( const Eigen::Vector3d &  point1,
const Eigen::Vector3d &  point2,
colors  color,
double  radius 
)

Definition at line 1761 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishLine ( const Eigen::Vector3d &  point1,
const Eigen::Vector3d &  point2,
const std_msgs::ColorRGBA &  color,
scales  scale = MEDIUM 
)

Definition at line 1771 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishLine ( const Eigen::Vector3d &  point1,
const Eigen::Vector3d &  point2,
const std_msgs::ColorRGBA &  color,
double  radius 
)

Definition at line 1777 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishLine ( const geometry_msgs::Point point1,
const geometry_msgs::Point point2,
colors  color = BLUE,
scales  scale = MEDIUM 
)

Definition at line 1787 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishLine ( const geometry_msgs::Point point1,
const geometry_msgs::Point point2,
const std_msgs::ColorRGBA &  color,
scales  scale = MEDIUM 
)

Definition at line 1793 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishLine ( const geometry_msgs::Point point1,
const geometry_msgs::Point point2,
const std_msgs::ColorRGBA &  color,
const geometry_msgs::Vector3 scale 
)

Definition at line 1799 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishLines ( const EigenSTL::vector_Vector3d aPoints,
const EigenSTL::vector_Vector3d bPoints,
const std::vector< colors > &  colors,
scales  scale = MEDIUM 
)

Display a marker of lines.

Parameters
aPoints- x,y,z of start of line, as a vector
bPoints- x,y,z of end of line, as a vector
colors- an enum pre-defined name of a color
scale- an enum pre-defined name of a size
Returns
true on success

Definition at line 1817 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishLines ( const std::vector< geometry_msgs::Point > &  aPoints,
const std::vector< geometry_msgs::Point > &  bPoints,
const std::vector< std_msgs::ColorRGBA > &  colors,
const geometry_msgs::Vector3 scale 
)

Definition at line 1841 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishLineStrip ( const std::vector< geometry_msgs::Point > &  path,
colors  color = RED,
scales  scale = MEDIUM,
const std::string &  ns = "Path" 
)

Display a series of connected lines using the LINE_STRIP method - deprecated because visual bugs.

Parameters
path- a series of points to connect with lines
color- an enum pre-defined name of a color
scale- an enum pre-defined name of a size
ns- namespace of marker
Returns
true on success

Definition at line 1874 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishMarker ( visualization_msgs::Marker &  marker)

Display a visualization_msgs Marker of a custom type. Allows reuse of the ros publisher.

Parameters
marker- a pre-made marker ready to be published
Returns
true on success

Definition at line 830 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishMarkers ( visualization_msgs::MarkerArray &  markers)

Display an array of markers, allows reuse of the ROS publisher.

Parameters
markers
Returns
true on success

Definition at line 889 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishMesh ( const Eigen::Affine3d &  pose,
const std::string &  file_name,
colors  color = CLEAR,
double  scale = 1,
const std::string &  ns = "mesh",
std::size_t  id = 0 
)

Display a mesh from file.

Parameters
pose- the location to publish the marker with respect to the base frame
filename of mesh, starting with "file://" e.g. "file:///home/user/mesh.stl"
color- an enum pre-defined name of a color
scale- an enum pre-defined name of a size
ns- namespace of marker
id- unique counter of mesh that allows you to overwrite a previous mesh. if 0, defaults to incremental counter
Returns
true on success

Definition at line 1574 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishMesh ( const geometry_msgs::Pose pose,
const std::string &  file_name,
colors  color = CLEAR,
double  scale = 1,
const std::string &  ns = "mesh",
std::size_t  id = 0 
)

Definition at line 1580 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishPath ( const std::vector< geometry_msgs::Pose > &  path,
colors  color = RED,
scales  scale = MEDIUM,
const std::string &  ns = "Path" 
)

Display a marker of a series of connected cylinders.

Parameters
path- a series of points to connect with cylinders
color- an enum pre-defined name of a color
scale- an enum pre-defined name of a size
ns- namespace of marker
Returns
true on success

Definition at line 1908 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishPath ( const std::vector< geometry_msgs::Point > &  path,
colors  color = RED,
scales  scale = MEDIUM,
const std::string &  ns = "Path" 
)

Definition at line 1920 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishPath ( const EigenSTL::vector_Affine3d path,
colors  color = RED,
scales  scale = MEDIUM,
const std::string &  ns = "Path" 
)

Definition at line 1926 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishPath ( const EigenSTL::vector_Vector3d path,
colors  color = RED,
scales  scale = MEDIUM,
const std::string &  ns = "Path" 
)

Definition at line 1932 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishPath ( const std::vector< geometry_msgs::Point > &  path,
colors  color = RED,
double  radius = 0.01,
const std::string &  ns = "Path" 
)

Definition at line 1938 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishPath ( const EigenSTL::vector_Vector3d path,
colors  color = RED,
double  radius = 0.01,
const std::string &  ns = "Path" 
)

Definition at line 1956 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishPath ( const EigenSTL::vector_Affine3d path,
colors  color = RED,
double  radius = 0.01,
const std::string &  ns = "Path" 
)

Definition at line 1974 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishPath ( const EigenSTL::vector_Vector3d path,
const std::vector< colors > &  colors,
double  radius = 0.01,
const std::string &  ns = "Path" 
)

Display a marker of a series of connected colored cylinders.

Parameters
path- a series of points to connect with cylinders
colors- a series of colors
radius- the radius of the cylinders
ns- namespace of marker
Returns
true on success
Note
path and colors vectors must be the same size

Definition at line 1992 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishPath ( const EigenSTL::vector_Vector3d path,
const std::vector< std_msgs::ColorRGBA > &  colors,
double  radius,
const std::string &  ns = "Path" 
)

Definition at line 2017 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishPolygon ( const geometry_msgs::Polygon &  polygon,
colors  color = RED,
scales  scale = MEDIUM,
const std::string &  ns = "Polygon" 
)

Display a marker of a polygon.

Parameters
polygon- a series of points to connect with lines
color- an enum pre-defined name of a color
scale- an enum pre-defined name of a size
ns- namespace of marker
Returns
true on success

Definition at line 2042 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishSphere ( const Eigen::Affine3d &  pose,
colors  color = BLUE,
scales  scale = MEDIUM,
const std::string &  ns = "Sphere",
std::size_t  id = 0 
)

Display a marker of a sphere.

Parameters
pose- the location to publish the sphere with respect to the base frame
color- an enum pre-defined name of a color
scale- an enum pre-defined name of a size
ns- namespace of marker
id- unique counter of mesh that allows you to overwrite a previous mesh. if 0, defaults to incremental counter
Returns
true on success

Definition at line 1119 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishSphere ( const Eigen::Vector3d &  point,
colors  color = BLUE,
scales  scale = MEDIUM,
const std::string &  ns = "Sphere",
std::size_t  id = 0 
)

Definition at line 1125 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishSphere ( const Eigen::Vector3d &  point,
colors  color,
double  scale,
const std::string &  ns = "Sphere",
std::size_t  id = 0 
)

Definition at line 1133 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishSphere ( const geometry_msgs::Point point,
colors  color = BLUE,
scales  scale = MEDIUM,
const std::string &  ns = "Sphere",
std::size_t  id = 0 
)

Definition at line 1141 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishSphere ( const geometry_msgs::Pose pose,
colors  color = BLUE,
scales  scale = MEDIUM,
const std::string &  ns = "Sphere",
std::size_t  id = 0 
)

Definition at line 1149 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishSphere ( const geometry_msgs::Pose pose,
colors  color,
double  scale,
const std::string &  ns = "Sphere",
std::size_t  id = 0 
)

Definition at line 1155 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishSphere ( const geometry_msgs::Pose pose,
colors  color,
const geometry_msgs::Vector3  scale,
const std::string &  ns = "Sphere",
std::size_t  id = 0 
)

Definition at line 1165 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishSphere ( const geometry_msgs::Pose pose,
const std_msgs::ColorRGBA &  color,
const geometry_msgs::Vector3  scale,
const std::string &  ns = "Sphere",
std::size_t  id = 0 
)

Definition at line 1185 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishSphere ( const Eigen::Affine3d &  pose,
const std_msgs::ColorRGBA &  color,
const geometry_msgs::Vector3  scale,
const std::string &  ns = "Sphere",
std::size_t  id = 0 
)

Definition at line 1171 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishSphere ( const Eigen::Vector3d &  point,
const std_msgs::ColorRGBA &  color,
const geometry_msgs::Vector3  scale,
const std::string &  ns = "Sphere",
std::size_t  id = 0 
)

Definition at line 1177 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishSphere ( const geometry_msgs::PoseStamped &  pose,
colors  color,
const geometry_msgs::Vector3  scale,
const std::string &  ns = "Sphere",
std::size_t  id = 0 
)

Definition at line 1210 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishSpheres ( const EigenSTL::vector_Vector3d points,
colors  color = BLUE,
scales  scale = MEDIUM,
const std::string &  ns = "Spheres" 
)

Display a marker of a series of spheres.

Parameters
spheres- where to publish them
color- an enum pre-defined name of a color
scale- an enum pre-defined name of a size
ns- namespace of marker
Returns
true on success

Definition at line 2293 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishSpheres ( const EigenSTL::vector_Vector3d points,
colors  color,
double  scale = 0.1,
const std::string &  ns = "Spheres" 
)

Definition at line 2306 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishSpheres ( const std::vector< geometry_msgs::Point > &  points,
colors  color = BLUE,
scales  scale = MEDIUM,
const std::string &  ns = "Spheres" 
)

Definition at line 2329 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishSpheres ( const std::vector< geometry_msgs::Point > &  points,
colors  color = BLUE,
double  scale = 0.1,
const std::string &  ns = "Spheres" 
)

Definition at line 2319 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishSpheres ( const std::vector< geometry_msgs::Point > &  points,
colors  color,
const geometry_msgs::Vector3 scale,
const std::string &  ns = "Spheres" 
)

Definition at line 2335 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishSpheres ( const EigenSTL::vector_Vector3d points,
const std::vector< colors > &  colors,
scales  scale = MEDIUM,
const std::string &  ns = "Spheres" 
)

Display a marker of a series of spheres, with the possibility of different colors.

Parameters
spheres- where to publish them
color- an enum pre-defined name of a color
scale- an enum pre-defined name of a size
ns- namespace of marker
Returns
true on success

Definition at line 2361 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishSpheres ( const std::vector< geometry_msgs::Point > &  points,
const std::vector< std_msgs::ColorRGBA > &  colors,
const geometry_msgs::Vector3 scale,
const std::string &  ns = "Spheres" 
)

Definition at line 2380 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishText ( const Eigen::Affine3d &  pose,
const std::string &  text,
colors  color = WHITE,
scales  scale = MEDIUM,
bool  static_id = true 
)

Display a marker of a text.

Parameters
pose- the location to publish the marker with respect to the base frame
text- what message to display
color- an enum pre-defined name of a color
scale- an enum pre-defined name of a size
static_id- if true, only one text can be published at a time
Returns
true on success

Definition at line 2398 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishText ( const Eigen::Affine3d &  pose,
const std::string &  text,
colors  color,
const geometry_msgs::Vector3  scale,
bool  static_id = true 
)

Definition at line 2404 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishText ( const geometry_msgs::Pose pose,
const std::string &  text,
colors  color = WHITE,
scales  scale = MEDIUM,
bool  static_id = true 
)

Definition at line 2410 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishText ( const geometry_msgs::Pose pose,
const std::string &  text,
colors  color,
const geometry_msgs::Vector3  scale,
bool  static_id = true 
)

Definition at line 2416 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishWireframeCuboid ( const Eigen::Affine3d &  pose,
double  depth,
double  width,
double  height,
colors  color = BLUE,
const std::string &  ns = "Wireframe Cuboid",
std::size_t  id = 0 
)

Publish transformed wireframe cuboid. Useful eg to show an oriented bounding box.

Parameters
pose- cuboid vertices are transformed according to it
depth- object depth
width- object width
height- object height
color- an enum pre-defined name of a color
ns- namespace
id- unique counter of mesh that allows you to overwrite a previous mesh. if 0, defaults to incremental counter
Returns
true on success

Definition at line 2066 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishWireframeCuboid ( const Eigen::Affine3d &  pose,
const Eigen::Vector3d &  min_point,
const Eigen::Vector3d &  max_point,
colors  color = BLUE,
const std::string &  ns = "Wireframe Cuboid",
std::size_t  id = 0 
)

Publish transformed wireframe cuboid. Useful eg to show an oriented bounding box.

Parameters
pose- cuboid vertices are transformed according to it
min_point- minimum x, y, z coordinates
max_point- maximum x, y, z coordinates
color- an enum pre-defined name of a color
ns- namespace
id- unique counter that allows you to overwrite a previous marker. if 0, defaults to incremental counter
Returns
true on success

Definition at line 2075 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishWireframeRectangle ( const Eigen::Affine3d &  pose,
double  height,
double  width,
colors  color = BLUE,
scales  scale = MEDIUM,
std::size_t  id = 0 
)

Publish outline of a rectangle.

Parameters
pose- cuboid vertices are transformed according to it
height
width
color- an enum pre-defined name of a color
id- unique counter that allows you to overwrite a previous marker. if 0, defaults to incremental counter
Returns
true on success

Definition at line 2182 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishWireframeRectangle ( const Eigen::Affine3d &  pose,
const Eigen::Vector3d &  p1_in,
const Eigen::Vector3d &  p2_in,
const Eigen::Vector3d &  p3_in,
const Eigen::Vector3d &  p4_in,
colors  color,
scales  scale 
)

Definition at line 2240 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishXArrow ( const Eigen::Affine3d &  pose,
colors  color = RED,
scales  scale = MEDIUM,
double  length = 0.0 
)

Display an arrow along the x-axis of a pose.

Parameters
pose- the location to publish the marker with respect to the base frame
color- an enum pre-defined name of a color
scale- an enum pre-defined name of a size
length- the length of the arrow tail, if zero, will auto set with scale
Returns
true on success

Definition at line 1237 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishXArrow ( const geometry_msgs::Pose pose,
colors  color = RED,
scales  scale = MEDIUM,
double  length = 0.0 
)

Definition at line 1242 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishXArrow ( const geometry_msgs::PoseStamped &  pose,
colors  color = RED,
scales  scale = MEDIUM,
double  length = 0.0 
)

Definition at line 1247 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishXYPlane ( const Eigen::Affine3d &  pose,
colors  color = TRANSLUCENT,
double  scale = 1.0 
)

Display the XY plane of a given pose.

Parameters
pose- the position of the plane
color- the color of the plane
scale- the size of the vizualized plane
Returns
true on success

Definition at line 981 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishXYPlane ( const geometry_msgs::Pose pose,
colors  color = TRANSLUCENT,
double  scale = 1.0 
)

Definition at line 986 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishXZPlane ( const Eigen::Affine3d &  pose,
colors  color = TRANSLUCENT,
double  scale = 1.0 
)

Display the XY plane of a given pose.

Parameters
pose- the position of the plane
color- the color of the plane
scale- the size of the vizualized plane
Returns
true on success

Definition at line 1027 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishXZPlane ( const geometry_msgs::Pose pose,
colors  color = TRANSLUCENT,
double  scale = 1.0 
)

Definition at line 1032 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishYArrow ( const Eigen::Affine3d &  pose,
colors  color = GREEN,
scales  scale = MEDIUM,
double  length = 0.0 
)

Display an arrow along the y-axis of a pose.

Parameters
pose- the location to publish the marker with respect to the base frame
color- an enum pre-defined name of a color
scale- an enum pre-defined name of a size
length- the length of the arrow tail, if zero, will auto set with scale
Returns
true on success

Definition at line 1252 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishYArrow ( const geometry_msgs::Pose pose,
colors  color = GREEN,
scales  scale = MEDIUM,
double  length = 0.0 
)

Definition at line 1258 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishYArrow ( const geometry_msgs::PoseStamped &  pose,
colors  color = GREEN,
scales  scale = MEDIUM,
double  length = 0.0 
)

Definition at line 1264 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishYZPlane ( const Eigen::Affine3d &  pose,
colors  color = TRANSLUCENT,
double  scale = 1.0 
)

Display the XY plane of a given pose.

Parameters
pose- the position of the plane
color- the color of the plane
scale- the size of the vizualized plane
Returns
true on success

Definition at line 1073 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishYZPlane ( const geometry_msgs::Pose pose,
colors  color = TRANSLUCENT,
double  scale = 1.0 
)

Definition at line 1078 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishZArrow ( const Eigen::Affine3d &  pose,
colors  color = BLUE,
scales  scale = MEDIUM,
double  length = 0.0,
std::size_t  id = 0 
)

Display an arrow along the z-axis of a pose.

Parameters
pose- the location to publish the marker with respect to the base frame
color- an enum pre-defined name of a color
scale- an enum pre-defined name of a size
length- the length of the arrow tail, if zero, will auto set with scale
Returns
true on success

Definition at line 1272 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishZArrow ( const geometry_msgs::Pose pose,
colors  color = BLUE,
scales  scale = MEDIUM,
double  length = 0.0 
)

Definition at line 1279 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishZArrow ( const geometry_msgs::PoseStamped &  pose,
colors  color = BLUE,
scales  scale = MEDIUM,
double  length = 0.0 
)

Definition at line 1285 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::publishZArrow ( const geometry_msgs::PoseStamped &  pose,
colors  color = BLUE,
scales  scale = MEDIUM,
double  length = 0.0,
std::size_t  id = 0 
)

Definition at line 1293 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::resetMarkerCounts ( )

Reset the id's of all published markers so that they overwrite themselves in the future NOTE you may prefer deleteAllMarkers()

Definition at line 80 of file rviz_visual_tools.cpp.

std::string rviz_visual_tools::RvizVisualTools::scaleToString ( scales  scale)
static

Convert an enum to its string name equivalent.

Definition at line 553 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::setAlpha ( double  alpha)
inline

Change the transparency of all markers published.

Parameters
alpha- value 0 - 1 where 0 is invisible

Definition at line 245 of file rviz_visual_tools.h.

void rviz_visual_tools::RvizVisualTools::setBaseFrame ( const std::string &  base_frame)
inline

Change the global base frame Note: this might reset all your current markers.

Parameters
nameof frame

Definition at line 332 of file rviz_visual_tools.h.

void rviz_visual_tools::RvizVisualTools::setGlobalScale ( double  global_scale)
inline

Setter for the global scale used for changing size of all markers.

Definition at line 348 of file rviz_visual_tools.h.

void rviz_visual_tools::RvizVisualTools::setLifetime ( double  lifetime)

Set the lifetime of markers published to rviz.

Parameters
lifetimeseconds of how long to show markers. 0 for inifinity

Definition at line 346 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::setMarkerTopic ( const std::string &  topic)
inline

Set marker array topic.

Definition at line 214 of file rviz_visual_tools.h.

void rviz_visual_tools::RvizVisualTools::setPsychedelicMode ( bool  psychedelic_mode = true)
inline

Setter for PsychedelicMode.

Definition at line 1060 of file rviz_visual_tools.h.

double rviz_visual_tools::RvizVisualTools::slerp ( double  start,
double  end,
double  range,
double  value 
)
static

Interpolate from [start, end] with value of size steps with current value count.

Returns
interpolated value

Definition at line 604 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::trigger ( )

Definition at line 864 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::triggerAndDisable ( )

Trigger the publish function to send out all collected markers. Also then turns off the batch mode. This is safer incase programmer forgets.

Returns
true on success

Definition at line 882 of file rviz_visual_tools.cpp.

RVIZ_VISUAL_TOOLS_DEPRECATED bool rviz_visual_tools::RvizVisualTools::triggerBatchPublish ( )
inline

Trigger the publish function to send out all collected markers.

Returns
true on success

Definition at line 386 of file rviz_visual_tools.h.

bool rviz_visual_tools::RvizVisualTools::triggerEvery ( std::size_t  queueSize)

Trigger the publish function to send out all collected markers IF there are at leats queueSize number of markers ready to be published. a * Warning: when using this in a loop be sure to call trigger() at end of loop in case there are any remainder markers in the queue.

Returns
true on success

Definition at line 855 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::waitForMarkerPub ( )

Optional blocking function to call after calling loadMarkerPub(). Allows you to do some intermediate processing before wasting cycles waiting for the marker pub to find a subscriber.

Definition at line 284 of file rviz_visual_tools.cpp.

void rviz_visual_tools::RvizVisualTools::waitForMarkerPub ( double  wait_time)

Definition at line 290 of file rviz_visual_tools.cpp.

bool rviz_visual_tools::RvizVisualTools::waitForSubscriber ( const ros::Publisher pub,
double  wait_time = 0.5,
bool  blocking = false 
)

Wait until at least one subscriber connects to a publisher.

Parameters
pub- the publisher to check for subscribers
wait_time- time to wait for subscriber to be available before throwing warning
blocking- if true, the function loop until a subscriber is gotten
Returns
true on successful connection

Definition at line 296 of file rviz_visual_tools.cpp.

Member Data Documentation

const std::array< colors, 14 > rviz_visual_tools::RvizVisualTools::all_rand_colors_
staticprotected
Initial value:

Definition at line 1123 of file rviz_visual_tools.h.

double rviz_visual_tools::RvizVisualTools::alpha_ = 1.0
protected

Definition at line 1099 of file rviz_visual_tools.h.

visualization_msgs::Marker rviz_visual_tools::RvizVisualTools::arrow_marker_
protected

Definition at line 1106 of file rviz_visual_tools.h.

std::string rviz_visual_tools::RvizVisualTools::base_frame_
protected

Definition at line 1091 of file rviz_visual_tools.h.

bool rviz_visual_tools::RvizVisualTools::batch_publishing_enabled_ = true
protected

Definition at line 1097 of file rviz_visual_tools.h.

visualization_msgs::Marker rviz_visual_tools::RvizVisualTools::block_marker_
protected

Definition at line 1108 of file rviz_visual_tools.h.

visualization_msgs::Marker rviz_visual_tools::RvizVisualTools::cuboid_marker_
protected

Definition at line 1112 of file rviz_visual_tools.h.

visualization_msgs::Marker rviz_visual_tools::RvizVisualTools::cylinder_marker_
protected

Definition at line 1109 of file rviz_visual_tools.h.

bool rviz_visual_tools::RvizVisualTools::frame_locking_enabled_ = false
protected

Definition at line 1098 of file rviz_visual_tools.h.

double rviz_visual_tools::RvizVisualTools::global_scale_ = 1.0
protected

Definition at line 1100 of file rviz_visual_tools.h.

visualization_msgs::Marker rviz_visual_tools::RvizVisualTools::line_list_marker_
protected

Definition at line 1114 of file rviz_visual_tools.h.

visualization_msgs::Marker rviz_visual_tools::RvizVisualTools::line_strip_marker_
protected

Definition at line 1113 of file rviz_visual_tools.h.

ros::Duration rviz_visual_tools::RvizVisualTools::marker_lifetime_
protected

Definition at line 1094 of file rviz_visual_tools.h.

std::string rviz_visual_tools::RvizVisualTools::marker_topic_
protected

Definition at line 1090 of file rviz_visual_tools.h.

visualization_msgs::MarkerArray rviz_visual_tools::RvizVisualTools::markers_
protected

Definition at line 1103 of file rviz_visual_tools.h.

visualization_msgs::Marker rviz_visual_tools::RvizVisualTools::mesh_marker_
protected

Definition at line 1110 of file rviz_visual_tools.h.

const std::string rviz_visual_tools::RvizVisualTools::name_ = "visual_tools"
staticprotected

Definition at line 1079 of file rviz_visual_tools.h.

ros::NodeHandle rviz_visual_tools::RvizVisualTools::nh_
protected

Definition at line 1076 of file rviz_visual_tools.h.

bool rviz_visual_tools::RvizVisualTools::psychedelic_mode_ = false
protected

Definition at line 1120 of file rviz_visual_tools.h.

ros::Publisher rviz_visual_tools::RvizVisualTools::pub_rviz_markers_
protected

Definition at line 1085 of file rviz_visual_tools.h.

bool rviz_visual_tools::RvizVisualTools::pub_rviz_markers_connected_ = false
protected

Definition at line 1086 of file rviz_visual_tools.h.

bool rviz_visual_tools::RvizVisualTools::pub_rviz_markers_waited_ = false
protected

Definition at line 1087 of file rviz_visual_tools.h.

RemoteControlPtr rviz_visual_tools::RvizVisualTools::remote_control_
protected

Definition at line 1082 of file rviz_visual_tools.h.

visualization_msgs::Marker rviz_visual_tools::RvizVisualTools::reset_marker_
protected

Definition at line 1116 of file rviz_visual_tools.h.

visualization_msgs::Marker rviz_visual_tools::RvizVisualTools::sphere_marker_
protected

Definition at line 1107 of file rviz_visual_tools.h.

visualization_msgs::Marker rviz_visual_tools::RvizVisualTools::spheres_marker_
protected

Definition at line 1115 of file rviz_visual_tools.h.

visualization_msgs::Marker rviz_visual_tools::RvizVisualTools::text_marker_
protected

Definition at line 1111 of file rviz_visual_tools.h.

visualization_msgs::Marker rviz_visual_tools::RvizVisualTools::triangle_marker_
protected

Definition at line 1117 of file rviz_visual_tools.h.


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


rviz_visual_tools
Author(s): Dave Coleman
autogenerated on Mon Jun 10 2019 15:05:18