6 #include "../core/document.h" 7 #include "../core/loader.h" 8 #include "../core/timeseries.h" 9 #include "../core/topic.h" 10 #include "../core/watcher.h" 12 #include "../render/renderer.h" 13 #include "../render/resource.h" 18 #include <moveit_msgs/DisplayRobotState.h> 19 #include <moveit_msgs/DisplayTrajectory.h> 20 #include <sensor_msgs/JointState.h> 22 #include <condition_variable> 29 DECLARE_STRUCT_PROPERTY(
bool, recomputeNormals,
false);
30 DECLARE_STRUCT_PROPERTY(
bool, smoothNormals,
false);
34 return (a.recomputeNormals() == b.recomputeNormals()) &&
35 (a.smoothNormals() == b.smoothNormals());
39 return std::make_tuple(a.recomputeNormals() == a.smoothNormals()) <
40 std::make_tuple(b.recomputeNormals() == b.smoothNormals());
47 STRUCT_PROPERTY(recomputeNormals);
48 STRUCT_PROPERTY(smoothNormals);
53 std::shared_ptr<Loader<RobotModel>> _robot_model_loader;
54 std::shared_ptr<RobotState> _robot_state;
55 Eigen::Isometry3d pose_temp = Eigen::Isometry3d::Identity();
56 EventFlag _invalidated{ResourceEvents::instance().reload};
58 std::shared_ptr<MaterialOverride> _material_override =
59 std::make_shared<MaterialOverride>();
65 PROPERTY(std::shared_ptr<MaterialOverride>, materialOverride,
67 PROPERTY(std::string, description,
"/robot_description");
69 PROPERTY(
bool, doubleSided,
false);
76 std::shared_ptr<TimeSeriesSubscriber> _subscriber;
77 std::shared_ptr<RobotStateTimeSeriesListener> _listener;
80 virtual void refreshTopic(
const std::string &topic);
92 virtual void refresh()
override {
93 refreshTopic(topic().topic());
94 RobotStateDisplayBase::refresh();
119 "/display_robot_state");
140 std::vector<std::pair<double, std::shared_ptr<RobotState>>> _trajectory;
141 std::shared_ptr<const moveit_msgs::DisplayTrajectory>
142 _display_trajectory_message;
144 bool _show_all =
false;
145 double _frame_time = 0;
146 bool _update_show_all =
false;
147 std::thread _update_thread;
148 std::condition_variable _update_condition;
149 std::mutex _update_mutex;
150 std::vector<double> _update_times;
151 volatile size_t _frame_update = 0;
152 volatile bool _update_exit =
false;
153 Watcher _update_parameter_watcher;
154 double _update_speed = 1;
158 "/move_group/display_planned_path");
159 PROPERTY(
int, maxSteps, 10, min = 1);
160 PROPERTY(
bool, showAllStates,
false);
161 PROPERTY(
double, speed, 1, min = 0);
172 std::shared_ptr<Transformer> _transformer;