Go to the documentation of this file.
   48 #include <Eigen/Geometry> 
   52 #include <visualization_msgs/Marker.h> 
   53 #include <visualization_msgs/MarkerArray.h> 
   56 #include <boost/shared_ptr.hpp> 
   59 #include <shape_msgs/Mesh.h> 
   60 #include <std_msgs/ColorRGBA.h> 
   61 #include <graph_msgs/GeometryGraph.h> 
   62 #include <geometry_msgs/PoseArray.h> 
   63 #include <geometry_msgs/PoseStamped.h> 
   64 #include <geometry_msgs/Polygon.h> 
   65 #include <trajectory_msgs/JointTrajectory.h> 
   73 #ifdef ROS_BUILD_SHARED_LIBS      // ros is being built around shared libraries 
   74 #ifdef rviz_visual_tools_EXPORTS  // we are building a shared lib/dll 
   75 #define RVIZ_VISUAL_TOOLS_DECL ROS_HELPER_EXPORT 
   76 #else  // we are using shared lib/dll 
   77 #define RVIZ_VISUAL_TOOLS_DECL ROS_HELPER_IMPORT 
   79 #else  // ros is being built around static libraries 
   80 #define RVIZ_VISUAL_TOOLS_DECL 
  150   RandomPoseBounds(
double x_min = 0.0, 
double x_max = 1.0, 
double y_min = 0.0, 
double y_max = 1.0, 
double z_min = 0.0,
 
  151                    double z_max = 1.0, 
double elevation_min = 0.0, 
double elevation_max = M_PI,
 
  152                    double azimuth_min = 0.0, 
double azimuth_max = 2 * M_PI, 
double angle_min = 0.0,
 
  153                    double angle_max = 2 * M_PI)
 
  236   void loadMarkerPub(
bool wait_for_subscriber = 
false, 
bool latched = 
false);
 
  299   static double slerp(
double start, 
double end, 
double range, 
double value);
 
  313   geometry_msgs::Vector3 
getScale(
scales scale, 
double marker_scale = 1.0) 
const;
 
  329   Eigen::Vector3d 
getCenterPoint(
const Eigen::Vector3d& a, 
const Eigen::Vector3d& b) 
const;
 
  430                         double x_width = 1.0, 
double y_width = 1.0);
 
  473                      const std::string& ns = 
"Sphere", std::size_t 
id = 0);
 
  475                      const std::string& ns = 
"Sphere", std::size_t 
id = 0);
 
  476   bool publishSphere(
const Eigen::Vector3d& point, 
colors color, 
double scale, 
const std::string& ns = 
"Sphere",
 
  479                      const std::string& ns = 
"Sphere", std::size_t 
id = 0);
 
  481                      const std::string& ns = 
"Sphere", std::size_t 
id = 0);
 
  482   bool publishSphere(
const geometry_msgs::Pose& pose, 
colors color, 
double scale, 
const std::string& ns = 
"Sphere",
 
  484   bool publishSphere(
const geometry_msgs::Pose& pose, 
colors color, 
const geometry_msgs::Vector3 scale,
 
  485                      const std::string& ns = 
"Sphere", std::size_t 
id = 0);
 
  486   bool publishSphere(
const geometry_msgs::Pose& pose, 
const std_msgs::ColorRGBA& color,
 
  487                      const geometry_msgs::Vector3 scale, 
const std::string& ns = 
"Sphere", std::size_t 
id = 0);
 
  488   bool publishSphere(
const Eigen::Isometry3d& pose, 
const std_msgs::ColorRGBA& color,
 
  489                      const geometry_msgs::Vector3 scale, 
const std::string& ns = 
"Sphere", std::size_t 
id = 0);
 
  490   bool publishSphere(
const Eigen::Vector3d& point, 
const std_msgs::ColorRGBA& color, 
const geometry_msgs::Vector3 scale,
 
  491                      const std::string& ns = 
"Sphere", std::size_t 
id = 0);
 
  492   bool publishSphere(
const geometry_msgs::PoseStamped& pose, 
colors color, 
const geometry_msgs::Vector3 scale,
 
  493                      const std::string& ns = 
"Sphere", std::size_t 
id = 0);
 
  504                       const std::string& ns = 
"Spheres");
 
  506                       const std::string& ns = 
"Spheres");
 
  508                       const std::string& ns = 
"Spheres");
 
  510                       const std::string& ns = 
"Spheres");
 
  512                       const geometry_msgs::Vector3& scale, 
const std::string& ns = 
"Spheres");
 
  523                       const std::string& ns = 
