39 #include <rviz_common/display.hpp>
40 #include <rviz_default_plugins/robot/robot.hpp>
41 #include <rviz_common/properties/string_property.hpp>
42 #include <rviz_common/properties/ros_topic_property.hpp>
47 #include <rclcpp/rclcpp.hpp>
50 #include <moveit_planning_scene_rviz_plugin_core_export.h>
64 class RosTopicProperty;
79 void load(
const rviz_common::Config& config)
override;
80 void save(rviz_common::Config config)
const override;
82 void update(
float wall_dt,
float ros_dt)
override;
83 void reset()
override;
85 void setLinkColor(
const std::string& link_name,
const QColor& color);
86 void unsetLinkColor(
const std::string& link_name);
88 void queueRenderSceneGeometry();
92 void addBackgroundJob(
const std::function<
void()>& job,
const std::string&
name);
98 void spawnBackgroundJob(
const std::function<
void()>& job);
101 void addMainLoopJob(
const std::function<
void()>& job);
103 void waitForAllMainLoopJobs();
108 const std::string getMoveGroupNS()
const;
109 const moveit::core::RobotModelConstPtr& getRobotModel()
const;
112 bool waitForCurrentRobotState(
const rclcpp::Time& t);
117 const planning_scene_monitor::PlanningSceneMonitorPtr& getPlanningSceneMonitor();
124 void changedMoveGroupNS();
125 void changedRobotDescription();
126 void changedSceneName();
127 void changedSceneEnabled();
128 void changedSceneRobotVisualEnabled();
129 void changedSceneRobotCollisionEnabled();
130 void changedRobotSceneAlpha();
131 void changedSceneAlpha();
132 void changedSceneColor();
133 void changedPlanningSceneTopic();
134 void changedSceneDisplayTime();
135 void changedOctreeRenderMode();
136 void changedOctreeColorMode();
137 void setSceneName(
const QString&
name);
140 virtual void changedAttachedBodyColor();
145 void loadRobotModel();
149 virtual void clearRobotModel();
153 virtual planning_scene_monitor::PlanningSceneMonitorPtr createPlanningSceneMonitor();
156 virtual void onRobotModelLoaded();
158 virtual void onNewPlanningSceneState();
163 void calculateOffsetPosition();
165 void executeMainLoopJobs();
167 void renderPlanningScene();
168 void setLinkColor(rviz_default_plugins::robot::Robot*
robot,
const std::string& link_name,
const QColor& color);
169 void unsetLinkColor(rviz_default_plugins::robot::Robot*
robot,
const std::string& link_name);
170 void setGroupColor(rviz_default_plugins::robot::Robot*
robot,
const std::string& group_name,
const QColor& color);
171 void unsetGroupColor(rviz_default_plugins::robot::Robot*
robot,
const std::string& group_name);
172 void unsetAllColors(rviz_default_plugins::robot::Robot*
robot);
175 void onInitialize()
override;
176 void onEnable()
override;
177 void onDisable()
override;
178 void fixedFrameChanged()
override;
181 virtual void updateInternal(
float wall_dt,
float ros_dt);
rviz_common::properties::Property * scene_category_
rviz_common::properties::EnumProperty * octree_coloring_property_
rviz_common::properties::StringProperty * robot_description_property_
rviz_common::properties::BoolProperty * scene_robot_collision_enabled_property_
rclcpp::Node::SharedPtr node_
rviz_common::properties::ColorProperty * attached_body_color_property_
rviz_common::properties::EnumProperty * octree_render_property_
PlanningSceneRenderPtr planning_scene_render_
std::deque< std::function< void()> > main_loop_jobs_
std::mutex main_loop_jobs_lock_
rviz_common::properties::FloatProperty * scene_alpha_property_
bool planning_scene_needs_render_
RobotStateVisualizationPtr planning_scene_robot_
float current_scene_time_
rviz_common::properties::FloatProperty * robot_alpha_property_
planning_scene_monitor::PlanningSceneMonitorPtr planning_scene_monitor_
rviz_common::properties::StringProperty * move_group_ns_property_
rviz_common::properties::StringProperty * scene_name_property_
rviz_common::properties::FloatProperty * scene_display_time_property_
rviz_common::properties::BoolProperty * scene_robot_visual_enabled_property_
rviz_common::properties::Property * robot_category_
rviz_common::properties::RosTopicProperty * planning_scene_topic_property_
Ogre::SceneNode * planning_scene_node_
displays planning scene with everything in it
rviz_common::properties::BoolProperty * scene_enabled_property_
std::mutex robot_model_loading_lock_
rviz_common::properties::ColorProperty * scene_color_property_
bool robot_state_needs_render_
moveit::tools::BackgroundProcessing background_process_
std::condition_variable main_loop_jobs_empty_condition_
This is a convenience class for obtaining access to an instance of a locked PlanningScene.
This is a convenience class for obtaining access to an instance of a locked PlanningScene.