Skip to content

Commit

Permalink
Fixinig led_manager - it couldn't control the simulation LEDs due to …
Browse files Browse the repository at this point in the history
…changed link nomenclature
  • Loading branch information
ViktorWalter committed Feb 5, 2024
1 parent 79e4f63 commit 9595a6d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions scripts/two_drones/session.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ windows:
- slow_down:
layout: even-vertical
panes:
- waitForGazebo; waitForRos; sleep 30; gz physics -u 80
- waitForGazebo; waitForRos; sleep 20; gz physics -u 80
# - trajectories:
# layout: tiled
# panes:
Expand All @@ -74,4 +74,4 @@ windows:
- layout:
layout: tiled
panes:
- waitForControl; sleep 3; ~/.i3/layout_manager.sh ./layout.json
- waitForControl; sleep 3; ~/.i3/layout_manager.sh ./layout.json
12 changes: 6 additions & 6 deletions src/led_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ namespace uvdar {

//for simulation
for (int i = 0; i < 8; i++) {
clients_set_sq_gz.push_back(nh.serviceClient<mrs_msgs::SetInt>("/gazebo/ledSignalSetter/" + _uav_name_ + "_uvled_" + std::to_string(i + 1) + "_lens_link"));
clients_set_fr_gz.push_back(nh.serviceClient<mrs_msgs::Float64Srv>("/gazebo/ledFrequencySetter/" + _uav_name_ + "_uvled_" + std::to_string(i + 1) + "_lens_link"));
clients_set_md_gz.push_back(nh.serviceClient<mrs_msgs::SetInt>("/gazebo/ledModeSetter/" + _uav_name_ + "_uvled_" + std::to_string(i + 1) + "_lens_link"));
clients_set_ms_gz.push_back(nh.serviceClient<uvdar_core::SetLedMessage>("/gazebo/ledMessageSender/" + _uav_name_ + "_uvled_" + std::to_string(i + 1) + "_lens_link"));
clients_set_ac_gz.push_back(nh.serviceClient<std_srvs::SetBool>("/gazebo/ledActiveSetter/" + _uav_name_ + "_uvled_" + std::to_string(i + 1) + "_lens_link"));
clients_set_sq_gz.push_back(nh.serviceClient<mrs_msgs::SetInt>("/gazebo/ledSignalSetter/" + _uav_name_ + "_" + std::to_string(i + 1)));
clients_set_fr_gz.push_back(nh.serviceClient<mrs_msgs::Float64Srv>("/gazebo/ledFrequencySetter/" + _uav_name_ + "_" + std::to_string(i + 1)));
clients_set_md_gz.push_back(nh.serviceClient<mrs_msgs::SetInt>("/gazebo/ledModeSetter/" + _uav_name_ + "_" +std::to_string(i + 1)));
clients_set_ms_gz.push_back(nh.serviceClient<uvdar_core::SetLedMessage>("/gazebo/ledMessageSender/" + _uav_name_ + "_" + std::to_string(i + 1)));
clients_set_ac_gz.push_back(nh.serviceClient<std_srvs::SetBool>("/gazebo/ledActiveSetter/" + _uav_name_ + "_" +std::to_string(i + 1)));
}

initialized = true;
Expand Down Expand Up @@ -546,4 +546,4 @@ int main(int argc, char** argv) {
ros::spin();

return 0;
}
}

0 comments on commit 9595a6d

Please sign in to comment.