37 #ifndef MOVEIT_MOTION_PLANNING_RVIZ_PLUGIN_MOTION_PLANNING_DISPLAY_ 38 #define MOVEIT_MOTION_PLANNING_RVIZ_PLUGIN_MOTION_PLANNING_DISPLAY_ 57 #include <std_msgs/String.h> 58 #include <moveit_msgs/DisplayTrajectory.h> 76 class RosTopicProperty;
77 class EditableEnumProperty;
96 virtual void update(
float wall_dt,
float ros_dt);
99 void setName(
const QString&
name);
103 return query_start_state_->getState();
108 return query_goal_state_->getState();
113 return robot_interaction_;
118 return query_start_state_;
123 return query_goal_state_;
128 trajectory_visual_->dropTrajectory();
131 void setQueryStartState(
const robot_state::RobotState& start);
132 void setQueryGoalState(
const robot_state::RobotState& goal);
134 void updateQueryStartState();
135 void updateQueryGoalState();
137 void useApproximateIK(
bool flag);
140 void clearPlaceLocationsDisplay();
141 void visualizePlaceLocations(
const std::vector<geometry_msgs::PoseStamped>& place_poses);
144 std::string getCurrentPlanningGroup()
const;
146 void changePlanningGroup(
const std::string& group);
148 void addStatusText(
const std::string& text);
149 void addStatusText(
const std::vector<std::string>& text);
150 void setStatusTextColor(
const QColor& color);
151 void resetStatusTextColor();
153 void toggleSelectPlanningGroupSubscription(
bool enable);
161 void changedQueryStartState();
162 void changedQueryGoalState();
163 void changedQueryMarkerScale();
164 void changedQueryStartColor();
165 void changedQueryGoalColor();
166 void changedQueryStartAlpha();
167 void changedQueryGoalAlpha();
168 void changedQueryCollidingLinkColor();
169 void changedQueryJointViolationColor();
170 void changedAttachedBodyColor()
override;
171 void changedPlanningGroup();
172 void changedShowWeightLimit();
173 void changedShowManipulabilityIndex();
174 void changedShowManipulability();
175 void changedShowJointTorques();
176 void changedMetricsSetPayload();
177 void changedMetricsTextHeight();
178 void changedWorkspace();
179 void resetInteractiveMarkers();
180 void motionPanelVisibilityChange(
bool enable);
189 virtual void onRobotModelLoaded();
191 virtual void updateInternal(
float wall_dt,
float ros_dt);
193 void renderWorkspaceBox();
194 void updateLinkColors();
196 void displayTable(
const std::map<std::string, double>& values,
const Ogre::ColourValue& color,
197 const Ogre::Vector3& pos,
const Ogre::Quaternion& orient);
198 void displayMetrics(
bool start);
200 void executeMainLoopJobs();
201 void publishInteractiveMarkers(
bool pose_update);
203 void recomputeQueryStartStateMetrics();
204 void recomputeQueryGoalStateMetrics();
205 void drawQueryStartState();
206 void drawQueryGoalState();
208 bool error_state_changed);
210 bool error_state_changed);
212 bool isIKSolutionCollisionFree(robot_state::RobotState* state,
const robot_state::JointModelGroup* group,
213 const double* ik_solution)
const;
215 void computeMetrics(
bool start,
const std::string& group,
double payload);
216 void computeMetricsInternal(std::map<std::string, double>& metrics,
218 const robot_state::RobotState& state,
double payload);
219 void updateStateExceptModified(robot_state::RobotState& dest,
const robot_state::RobotState& src);
220 void updateBackgroundJobProgressBar();
223 void setQueryStateHelper(
bool use_start_state,
const std::string& v);
224 void populateMenuHandler(std::shared_ptr<interactive_markers::MenuHandler>& mh);
226 void selectPlanningGroupCallback(
const std_msgs::StringConstPtr& msg);
229 virtual void onInitialize();
230 virtual void onEnable();
231 virtual void onDisable();
232 virtual void fixedFrameChanged();
::robot_interaction::InteractionHandlerPtr InteractionHandlerPtr
rviz::FloatProperty * query_marker_scale_property_
rviz::FloatProperty * query_goal_alpha_property_
rviz::BoolProperty * show_joint_torques_property_
kinematics_metrics::KinematicsMetricsPtr kinematics_metrics_
std::shared_ptr< interactive_markers::MenuHandler > menu_handler_start_
RobotStateVisualizationPtr query_robot_start_
Handles drawing the robot at the start configuration.
rviz::ColorProperty * query_colliding_link_color_property_
MotionPlanningFrame * frame_
rviz::BoolProperty * show_workspace_property_
robot_state::RobotStateConstPtr getQueryStartState() const
std::map< std::string, LinkDisplayStatus > status_links_start_
rviz::ColorProperty * query_start_color_property_
rviz::BoolProperty * query_goal_state_property_
rviz::Property * metrics_category_
ros::NodeHandle private_handle_
rviz::Display * int_marker_display_
rviz::FloatProperty * metrics_set_payload_property_
std::shared_ptr< interactive_markers::MenuHandler > menu_handler_goal_
std::vector< std::shared_ptr< rviz::Shape > > place_locations_display_
void update(const std::string &key, const XmlRpc::XmlRpcValue &v)
std::map< std::string, bool > position_only_ik_
Some groups use position only ik, calls to the metrics have to be modified appropriately.
void dropVisualizedTrajectory()
robot_interaction::RobotInteractionPtr robot_interaction_
std::unique_ptr< rviz::Shape > workspace_box_
TrajectoryVisualizationPtr trajectory_visual_
rviz::PanelDockWidget * frame_dock_
bool text_display_for_start_
indicates whether the text display is for the start state or not
rviz::ColorProperty * query_goal_color_property_
robot_interaction::RobotInteraction::InteractionHandlerPtr query_start_state_
rviz::EditableEnumProperty * planning_group_property_
std::map< std::string, dynamics_solver::DynamicsSolverPtr > dynamics_solver_
rviz::FloatProperty * query_start_alpha_property_
rviz::BoolProperty * show_manipulability_property_
rviz::MovableText * text_to_display_
const robot_interaction::RobotInteractionPtr & getRobotInteraction() const
rviz::BoolProperty * query_start_state_property_
robot_state::RobotStateConstPtr getQueryGoalState() const
boost::mutex update_metrics_lock_
std::set< std::string > modified_groups_
RobotStateVisualizationPtr query_robot_goal_
Handles drawing the robot at the goal configuration.
ros::Subscriber planning_group_sub_
rviz::Property * path_category_
rviz::BoolProperty * show_manipulability_index_property_
rviz::BoolProperty * compute_weight_limit_property_
const robot_interaction::RobotInteraction::InteractionHandlerPtr & getQueryGoalStateHandler() const
const robot_interaction::RobotInteraction::InteractionHandlerPtr & getQueryStartStateHandler() const
robot_interaction::RobotInteraction::InteractionHandlerPtr query_goal_state_
rviz::FloatProperty * metrics_text_height_property_
std::map< std::pair< bool, std::string >, std::map< std::string, double > > computed_metrics_
Ogre::SceneNode * text_display_scene_node_
displays texts
std::map< std::string, LinkDisplayStatus > status_links_goal_
rviz::ColorProperty * query_outside_joint_limits_link_color_property_
rviz::Property * plan_category_