Skip to content

Commit 25fac83

Browse files
mauropasseMauro Passerino
andcommitted
Fix IPC Actions data race (#147)
* Check if goal was sent through IPC before send responses * Add intra_process_action_server_is_available API to intra-process Client --------- Co-authored-by: Mauro Passerino <[email protected]>
1 parent 4c19071 commit 25fac83

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

rclcpp/include/rclcpp/experimental/action_client_intra_process_base.hpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,17 @@ class ActionClientIntraProcessBase : public rclcpp::Waitable
158158
event_info_multi_map_.erase(goal_id);
159159
}
160160

161+
bool has_goal_id(size_t goal_id) const
162+
{
163+
// Check if the intra-process client has this goal_id
164+
auto it = event_info_multi_map_.find(goal_id);
165+
if (it != event_info_multi_map_.end()) {
166+
return true;
167+
}
168+
169+
return false;
170+
}
171+
161172
private:
162173
std::string action_name_;
163174
QoS qos_profile_;

0 commit comments

Comments
 (0)