@@ -59,7 +59,7 @@ template<typename ActionT>
5959std::shared_future<typename ClientGoalHandle<ActionT>::WrappedResult>
6060ClientGoalHandle<ActionT>::async_get_result()
6161{
62- std::lock_guard<std::recursive_mutex > guard (handle_mutex_);
62+ std::lock_guard<std::mutex > guard (handle_mutex_);
6363 if (!is_result_aware_) {
6464 throw exceptions::UnawareGoalHandleError ();
6565 }
@@ -70,7 +70,7 @@ template<typename ActionT>
7070void
7171ClientGoalHandle<ActionT>::set_result(const WrappedResult & wrapped_result)
7272{
73- std::lock_guard<std::recursive_mutex > guard (handle_mutex_);
73+ std::lock_guard<std::mutex > guard (handle_mutex_);
7474 status_ = static_cast <int8_t >(wrapped_result.code );
7575 result_promise_.set_value (wrapped_result);
7676 if (result_callback_) {
@@ -82,55 +82,55 @@ template<typename ActionT>
8282void
8383ClientGoalHandle<ActionT>::set_feedback_callback(FeedbackCallback callback)
8484{
85- std::lock_guard<std::recursive_mutex > guard (handle_mutex_);
85+ std::lock_guard<std::mutex > guard (handle_mutex_);
8686 feedback_callback_ = callback;
8787}
8888
8989template <typename ActionT>
9090void
9191ClientGoalHandle<ActionT>::set_result_callback(ResultCallback callback)
9292{
93- std::lock_guard<std::recursive_mutex > guard (handle_mutex_);
93+ std::lock_guard<std::mutex > guard (handle_mutex_);
9494 result_callback_ = callback;
9595}
9696
9797template <typename ActionT>
9898int8_t
9999ClientGoalHandle<ActionT>::get_status()
100100{
101- std::lock_guard<std::recursive_mutex > guard (handle_mutex_);
101+ std::lock_guard<std::mutex > guard (handle_mutex_);
102102 return status_;
103103}
104104
105105template <typename ActionT>
106106void
107107ClientGoalHandle<ActionT>::set_status(int8_t status)
108108{
109- std::lock_guard<std::recursive_mutex > guard (handle_mutex_);
109+ std::lock_guard<std::mutex > guard (handle_mutex_);
110110 status_ = status;
111111}
112112
113113template <typename ActionT>
114114bool
115115ClientGoalHandle<ActionT>::is_feedback_aware()
116116{
117- std::lock_guard<std::recursive_mutex > guard (handle_mutex_);
117+ std::lock_guard<std::mutex > guard (handle_mutex_);
118118 return feedback_callback_ != nullptr ;
119119}
120120
121121template <typename ActionT>
122122bool
123123ClientGoalHandle<ActionT>::is_result_aware()
124124{
125- std::lock_guard<std::recursive_mutex > guard (handle_mutex_);
125+ std::lock_guard<std::mutex > guard (handle_mutex_);
126126 return is_result_aware_;
127127}
128128
129129template <typename ActionT>
130130bool
131131ClientGoalHandle<ActionT>::set_result_awareness(bool awareness)
132132{
133- std::lock_guard<std::recursive_mutex > guard (handle_mutex_);
133+ std::lock_guard<std::mutex > guard (handle_mutex_);
134134 bool previous = is_result_aware_;
135135 is_result_aware_ = awareness;
136136 return previous;
@@ -140,7 +140,7 @@ template<typename ActionT>
140140void
141141ClientGoalHandle<ActionT>::invalidate(const exceptions::UnawareGoalHandleError & ex)
142142{
143- std::lock_guard<std::recursive_mutex > guard (handle_mutex_);
143+ std::lock_guard<std::mutex > guard (handle_mutex_);
144144 // Guard against multiple calls
145145 if (is_invalidated ()) {
146146 return ;
@@ -168,7 +168,7 @@ ClientGoalHandle<ActionT>::call_feedback_callback(
168168 RCLCPP_ERROR (rclcpp::get_logger (" rclcpp_action" ), " Sent feedback to wrong goal handle." );
169169 return ;
170170 }
171- std::lock_guard<std::recursive_mutex > guard (handle_mutex_);
171+ std::lock_guard<std::mutex > guard (handle_mutex_);
172172 if (nullptr == feedback_callback_) {
173173 // Normal, some feedback messages may arrive after the goal result.
174174 RCLCPP_DEBUG (rclcpp::get_logger (" rclcpp_action" ), " Received feedback but goal ignores it." );
0 commit comments