Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solved bug with incompatible QoS policies (second try) #278

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ros2_foxglove_bridge/src/parameter_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static foxglove::Parameter fromRosParam(const rclcpp::Parameter& p) {
} else if (type == rclcpp::ParameterType::PARAMETER_BOOL_ARRAY) {
std::vector<foxglove::ParameterValue> paramVec;
for (const auto value : p.as_bool_array()) {
paramVec.push_back(value);
paramVec.push_back(foxglove::ParameterValue(value));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was already commited in #277, can you remove it from this PR? Not sure why it isn't shown as conflicting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I based this branch on the one I created from #277 (to be able to compile the code and test it on my mac), that's why the same commit appears

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I see

}
return foxglove::Parameter(p.get_name(), paramVec);
} else if (type == rclcpp::ParameterType::PARAMETER_INTEGER_ARRAY) {
Expand Down
4 changes: 2 additions & 2 deletions ros2_foxglove_bridge/src/ros2_foxglove_bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ void FoxgloveBridge::subscribe(foxglove::ChannelId channelId, ConnectionHandle c
rclcpp::QoS qos{rclcpp::KeepLast(depth)};

// If all endpoints are reliable, ask for reliable
if (reliabilityReliableEndpointsCount == publisherInfo.size()) {
if (!publisherInfo.empty() && reliabilityReliableEndpointsCount == publisherInfo.size()) {
qos.reliable();
} else {
if (reliabilityReliableEndpointsCount > 0) {
Expand All @@ -509,7 +509,7 @@ void FoxgloveBridge::subscribe(foxglove::ChannelId channelId, ConnectionHandle c
}

// If all endpoints are transient_local, ask for transient_local
if (durabilityTransientLocalEndpointsCount == publisherInfo.size()) {
if (!publisherInfo.empty() && durabilityTransientLocalEndpointsCount == publisherInfo.size()) {
qos.transient_local();
} else {
if (durabilityTransientLocalEndpointsCount > 0) {
Expand Down