Skip to content

Commit fcff580

Browse files
authored
Merge pull request #386 from naturerobots/rviz-plugin-improvements
Rviz Plugin Improvements
2 parents bf2a232 + 01fe479 commit fcff580

2 files changed

Lines changed: 235 additions & 169 deletions

File tree

rviz_mbf_plugins/include/rviz_mbf_plugins/mbf_goal_actions_panel.hpp

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ class MbfGoalActionsPanel : public rviz_common::Panel
9797
void sendExePathGoal(const mbf_msgs::action::ExePath::Goal & goal);
9898
void exePathResultCallback(const ExePathClient::GoalHandle::WrappedResult & wrapped_result);
9999

100+
Q_SIGNALS:
101+
void getPathServerStatusChanged(const QString & text, const QString & style);
102+
void getPathGoalStatusChanged(const QString & text, const QString & style);
103+
void exePathServerStatusChanged(const QString & text, const QString & style);
104+
void exePathGoalStatusChanged(const QString & text, const QString & style);
105+
void goalInputStatusChanged(const QString & text);
106+
100107
private Q_SLOTS:
101108
void updateGoalInputSubscription();
102109
void updateGetPathActionClient();
@@ -110,7 +117,7 @@ private Q_SLOTS:
110117
rclcpp::Node::SharedPtr ros_node_;
111118

112119
//! Action client for getting a path
113-
std::mutex get_path_action_client_mutex_;
120+
mutable std::mutex get_path_action_client_mutex_;
114121
GetPathClient::SharedPtr action_client_get_path_;
115122
std::shared_ptr<rclcpp::AsyncParametersClient> planner_parameter_client_;
116123
std::string get_path_node_name_;
@@ -121,7 +128,7 @@ private Q_SLOTS:
121128
GetPathClient::GoalHandle::SharedPtr goal_handle_get_path_;
122129

123130
//! Action client for traversing a path
124-
std::mutex exe_path_action_client_mutex_;
131+
mutable std::mutex exe_path_action_client_mutex_;
125132
ExePathClient::SharedPtr action_client_exe_path_;
126133
std::shared_ptr<rclcpp::AsyncParametersClient> controller_parameter_client_;
127134
std::string exe_path_node_name_;
@@ -156,11 +163,13 @@ private Q_SLOTS:
156163
rviz_common::properties::RosActionProperty* exe_path_action_server_path_;
157164
rviz_common::properties::EditableEnumProperty* controller_name_property_;
158165

159-
160166
QGroupBox * goal_input_ui_box_;
161167
QVBoxLayout * goal_input_ui_layout_;
162168
QLabel * goal_input_status_;
163169

170+
void setGetPathServerStatusMessage(const QString & text, const QString& style);
171+
void setGetPathGoalStatusMessage(const QString & text, const QString& style);
172+
164173
QGroupBox * get_path_ui_box_;
165174
QVBoxLayout * get_path_ui_layout_;
166175
QHBoxLayout * get_path_ui_layout_server_status_;
@@ -171,6 +180,9 @@ private Q_SLOTS:
171180
QLabel * get_path_action_goal_status_;
172181
QPushButton * stop_get_path_button_;
173182

183+
void setExePathServerStatusMessage(const QString & text, const QString& style);
184+
void setExePathGoalStatusMessage(const QString & text, const QString& style);
185+
174186
QGroupBox * exe_path_ui_box_;
175187
QVBoxLayout * exe_path_ui_layout_;
176188
QHBoxLayout * exe_path_ui_layout_server_status_;

0 commit comments

Comments
 (0)