"Spheres");
 
  524   bool publishSpheres(
const std::vector<geometry_msgs::Point>& points, 
const std::vector<std_msgs::ColorRGBA>& 
colors,
 
  525                       const geometry_msgs::Vector3& scale, 
const std::string& ns = 
"Spheres");
 
  538                      double length = 0.0);
 
  551                      double length = 0.0);
 
  565                      double length = 0.0);
 
  567                      double length = 0.0, std::size_t 
id = 0);
 
  584                     double length = 0.0, std::size_t 
id = 0);
 
  585   bool publishArrow(
const geometry_msgs::Point& start, 
const geometry_msgs::Point& end, 
colors color = 
BLUE,
 
  596   bool publishCuboid(
const geometry_msgs::Point& point1, 
const geometry_msgs::Point& point2, 
colors color = 
BLUE,
 
  597                      const std::string& ns = 
"Cuboid", std::size_t 
id = 0);
 
  608   bool publishCuboid(
const geometry_msgs::Pose& pose, 
double depth, 
double width, 
double height, 
colors color = 
BLUE);
 
  609   bool publishCuboid(
const Eigen::Isometry3d& pose, 
double depth, 
double width, 
double height, 
colors color = 
BLUE);
 
  629   bool publishLine(
const Eigen::Isometry3d& point1, 
const Eigen::Isometry3d& point2, 
colors color = 
BLUE,
 
  633   bool publishLine(
const Eigen::Vector3d& point1, 
const Eigen::Vector3d& point2, 
colors color, 
double radius);
 
  634   bool publishLine(
const Eigen::Vector3d& point1, 
const Eigen::Vector3d& point2, 
const std_msgs::ColorRGBA& color,
 
  636   bool publishLine(
const Eigen::Vector3d& point1, 
const Eigen::Vector3d& point2, 
const std_msgs::ColorRGBA& color,
 
  638   bool publishLine(
const geometry_msgs::Point& point1, 
const geometry_msgs::Point& point2, 
colors color = 
BLUE,
 
  640   bool publishLine(
const geometry_msgs::Point& point1, 
const geometry_msgs::Point& point2,
 
  641                    const std_msgs::ColorRGBA& color, 
scales scale = 
MEDIUM);
 
  642   bool publishLine(
const geometry_msgs::Point& point1, 
const geometry_msgs::Point& point2,
 
  643                    const std_msgs::ColorRGBA& color, 
const geometry_msgs::Vector3& scale);
 
  655   bool publishLines(
const std::vector<geometry_msgs::Point>& aPoints, 
const std::vector<geometry_msgs::Point>& bPoints,
 
  656                     const std::vector<std_msgs::ColorRGBA>& 
colors, 
const geometry_msgs::Vector3& scale);
 
  667                         const std::string& ns = 
"Path");
 
  678                    const std::string& ns = 
"Path");
 
  680                    const std::string& ns = 
"Path");
 
  683   bool publishPath(
const std::vector<geometry_msgs::Point>& path, 
colors color = 
RED, 
double radius = 0.01,
 
  684                    const std::string& ns = 
"Path");
 
  686                    const std::string& ns = 
"Path");
 
  688                    const std::string& ns = 
"Path");
 
  700                    const std::string& ns = 
"Path");
 
  703                    const std::string& ns = 
"Path");
 
  714                       const std::string& ns = 
"Polygon");
 
  729                               colors color = 
BLUE, 
const std::string& ns = 
"Wireframe Cuboid", std::size_t 
id = 0);
 
  742                               const Eigen::Vector3d& max_point, 
colors color = 
BLUE,
 
  743                               const std::string& ns = 
"Wireframe Cuboid", std::size_t 
id = 0);
 
  757                                  const Eigen::Vector3d& p2_in, 
const Eigen::Vector3d& p3_in,
 
  758                                  const Eigen::Vector3d& p4_in, 
colors color, 
scales scale);
 
  783   bool publishAxis(
const geometry_msgs::Pose& pose, 
double length, 
double radius = 0.01, 
const std::string& ns = 
"Axis");
 
  784   bool publishAxis(
const Eigen::Isometry3d& pose, 
double length, 
double radius = 0.01, 
const std::string& ns = 
"Axis");
 
  795   bool publishAxisInternal(
const Eigen::Isometry3d& pose, 
double length = 0.1, 
double radius = 0.01,
 
  796                            const std::string& ns = 
"Axis");
 
  808                        const std::string& ns = 
"Axis Path");
 
  810                        const std::string& ns = 
"Axis Path");
 
  821                        scales scale = 
