moveit_visual_tools.h
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2015, University of Colorado, Boulder
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of the Univ of CO, Boulder nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 
35 /* \author Dave Coleman
36  * \desc Helper functions for displaying and debugging MoveIt data in Rviz via published markers
37  * and MoveIt collision objects. Very useful for debugging complex software
38  */
39 
40 #ifndef MOVEIT_VISUAL_TOOLS_MOVEIT_VISUAL_TOOLS_H
41 #define MOVEIT_VISUAL_TOOLS_MOVEIT_VISUAL_TOOLS_H
42 
43 // Rviz Visualization Tool
45 
46 // MoveIt
48 // #include <moveit/macros/deprecation.h>
50 
51 // MoveIt Messages
52 #include <moveit_msgs/Grasp.h>
53 #include <moveit_msgs/DisplayRobotState.h>
54 #include <moveit_msgs/WorkspaceParameters.h>
55 #include <moveit_msgs/DisplayTrajectory.h>
56 
57 // ROS Messages
58 #include <trajectory_msgs/JointTrajectory.h>
59 
60 // C++
61 #include <map>
62 #include <string>
63 #include <vector>
64 
65 namespace moveit_visual_tools
66 {
67 // Default constants
68 static const std::string ROBOT_DESCRIPTION = "robot_description"; // this is the default used in ROS
69 static const std::string DISPLAY_PLANNED_PATH_TOPIC =
70  "/move_group/display_planned_path"; // this is the default when adding the Rviz plugin
71 static const std::string DISPLAY_ROBOT_STATE_TOPIC =
72  "display_robot_state"; // this is the default when adding the Rviz plugin
73 static const std::string PLANNING_SCENE_TOPIC = "planning_scene"; // this is the default when adding the Rviz plugin
74 
76 {
77 public:
85  MoveItVisualTools(const std::string& base_frame, const std::string& marker_topic,
86  planning_scene_monitor::PlanningSceneMonitorPtr psm);
87 
94  MoveItVisualTools(const std::string& base_frame,
95  const std::string& marker_topic = rviz_visual_tools::RVIZ_MARKER_TOPIC,
96  robot_model::RobotModelConstPtr robot_model = robot_model::RobotModelConstPtr());
97 
102  void setRobotStateTopic(const std::string& robot_state_topic)
103  {
104  robot_state_topic_ = robot_state_topic;
105  }
106 
111  void setPlanningSceneTopic(const std::string& planning_scene_topic)
112  {
113  planning_scene_topic_ = planning_scene_topic;
114  }
115 
121 
128  bool processCollisionObjectMsg(const moveit_msgs::CollisionObject& msg,
130 
136  bool processAttachedCollisionObjectMsg(const moveit_msgs::AttachedCollisionObject& msg);
137 
144  bool moveCollisionObject(const Eigen::Isometry3d& pose, const std::string& name,
145  const rviz_visual_tools::colors& color);
146  bool moveCollisionObject(const geometry_msgs::Pose& pose, const std::string& name,
147  const rviz_visual_tools::colors& color);
148 
154 
159  bool loadSharedRobotState();
160 
165  moveit::core::RobotStatePtr& getSharedRobotState();
166 
171  moveit::core::RobotStatePtr& getRootRobotState()
172  {
173  return root_robot_state_;
174  }
175 
180  moveit::core::RobotModelConstPtr getRobotModel();
181 
188  bool loadEEMarker(const robot_model::JointModelGroup* ee_jmg, const std::vector<double>& ee_joint_pos = {});
189 
193  void loadTrajectoryPub(const std::string& display_planned_path_topic = DISPLAY_PLANNED_PATH_TOPIC,
194  bool blocking = true);
195  void loadRobotStatePub(const std::string& robot_state_topic = "", bool blocking = true);
196 
201  void setPlanningSceneMonitor(planning_scene_monitor::PlanningSceneMonitorPtr psm)
202  {
203  psm_ = psm;
204  }
205 
210  void setManualSceneUpdating(bool enable_manual = true)
211  {
212  mannual_trigger_update_ = enable_manual;
213  }
214 
223  bool publishEEMarkers(const Eigen::Isometry3d& pose, const robot_model::JointModelGroup* ee_jmg,
224  const std::vector<double>& ee_joint_pos,
226  const std::string& ns = "end_effector")
227  {
228  return publishEEMarkers(convertPose(pose), ee_jmg, ee_joint_pos, color, ns);
229  }
230  bool publishEEMarkers(const Eigen::Isometry3d& pose, const robot_model::JointModelGroup* ee_jmg,
232  const std::string& ns = "end_effector")
233  {
234  return publishEEMarkers(convertPose(pose), ee_jmg, {}, color, ns);
235  }
236  bool publishEEMarkers(const geometry_msgs::Pose& pose, const robot_model::JointModelGroup* ee_jmg,
238  const std::string& ns = "end_effector")
239  {
240  return publishEEMarkers(pose, ee_jmg, {}, color, ns);
241  }
242  bool publishEEMarkers(const geometry_msgs::Pose& pose, const robot_model::JointModelGroup* ee_jmg,
243  const std::vector<double>& ee_joint_pos,
245  const std::string& ns = "end_effector");
246 
253  bool publishGrasps(const std::vector<moveit_msgs::Grasp>& possible_grasps, const robot_model::JointModelGroup* ee_jmg,
254  double animate_speed = 0.1);
255 
262  bool publishAnimatedGrasps(const std::vector<moveit_msgs::Grasp>& possible_grasps,
263  const robot_model::JointModelGroup* ee_jmg, double animate_speed = 0.01);
264 
272  bool publishAnimatedGrasp(const moveit_msgs::Grasp& grasp, const robot_model::JointModelGroup* ee_jmg,
273  double animate_speed);
274 
282  bool publishIKSolutions(const std::vector<trajectory_msgs::JointTrajectoryPoint>& ik_solutions,
283  const robot_model::JointModelGroup* arm_jmg, double display_time = 0.4);
284 
292 
298  bool cleanupCO(const std::string& name);
299 
305  bool cleanupACO(const std::string& name);
306 
313  bool attachCO(const std::string& name, const std::string& ee_parent_link);
314 
322  bool publishCollisionFloor(double z = 0.0, const std::string& plane_name = "Floor",
324 
333  bool publishCollisionBlock(const geometry_msgs::Pose& block_pose, const std::string& block_name = "block",
334  double block_size = 0.1,
336 
345  bool publishCollisionCuboid(const Eigen::Vector3d& point1, const Eigen::Vector3d& point2, const std::string& name,
347  bool publishCollisionCuboid(const geometry_msgs::Point& point1, const geometry_msgs::Point& point2,
348  const std::string& name,
350 
361  bool publishCollisionCuboid(const Eigen::Isometry3d& pose, double width, double depth, double height,
362  const std::string& name, const rviz_visual_tools::colors& color);
363 
364  bool publishCollisionCuboid(const geometry_msgs::Pose& pose, double width, double depth, double height,
365  const std::string& name, const rviz_visual_tools::colors& color);
366 
376  bool publishCollisionCylinder(const geometry_msgs::Point& a, const geometry_msgs::Point& b,
377  const std::string& object_name, double radius,
379  bool publishCollisionCylinder(const Eigen::Vector3d& a, const Eigen::Vector3d& b, const std::string& object_name,
380  double radius, const rviz_visual_tools::colors& color = rviz_visual_tools::GREEN);
381 
391  bool publishCollisionCylinder(const Eigen::Isometry3d& object_pose, const std::string& object_name, double radius,
392  double height, const rviz_visual_tools::colors& color = rviz_visual_tools::GREEN);
393  bool publishCollisionCylinder(const geometry_msgs::Pose& object_pose, const std::string& object_name, double radius,
394  double height, const rviz_visual_tools::colors& color = rviz_visual_tools::GREEN);
395 
404  bool publishCollisionMesh(const geometry_msgs::Pose& object_pose, const std::string& object_name,
405  const std::string& mesh_path,
407  bool publishCollisionMesh(const Eigen::Isometry3d& object_pose, const std::string& object_name,
408  const std::string& mesh_path,
410  bool publishCollisionMesh(const Eigen::Isometry3d& object_pose, const std::string& object_name,
411  const shape_msgs::Mesh& mesh_msg,
413  bool publishCollisionMesh(const geometry_msgs::Pose& object_pose, const std::string& object_name,
414  const shape_msgs::Mesh& mesh_msg,
416 
424  bool publishCollisionGraph(const graph_msgs::GeometryGraph& graph, const std::string& object_name, double radius,
426 
430  void getCollisionWallMsg(double x, double y, double z, double angle, double width, double height,
431  const std::string& name, moveit_msgs::CollisionObject& collision_obj);
432 
444  bool publishCollisionWall(double x, double y, double angle = 0.0, double width = 2.0, double height = 1.5,
445  const std::string& name = "wall",
447  bool publishCollisionWall(double x, double y, double z, double angle = 0.0, double width = 2.0, double height = 1.5,
448  const std::string& name = "wall",
450 
464  bool publishCollisionTable(double x, double y, double angle, double width, double height, double depth,
465  const std::string name, const rviz_visual_tools::colors& color = rviz_visual_tools::GREEN)
466  {
467  return publishCollisionTable(x, y, 0, angle, width, height, depth, name, color);
468  }
469 
470  bool publishCollisionTable(double x, double y, double z, double angle, double width, double height, double depth,
471  const std::string& name,
473 
480  bool loadCollisionSceneFromFile(const std::string& path);
481  bool loadCollisionSceneFromFile(const std::string& path, const Eigen::Isometry3d& offset);
482 
488  bool publishWorkspaceParameters(const moveit_msgs::WorkspaceParameters& params);
489 
500  bool checkAndPublishCollision(const moveit::core::RobotState& robot_state,
502  const rviz_visual_tools::colors& highlight_link_color = rviz_visual_tools::RED,
503  const rviz_visual_tools::colors& contact_point_color = rviz_visual_tools::PURPLE);
504 
512  bool publishContactPoints(const moveit::core::RobotState& robot_state,
513  const planning_scene::PlanningScene* planning_scene,
515 
524  const planning_scene::PlanningScene* planning_scene,
526 
538  bool publishTrajectoryPoint(const trajectory_msgs::JointTrajectoryPoint& trajectory_pt,
539  const std::string& planning_group, double display_time = 0.1);
540 
549  bool publishTrajectoryPath(const std::vector<moveit::core::RobotStatePtr>& trajectory,
550  const moveit::core::JointModelGroup* jmg, double speed = 0.01, bool blocking = false);
551  bool publishTrajectoryPath(const robot_trajectory::RobotTrajectoryPtr& trajectory, bool blocking = false);
552  bool publishTrajectoryPath(const robot_trajectory::RobotTrajectory& trajectory, bool blocking = false);
553  bool publishTrajectoryPath(const moveit_msgs::RobotTrajectory& trajectory_msg,
554  const moveit::core::RobotStateConstPtr& robot_state, bool blocking = false);
555  bool publishTrajectoryPath(const moveit_msgs::RobotTrajectory& trajectory_msg,
556  const moveit::core::RobotState& robot_state, bool blocking = false);
557  bool publishTrajectoryPath(const moveit_msgs::RobotTrajectory& trajectory_msg,
558  const moveit_msgs::RobotState& robot_state, bool blocking = false);
559  void publishTrajectoryPath(const moveit_msgs::DisplayTrajectory& display_trajectory_msg);
560 
569  bool publishTrajectoryLine(const moveit_msgs::RobotTrajectory& trajectory_msg,
570  const moveit::core::LinkModel* ee_parent_link, const robot_model::JointModelGroup* arm_jmg,
572  bool publishTrajectoryLine(const robot_trajectory::RobotTrajectoryPtr& robot_trajectory,
573  const moveit::core::LinkModel* ee_parent_link,
575  bool publishTrajectoryLine(const robot_trajectory::RobotTrajectory& robot_trajectory,
576  const moveit::core::LinkModel* ee_parent_link,
578 
587  bool publishTrajectoryLine(const moveit_msgs::RobotTrajectory& trajectory_msg,
588  const robot_model::JointModelGroup* arm_jmg,
590  bool publishTrajectoryLine(const robot_trajectory::RobotTrajectoryPtr& robot_trajectory,
591  const robot_model::JointModelGroup* arm_jmg,
593  bool publishTrajectoryLine(const robot_trajectory::RobotTrajectory& robot_trajectory,
594  const robot_model::JointModelGroup* arm_jmg,
596 
603  bool publishTrajectoryPoints(const std::vector<moveit::core::RobotStatePtr>& robot_state_trajectory,
604  const moveit::core::LinkModel* ee_parent_link,
606 
608  void enableRobotStateRootOffet(const Eigen::Isometry3d& offset);
609 
612 
620  bool publishRobotState(const trajectory_msgs::JointTrajectoryPoint& trajectory_pt,
621  const robot_model::JointModelGroup* jmg,
623 
631  bool publishRobotState(const std::vector<double>& joint_positions, const robot_model::JointModelGroup* jmg,
633 
642  bool publishRobotState(const moveit::core::RobotState& robot_state,
644  const std::vector<std::string>& highlight_links = {});
645  bool publishRobotState(const moveit::core::RobotStatePtr& robot_state,
647  const std::vector<std::string>& highlight_links = {});
648  void publishRobotState(const moveit_msgs::DisplayRobotState& display_robot_state_msg);
649 
654  bool hideRobot();
655 
657  static bool applyVirtualJointTransform(moveit::core::RobotState& robot_state, const Eigen::Isometry3d& offset);
658 
663  void showJointLimits(const moveit::core::RobotStatePtr& robot_state);
664 
669  planning_scene_monitor::PlanningSceneMonitorPtr getPlanningSceneMonitor();
670 
671 private:
676  static bool checkForVirtualJoint(const moveit::core::RobotState& robot_state);
677 
678 protected:
679  // Pointer to a Planning Scene Monitor
680  planning_scene_monitor::PlanningSceneMonitorPtr psm_;
681 
682  // Prevent the planning scene from always auto-pushing, but rather do it manually
684 
685  // ROS topic names to use when starting publishers
686  std::string robot_state_topic_;
688 
689  // ROS publishers
690  ros::Publisher pub_display_path_; // for MoveIt trajectories
691  ros::Publisher pub_robot_state_; // publish a RobotState message
692 
693  robot_model_loader::RobotModelLoaderPtr rm_loader_; // so that we can specify our own options
694 
695  // End Effector Markers
696  std::map<const robot_model::JointModelGroup*, visualization_msgs::MarkerArray> ee_markers_map_;
697  std::map<const robot_model::JointModelGroup*, EigenSTL::vector_Isometry3d> ee_poses_map_;
698  std::map<const robot_model::JointModelGroup*, std::vector<double> > ee_joint_pos_map_;
699 
700  // Cached robot state marker - cache the colored links.
701  // Note: Only allows colors provided in rviz_visual_tools to prevent too many robot state messages from being loaded
702  // and ensuring efficiency
703  std::map<rviz_visual_tools::colors, moveit_msgs::DisplayRobotState> display_robot_msgs_;
704 
705  // Pointer to the robot model
706  moveit::core::RobotModelConstPtr robot_model_;
707 
708  // Note: call loadSharedRobotState() before using this
709  moveit::core::RobotStatePtr shared_robot_state_;
710 
711  // Note: call loadSharedRobotState() before using this. Use only for hiding the robot
712  moveit::core::RobotStatePtr hidden_robot_state_;
713 
714  // A robot state whose virtual_joint remains at identity so that getGlobalLinkTransform() isn't tainted
715  // Note: call loadSharedRobotState() before using this
716  moveit::core::RobotStatePtr root_robot_state_;
717 
718  // Optional offset that can be applied to all outgoing/published robot states
720  Eigen::Isometry3d robot_state_root_offset_;
721 
722 public:
723  EIGEN_MAKE_ALIGNED_OPERATOR_NEW // http://eigen.tuxfamily.org/dox/group__TopicStructHavingEigenMembers.html
724 }; // class
725 
726 typedef std::shared_ptr<MoveItVisualTools> MoveItVisualToolsPtr;
727 typedef std::shared_ptr<const MoveItVisualTools> MoveItVisualToolsConstPtr;
728 
729 } // namespace moveit_visual_tools
730 
731 #endif // MOVEIT_VISUAL_TOOLS_MOVEIT_VISUAL_TOOLS_H
moveit::core::RobotStatePtr & getRootRobotState()
Allow robot state to be altered.
static const std::string DISPLAY_ROBOT_STATE_TOPIC
bool hideRobot()
Fake removing a Robot State display in Rviz by simply moving it very far away.
#define RVIZ_VISUAL_TOOLS_DEPRECATED
std::shared_ptr< MoveItVisualTools > MoveItVisualToolsPtr
bool publishCollisionCylinder(const geometry_msgs::Point &a, const geometry_msgs::Point &b, const std::string &object_name, double radius, const rviz_visual_tools::colors &color=rviz_visual_tools::GREEN)
Create a MoveIt Collision cylinder between two points.
planning_scene_monitor::PlanningSceneMonitorPtr getPlanningSceneMonitor()
Get the planning scene monitor that this class is using.
void setPlanningSceneTopic(const std::string &planning_scene_topic)
Set the planning scene topic.
bool publishTrajectoryLine(const moveit_msgs::RobotTrajectory &trajectory_msg, const moveit::core::LinkModel *ee_parent_link, const robot_model::JointModelGroup *arm_jmg, const rviz_visual_tools::colors &color=rviz_visual_tools::LIME_GREEN)
Display a line of the end effector path from a robot trajectory path.
MoveItVisualTools(const std::string &base_frame, const std::string &marker_topic, planning_scene_monitor::PlanningSceneMonitorPtr psm)
Constructor.
void getCollisionWallMsg(double x, double y, double z, double angle, double width, double height, const std::string &name, moveit_msgs::CollisionObject &collision_obj)
Helper for publishCollisionWall.
moveit::core::RobotModelConstPtr robot_model_
robot_model_loader::RobotModelLoaderPtr rm_loader_
moveit::core::RobotStatePtr root_robot_state_
bool attachCO(const std::string &name, const std::string &ee_parent_link)
Attach a collision object from the planning scene.
void showJointLimits(const moveit::core::RobotStatePtr &robot_state)
Print to console the current robot state&#39;s joint values within its limits visually.
bool publishTrajectoryPath(const std::vector< moveit::core::RobotStatePtr > &trajectory, const moveit::core::JointModelGroup *jmg, double speed=0.01, bool blocking=false)
Animate trajectory in rviz. These functions do not need a trigger() called because use different publ...
void enableRobotStateRootOffet(const Eigen::Isometry3d &offset)
All published robot states will have their virtual joint moved by offset.
bool publishCollisionMesh(const geometry_msgs::Pose &object_pose, const std::string &object_name, const std::string &mesh_path, const rviz_visual_tools::colors &color=rviz_visual_tools::GREEN)
Create a collision object using a mesh.
bool loadCollisionSceneFromFile(const std::string &path)
Load a planning scene to a planning_scene_monitor from file.
bool processCollisionObjectMsg(const moveit_msgs::CollisionObject &msg, const rviz_visual_tools::colors &color=rviz_visual_tools::GREEN)
Skip a ROS message call by sending directly to planning scene monitor.
bool publishEEMarkers(const Eigen::Isometry3d &pose, const robot_model::JointModelGroup *ee_jmg, const std::vector< double > &ee_joint_pos, const rviz_visual_tools::colors &color=rviz_visual_tools::CLEAR, const std::string &ns="end_effector")
Publish an end effector to rviz.
bool cleanupACO(const std::string &name)
Remove an active collision object from the planning scene.
std::map< rviz_visual_tools::colors, moveit_msgs::DisplayRobotState > display_robot_msgs_
std::map< const robot_model::JointModelGroup *, std::vector< double > > ee_joint_pos_map_
bool publishTrajectoryPoint(const trajectory_msgs::JointTrajectoryPoint &trajectory_pt, const std::string &planning_group, double display_time=0.1)
Move a joint group in MoveIt for visualization make sure you have already set the planning group name...
std::map< const robot_model::JointModelGroup *, visualization_msgs::MarkerArray > ee_markers_map_
bool publishCollisionWall(double x, double y, double angle=0.0, double width=2.0, double height=1.5, const std::string &name="wall", const rviz_visual_tools::colors &color=rviz_visual_tools::GREEN)
Publish a typical room wall.
bool loadEEMarker(const robot_model::JointModelGroup *ee_jmg, const std::vector< double > &ee_joint_pos={})
Call this once at begining to load the end effector markers and then whenever a joint changes...
double y
TFSIMD_FORCE_INLINE tfScalar angle(const Quaternion &q1, const Quaternion &q2)
planning_scene_monitor::PlanningSceneMonitorPtr psm_
moveit::core::RobotStatePtr hidden_robot_state_
void setRobotStateTopic(const std::string &robot_state_topic)
Set the ROS topic for publishing a robot state.
void setManualSceneUpdating(bool enable_manual=true)
Prevent the planning scene from always auto-pushing, but rather do it manually.
std::map< std::pair< std::string, std::string >, std::vector< Contact > > ContactMap
bool publishWorkspaceParameters(const moveit_msgs::WorkspaceParameters &params)
Display size of workspace used for planning with OMPL, etc. Important for virtual joints...
static bool applyVirtualJointTransform(moveit::core::RobotState &robot_state, const Eigen::Isometry3d &offset)
Before publishing a robot state, optionally change its root transform.
bool publishCollisionBlock(const geometry_msgs::Pose &block_pose, const std::string &block_name="block", double block_size=0.1, const rviz_visual_tools::colors &color=rviz_visual_tools::GREEN)
Create a MoveIt Collision block at the given pose.
void setPlanningSceneMonitor(planning_scene_monitor::PlanningSceneMonitorPtr psm)
Allow a pre-configured planning scene monitor to be set for publishing collision objects, etc.
bool loadPlanningSceneMonitor()
Load a planning scene monitor if one was not passed into the constructor.
std::map< const robot_model::JointModelGroup *, EigenSTL::vector_Isometry3d > ee_poses_map_
bool publishAnimatedGrasp(const moveit_msgs::Grasp &grasp, const robot_model::JointModelGroup *ee_jmg, double animate_speed)
Animate a single grasp in its movement direction.
bool processAttachedCollisionObjectMsg(const moveit_msgs::AttachedCollisionObject &msg)
Skip a ROS message call by sending directly to planning scene monitor.
static bool checkForVirtualJoint(const moveit::core::RobotState &robot_state)
Error check that the robot&#39;s SRDF was properly setup with a virtual joint that was named a certain wa...
bool publishAnimatedGrasps(const std::vector< moveit_msgs::Grasp > &possible_grasps, const robot_model::JointModelGroup *ee_jmg, double animate_speed=0.01)
Display an animated vector of grasps including its approach movement in Rviz.
bool checkAndPublishCollision(const moveit::core::RobotState &robot_state, const planning_scene::PlanningScene *planning_scene, const rviz_visual_tools::colors &highlight_link_color=rviz_visual_tools::RED, const rviz_visual_tools::colors &contact_point_color=rviz_visual_tools::PURPLE)
Check if the robot state is in collision inside the planning scene and visualize the result...
double z
bool removeAllCollisionObjects()
Remove all collision objects that this class has added to the MoveIt planning scene Communicates dire...
moveit::core::RobotModelConstPtr getRobotModel()
Get a pointer to the robot model.
moveit::core::RobotStatePtr & getSharedRobotState()
Allow robot state to be altered.
bool publishIKSolutions(const std::vector< trajectory_msgs::JointTrajectoryPoint > &ik_solutions, const robot_model::JointModelGroup *arm_jmg, double display_time=0.4)
Display an vector of inverse kinematic solutions for the IK service in Rviz Note: this is published t...
bool cleanupCO(const std::string &name)
Remove a collision object from the planning scene.
bool publishEEMarkers(const Eigen::Isometry3d &pose, const robot_model::JointModelGroup *ee_jmg, const rviz_visual_tools::colors &color=rviz_visual_tools::CLEAR, const std::string &ns="end_effector")
bool publishContactPoints(const moveit::core::RobotState &robot_state, const planning_scene::PlanningScene *planning_scene, const rviz_visual_tools::colors &color=rviz_visual_tools::RED)
Given a planning scene and robot state, publish any collisions.
void loadRobotStatePub(const std::string &robot_state_topic="", bool blocking=true)
moveit::core::RobotStatePtr shared_robot_state_
bool publishCollisionGraph(const graph_msgs::GeometryGraph &graph, const std::string &object_name, double radius, const rviz_visual_tools::colors &color=rviz_visual_tools::GREEN)
Publish a connected birectional graph.
bool publishTrajectoryPoints(const std::vector< moveit::core::RobotStatePtr > &robot_state_trajectory, const moveit::core::LinkModel *ee_parent_link, const rviz_visual_tools::colors &color=rviz_visual_tools::YELLOW)
Display trajectory as series of end effector position points.
static const std::string RVIZ_MARKER_TOPIC
bool moveCollisionObject(const Eigen::Isometry3d &pose, const std::string &name, const rviz_visual_tools::colors &color)
Move an already published collision object to a new locaiton in space.
RVIZ_VISUAL_TOOLS_DEPRECATED bool publishCollisionTable(double x, double y, double angle, double width, double height, double depth, const std::string name, const rviz_visual_tools::colors &color=rviz_visual_tools::GREEN)
Publish a typical room table.
static const std::string ROBOT_DESCRIPTION
static const std::string PLANNING_SCENE_TOPIC
bool publishEEMarkers(const geometry_msgs::Pose &pose, const robot_model::JointModelGroup *ee_jmg, const rviz_visual_tools::colors &color=rviz_visual_tools::CLEAR, const std::string &ns="end_effector")
bool publishCollisionFloor(double z=0.0, const std::string &plane_name="Floor", const rviz_visual_tools::colors &color=rviz_visual_tools::GREEN)
Make the floor a collision object.
void loadTrajectoryPub(const std::string &display_planned_path_topic=DISPLAY_PLANNED_PATH_TOPIC, bool blocking=true)
Load publishers as needed.
bool publishRobotState(const trajectory_msgs::JointTrajectoryPoint &trajectory_pt, const robot_model::JointModelGroup *jmg, const rviz_visual_tools::colors &color=rviz_visual_tools::DEFAULT)
Publish a MoveIt robot state to a topic that the Rviz "RobotState" display can show.
double x
void disableRobotStateRootOffet()
Turn off the root offset feature.
bool loadSharedRobotState()
Load robot state only as needed.
static geometry_msgs::Pose convertPose(const Eigen::Isometry3d &pose)
bool triggerPlanningSceneUpdate()
When mannual_trigger_update_ is true, use this to tell the planning scene to send an update out...
static const std::string DISPLAY_PLANNED_PATH_TOPIC
std::shared_ptr< const MoveItVisualTools > MoveItVisualToolsConstPtr
bool publishGrasps(const std::vector< moveit_msgs::Grasp > &possible_grasps, const robot_model::JointModelGroup *ee_jmg, double animate_speed=0.1)
Show grasps generated from moveit_simple_grasps or other MoveIt Grasp message sources.
bool publishCollisionCuboid(const Eigen::Vector3d &point1, const Eigen::Vector3d &point2, const std::string &name, const rviz_visual_tools::colors &color=rviz_visual_tools::GREEN)
Create a MoveIt collision rectangular cuboid at the given pose.


moveit_visual_tools
Author(s): Dave Coleman
autogenerated on Mon Feb 28 2022 22:51:25