Skip to content

Commit

Permalink
Fix IPC Actions data race (irobot-ros#147)
Browse files Browse the repository at this point in the history
* 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 <mpasserino@irobot.com>
  • Loading branch information
mauropasse and Mauro Passerino committed Aug 8, 2024
1 parent 4c19071 commit 25fac83
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,17 @@ class ActionClientIntraProcessBase : public rclcpp::Waitable
event_info_multi_map_.erase(goal_id);
}

bool has_goal_id(size_t goal_id) const
{
// Check if the intra-process client has this goal_id
auto it = event_info_multi_map_.find(goal_id);
if (it != event_info_multi_map_.end()) {
return true;
}

return false;
}

private:
std::string action_name_;
QoS qos_profile_;
Expand Down

0 comments on commit 25fac83

Please sign in to comment.