MEDIUM, 
const std::string& ns = 
"Cylinder");
 
  822   bool publishCylinder(
const Eigen::Vector3d& point1, 
const Eigen::Vector3d& point2, 
colors color, 
double radius = 0.01,
 
  823                        const std::string& ns = 
"Cylinder");
 
  824   bool publishCylinder(
const Eigen::Vector3d& point1, 
const Eigen::Vector3d& point2, 
const std_msgs::ColorRGBA& color,
 
  825                        double radius = 0.01, 
const std::string& ns = 
"Cylinder");
 
  836                        const std::string& ns = 
"Cylinder");
 
  838                        const std::string& ns = 
"Cylinder");
 
  839   bool publishCylinder(
const geometry_msgs::Pose& pose, 
const std_msgs::ColorRGBA& color, 
double height = 0.1,
 
  840                        double radius = 0.01, 
const std::string& ns = 
"Cylinder");
 
  853   bool publishMesh(
const Eigen::Isometry3d& pose, 
const std::string& file_name, 
colors color = 
CLEAR, 
double scale = 1,
 
  854                    const std::string& ns = 
"mesh", std::size_t 
id = 0);
 
  856                    double scale = 1, 
const std::string& ns = 
"mesh", std::size_t 
id = 0);
 
  869   bool publishMesh(
const Eigen::Isometry3d& pose, 
const shape_msgs::Mesh& mesh, 
colors color = 
CLEAR, 
double scale = 1,
 
  870                    const std::string& ns = 
"mesh", std::size_t 
id = 0);
 
  872                    double scale = 1, 
const std::string& ns = 
"mesh", std::size_t 
id = 0);
 
  881   bool publishGraph(
const graph_msgs::GeometryGraph& graph, 
colors color, 
double radius);
 
  893                    bool static_id = 
true);
 
  894   bool publishText(
const Eigen::Isometry3d& pose, 
const std::string& text, 
colors color,
 
  895                    const geometry_msgs::Vector3 scale, 
bool static_id = 
true);
 
  898   bool publishText(
const geometry_msgs::Pose& pose, 
const std::string& text, 
colors color,
 
  899                    const geometry_msgs::Vector3 scale, 
bool static_id = 
true);
 
  906   static geometry_msgs::Pose 
convertPose(
const Eigen::Isometry3d& pose);
 
  913   static void convertPoseSafe(
const Eigen::Isometry3d& pose, geometry_msgs::Pose& pose_msg);
 
  921   static Eigen::Isometry3d 
convertPose(
const geometry_msgs::Pose& pose);
 
  928   static void convertPoseSafe(
const geometry_msgs::Pose& pose_msg, Eigen::Isometry3d& pose);
 
  958   static Eigen::Vector3d 
convertPoint(
const geometry_msgs::Point& point);
 
  966   static Eigen::Vector3d 
convertPoint32(
const geometry_msgs::Point32& point);
 
  974   static geometry_msgs::Point32 
convertPoint32(
const Eigen::Vector3d& point);
 
  982   static geometry_msgs::Point 
convertPoint(
const geometry_msgs::Vector3& point);
 
  990   static geometry_msgs::Point 
convertPoint(
const Eigen::Vector3d& point);
 
 1002   static Eigen::Isometry3d 
convertFromXYZRPY(
double tx, 
double ty, 
double tz, 
double rx, 
double ry, 
double rz,
 
 1004   static Eigen::Isometry3d 
convertFromXYZRPY(
const std::vector<double>& transform6,
 
 1015   static void convertToXYZRPY(
const Eigen::Isometry3d& pose, std::vector<double>& xyzrpy);
 
 1016   static void convertToXYZRPY(
const Eigen::Isometry3d& pose, 
double& x, 
double& y, 
double& z, 
double& roll,
 
 1017                               double& pitch, 
double& yaw);
 
 1029   static void generateRandomCuboid(geometry_msgs::Pose& cuboid_pose, 
double& depth, 
double& width, 
double& height,
 
 1046   static bool posesEqual(
const Eigen::Isometry3d& pose1, 
const Eigen::Isometry3d& pose2, 
double threshold = 0.000001);
 
 1051   static double dRand(
double min, 
double max);
 
 1052   static float fRand(
float min, 
float max);
 
 1053   static int iRand(
int min, 
int max);
 
 1088   void prompt(
const std::string& msg);
 
 1148   EIGEN_MAKE_ALIGNED_OPERATOR_NEW  
 
  
std::vector< Eigen::Isometry3d, Eigen::aligned_allocator< Eigen::Isometry3d > > vector_Isometry3d
 
std::vector< Eigen::Vector3d, Eigen::aligned_allocator< Eigen::Vector3d > > vector_Vector3d