Skip to content

Commit

Permalink
Merge pull request #17 from ArendJan/mirte-master-dev
Browse files Browse the repository at this point in the history
fix service reconnecting
  • Loading branch information
ArendJan authored Jun 6, 2024
2 parents fa99e15 + b2d36e5 commit 6a9a1c4
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ void RRBotHWInterface::connectServices() {
ros::service::waitForService(service, -1);
}
{ // Only mutex when actually writing to class vars.
clients.clear();
const std::lock_guard<std::mutex> lock(this->service_clients_mutex);
for (auto i = 0; i < NUM_SERVOS; i++) {
auto service = (boost::format(service_format) % servo_names[i]).str();
Expand Down

0 comments on commit 6a9a1c4

Please sign in to comment.