Skip to content
Open
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 .github/workflows/testpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
- name: Delete specific outdated cache entries
shell: bash -l {0}
run: |
# rm -rf ${{ matrix.folder_cache }}/ros-rolling-rviz-visual-tools* 2>/dev/null || true
# rm -rf ${{ matrix.folder_cache }}/ros-rolling-coal* 2>/dev/null || true
mkdir -p ${{ matrix.folder_cache }}
pixi run rattler-index fs ${{ matrix.folder_cache }}/.. --force
Expand Down
13 changes: 13 additions & 0 deletions patch/ros-rolling-cm-executors.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,16 @@ index 4fd2330..e455141 100644
// clear on reset callback
if(rcl_timer_set_on_reset_callback(timer_data->rcl_ref.get(), nullptr,
nullptr) != RCL_RET_OK)
diff --git a/include/cm_executors/events_cbg_executor.hpp b/include/cm_executors/events_cbg_executor.hpp
index 3009afe..6ded674 100644
--- a/include/cm_executors/events_cbg_executor.hpp
+++ b/include/cm_executors/events_cbg_executor.hpp
@@ -25,7 +25,7 @@

#include "rclcpp/executor.hpp"
#include "rclcpp/macros.hpp"
-#include "rclcpp/memory_strategies.hpp"
+#include "rclcpp/memory_strategy.hpp"
#include "rclcpp/visibility_control.hpp"

namespace rclcpp
254 changes: 173 additions & 81 deletions patch/ros-rolling-foxglove-bridge.osx.patch
Original file line number Diff line number Diff line change
@@ -1,103 +1,103 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 71deedd3..15821a4e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,9 +86,15 @@ target_include_directories(foxglove_cpp_shared SYSTEM
target_sources(foxglove_cpp_shared PRIVATE ${FOXGLOVE_SDK_SOURCES})
# Import the prebuilt C shared library from the fetched SDK
add_library(foxglove-shared SHARED IMPORTED)
-set_target_properties(foxglove-shared PROPERTIES
- IMPORTED_LOCATION ${foxglove_sdk_SOURCE_DIR}/lib/libfoxglove.so
-)
+if(APPLE)
+ set_target_properties(foxglove-shared PROPERTIES
+ IMPORTED_LOCATION ${foxglove_sdk_SOURCE_DIR}/lib/libfoxglove.dylib
+ )
+else()
+ set_target_properties(foxglove-shared PROPERTIES
+ IMPORTED_LOCATION ${foxglove_sdk_SOURCE_DIR}/lib/libfoxglove.so
+ )
+endif()
target_link_libraries(foxglove_cpp_shared PRIVATE foxglove-shared)
set_target_properties(foxglove_cpp_shared PROPERTIES
INSTALL_RPATH "$ORIGIN"
diff --git a/src/ros2_foxglove_bridge.cpp b/src/ros2_foxglove_bridge.cpp
index 72c11f54..fb799a92 100644
index 2229aadc..9431dbdd 100644
--- a/src/ros2_foxglove_bridge.cpp
+++ b/src/ros2_foxglove_bridge.cpp
@@ -305,7 +305,7 @@ void FoxgloveBridge::updateAdvertisedTopics(
std::string topic(channel.topic());
const TopicAndDatatype topicAndSchemaName = {topic, schemaName};
if (latestTopics.find(topicAndSchemaName) == latestTopics.end()) {
- RCLCPP_INFO(this->get_logger(), "Removing channel %lu for topic \"%s\" (%s)", channel.id(),
+ RCLCPP_INFO(this->get_logger(), "Removing channel %llu for topic \"%s\" (%s)", channel.id(),
topic.c_str(), schemaName.c_str());
channel.close();
channelIt = _channels.erase(channelIt);
@@ -372,7 +372,7 @@ void FoxgloveBridge::updateAdvertisedTopics(
@@ -479,7 +479,7 @@ void FoxgloveBridge::updateAdvertisedTopics(
const TopicAndDatatype topicAndSchemaName = {topic, schemaName};
if (latestTopics.find(topicAndSchemaName) == latestTopics.end()) {
const auto channelId = channel.id();
- RCLCPP_INFO(this->get_logger(), "Removing channel %lu for topic \"%s\" (%s)", channelId,
+ RCLCPP_INFO(this->get_logger(), "Removing channel %llu for topic \"%s\" (%s)", channelId,
topic.c_str(), schemaName.c_str());
// Remove any active subscriptions for this channel
_subscriptions.erase(channelId);
@@ -549,7 +549,7 @@ void FoxgloveBridge::updateAdvertisedTopics(
}

const ChannelId channelId = channelResult.value().id();
- RCLCPP_INFO(this->get_logger(), "Advertising new channel %lu for topic \"%s\"", channelId,
+ RCLCPP_INFO(this->get_logger(), "Advertising new channel %llu for topic \"%s\"", channelId,
topic.c_str());
_channels.insert({channelId, std::move(channelResult.value())});
}
@@ -814,7 +814,7 @@ void FoxgloveBridge::subscribeConnectionGraph(bool subscribe) {
}

const ChannelId channelId = channelResult.value().id();
- RCLCPP_INFO(this->get_logger(), "Advertising new channel %lu for topic \"%s\"", channelId,
+ RCLCPP_INFO(this->get_logger(), "Advertising new channel %llu for topic \"%s\"", channelId,
topic.c_str());
_channels.insert({channelId, std::move(channelResult.value())});
}
@@ -593,14 +593,14 @@ void FoxgloveBridge::subscribeConnectionGraph(bool subscribe) {
void FoxgloveBridge::subscribe(ChannelId channelId, const foxglove::ClientMetadata& client) {
if (!client.sink_id.has_value()) {
RCLCPP_ERROR(this->get_logger(),
- "received subscribe request from client %u for channel %lu but client "
+ "received subscribe request from client %u for channel %llu but client "
"has no sink ID",
client.id, channelId);
return;
}

RCLCPP_INFO(this->get_logger(),
- "received subscribe request for channel %lu from client %u (sink %lu)", channelId,
+ "received subscribe request for channel %llu from client %u (sink %llu)", channelId,
client.id, client.sink_id.value());
std::lock_guard<std::mutex> lock(_subscriptionsMutex);

@@ -608,7 +608,7 @@ void FoxgloveBridge::subscribe(ChannelId channelId, const foxglove::ClientMetada
// calling this callback?
auto it = _channels.find(channelId);
if (it == _channels.end()) {
- RCLCPP_INFO(this->get_logger(), "received subscribe request for channel %lu from client %u",
+ RCLCPP_INFO(this->get_logger(), "received subscribe request for channel %llu from client %u",
channelId, client.id);
createOrIncrementSubscription(channelId, client.id, false, client.sink_id);
}
@@ -867,7 +867,7 @@ void FoxgloveBridge::createOrIncrementSubscriptionLocked(ChannelId channelId, Cl
std::optional<SinkId> sinkId) {
auto channelIt = _channels.find(channelId);
if (channelIt == _channels.end()) {
- RCLCPP_ERROR(this->get_logger(), "received subscribe request for unknown channel: %lu",
+ RCLCPP_ERROR(this->get_logger(), "received subscribe request for unknown channel: %llu",
channelId);
return;
}
@@ -638,7 +638,7 @@ void FoxgloveBridge::subscribe(ChannelId channelId, const foxglove::ClientMetada
@@ -898,7 +898,7 @@ void FoxgloveBridge::createOrIncrementSubscriptionLocked(ChannelId channelId, Cl
auto [it, inserted] = _subscriptions.emplace(channelId, std::move(channelSub));
subIt = it;

if (!client.sink_id.has_value()) {
RCLCPP_ERROR(this->get_logger(),
- "received subscribe request for channel %lu but client "
+ "received subscribe request for channel %llu but client "
"has no sink ID",
channelId);
return;
@@ -646,19 +646,19 @@ void FoxgloveBridge::subscribe(ChannelId channelId, const foxglove::ClientMetada
- RCLCPP_INFO(this->get_logger(), "Created ROS subscription on %s (%s) for channel %lu",
+ RCLCPP_INFO(this->get_logger(), "Created ROS subscription on %s (%s) for channel %llu",
topic.c_str(), datatype.c_str(), channelId);
}

_subscriptions.insert({{channelId, client.id}, subscription});
RCLCPP_INFO(this->get_logger(),
- "created ROS subscription on %s (%s) successfully for channel %lu (client "
- "%u, sink %lu)",
+ "created ROS subscription on %s (%s) successfully for channel %llu (client "
+ "%u, sink %llu)",
topic.c_str(), datatype.c_str(), channelId, client.id, client.sink_id.value());
@@ -922,7 +922,7 @@ void FoxgloveBridge::createOrIncrementSubscriptionLocked(ChannelId channelId, Cl
}

void FoxgloveBridge::unsubscribe(ChannelId channelId, const foxglove::ClientMetadata& client) {
std::lock_guard<std::mutex> lock(_subscriptionsMutex);

- RCLCPP_INFO(this->get_logger(), "received unsubscribe request for channel %lu", channelId);
+ RCLCPP_INFO(this->get_logger(), "received unsubscribe request for channel %llu", channelId);

auto it = _channels.find(channelId);
if (it == _channels.end()) {
- RCLCPP_ERROR(this->get_logger(), "received unsubscribe request for unknown channel %lu",
+ RCLCPP_ERROR(this->get_logger(), "received unsubscribe request for unknown channel %llu",
channelId);
return;
}
@@ -666,7 +666,7 @@ void FoxgloveBridge::unsubscribe(ChannelId channelId, const foxglove::ClientMeta
auto subscriptionIt = _subscriptions.find({channelId, client.id});
if (subscriptionIt == _subscriptions.end()) {
- RCLCPP_INFO(this->get_logger(), "received unsubscribe request for channel %lu from client %u",
+ RCLCPP_INFO(this->get_logger(), "received unsubscribe request for channel %llu from client %u",
channelId, client.id);
removeOrDecrementSubscription(channelId, client.id, false);
}
@@ -938,7 +938,7 @@ void FoxgloveBridge::removeOrDecrementSubscriptionLocked(ChannelId channelId, Cl
auto subIt = _subscriptions.find(channelId);
if (subIt == _subscriptions.end()) {
RCLCPP_ERROR(this->get_logger(),
- "Client %u tried unsubscribing from channel %lu but a corresponding ROS "
+ "Client %u tried unsubscribing from channel %llu but a corresponding ROS "
"subscription doesn't exist",
client.id, channelId);
- "Client %u tried unsubscribing from channel %lu but no subscription exists",
+ "Client %u tried unsubscribing from channel %llu but no subscription exists",
clientId, channelId);
return;
@@ -674,7 +674,7 @@ void FoxgloveBridge::unsubscribe(ChannelId channelId, const foxglove::ClientMeta

const std::string& topic = subscriptionIt->second->get_topic_name();
RCLCPP_INFO(this->get_logger(),
- "Cleaned up subscription to topic %s for client %u on channel %lu", topic.c_str(),
+ "Cleaned up subscription to topic %s for client %u on channel %llu", topic.c_str(),
client.id, channelId);
_subscriptions.erase(subscriptionIt);
}
@@ -953,7 +953,7 @@ void FoxgloveBridge::removeOrDecrementSubscriptionLocked(ChannelId channelId, Cl
// If no more subscribers, destroy the ROS subscription
if (subIt->second.wsClientIds.empty() && subIt->second.gatewayClientIds.empty()) {
RCLCPP_INFO(this->get_logger(),
- "Cleaned up ROS subscription for channel %lu (no more subscribers)", channelId);
+ "Cleaned up ROS subscription for channel %llu (no more subscribers)", channelId);
_subscriptions.erase(subIt);
}
}
@@ -778,7 +778,7 @@ void FoxgloveBridge::clientUnadvertise(ClientId clientId, ChannelId clientChanne
@@ -1092,7 +1092,7 @@ void FoxgloveBridge::clientUnadvertise(ClientId clientId, ChannelId clientChanne

const auto& publisher = it->second.publisher;
RCLCPP_INFO(this->get_logger(),
Expand All @@ -106,3 +106,95 @@ index 72c11f54..fb799a92 100644
publisher->get_topic_name(), publisher->get_subscription_count(), clientChannelId);

_clientAdvertisedTopics.erase(it);
@@ -1460,13 +1460,13 @@ void FoxgloveBridge::gatewaySubscribe(uint32_t clientId,
auto sinkId = _gateway->sinkId();
if (!sinkId.has_value()) {
RCLCPP_WARN(this->get_logger(),
- "Gateway: subscribe request for channel %lu (\"%s\") from client %u "
+ "Gateway: subscribe request for channel %llu (\"%s\") from client %u "
"but gateway session has no sink ID (reconnecting?); "
"cached transient_local messages will not be replayed",
channel.id(), std::string(channel.topic()).c_str(), clientId);
}
RCLCPP_INFO(this->get_logger(),
- "Gateway: received subscribe request for channel %lu (\"%s\") from client %u",
+ "Gateway: received subscribe request for channel %llu (\"%s\") from client %u",
channel.id(), std::string(channel.topic()).c_str(), clientId);
createOrIncrementSubscription(channel.id(), clientId, true, sinkId);
}
@@ -1474,7 +1474,7 @@ void FoxgloveBridge::gatewaySubscribe(uint32_t clientId,
void FoxgloveBridge::gatewayUnsubscribe(uint32_t clientId,
const foxglove::ChannelDescriptor& channel) {
RCLCPP_INFO(this->get_logger(),
- "Gateway: received unsubscribe request for channel %lu (\"%s\") from client %u",
+ "Gateway: received unsubscribe request for channel %llu (\"%s\") from client %u",
channel.id(), std::string(channel.topic()).c_str(), clientId);
removeOrDecrementSubscription(channel.id(), clientId, true);
}
@@ -1489,7 +1489,7 @@ void FoxgloveBridge::gatewayClientAdvertise(uint32_t clientId,

ChannelAndClientId key = {channelId, clientId};
if (_gatewayClientAdvertisedTopics.find(key) != _gatewayClientAdvertisedTopics.end()) {
- RCLCPP_WARN(this->get_logger(), "Gateway: client %u already advertised channel %lu (\"%s\")",
+ RCLCPP_WARN(this->get_logger(), "Gateway: client %u already advertised channel %llu (\"%s\")",
clientId, channelId, topicName.c_str());
return;
}
@@ -1506,7 +1506,7 @@ void FoxgloveBridge::gatewayClientAdvertise(uint32_t clientId,

if (topicType.empty()) {
RCLCPP_ERROR(this->get_logger(),
- "Gateway: client %u advertised channel %lu (\"%s\") with empty schema name",
+ "Gateway: client %u advertised channel %llu (\"%s\") with empty schema name",
clientId, channelId, topicName.c_str());
return;
}
@@ -1514,12 +1514,12 @@ void FoxgloveBridge::gatewayClientAdvertise(uint32_t clientId,
try {
auto ad = createClientPublisher(topicName, topicType, encoding, schemaData, schemaLen);
RCLCPP_INFO(this->get_logger(),
- "Gateway: client %u is advertising channel %lu \"%s\" (%s) with encoding \"%s\"",
+ "Gateway: client %u is advertising channel %llu \"%s\" (%s) with encoding \"%s\"",
clientId, channelId, topicName.c_str(), topicType.c_str(), encoding.c_str());
_gatewayClientAdvertisedTopics.emplace(key, std::move(ad));
} catch (const std::exception& ex) {
RCLCPP_ERROR(this->get_logger(),
- "Gateway: failed to create publisher for client %u channel %lu (\"%s\"): %s",
+ "Gateway: failed to create publisher for client %u channel %llu (\"%s\"): %s",
clientId, channelId, topicName.c_str(), ex.what());
}
}
@@ -1533,13 +1533,13 @@ void FoxgloveBridge::gatewayClientUnadvertise(uint32_t clientId,

auto it = _gatewayClientAdvertisedTopics.find(key);
if (it == _gatewayClientAdvertisedTopics.end()) {
- RCLCPP_WARN(this->get_logger(), "Gateway: client %u unadvertised unknown channel %lu (\"%s\")",
+ RCLCPP_WARN(this->get_logger(), "Gateway: client %u unadvertised unknown channel %llu (\"%s\")",
clientId, channelId, std::string(channel.topic()).c_str());
return;
}

RCLCPP_INFO(this->get_logger(),
- "Gateway: client %u is no longer advertising channel %lu (\"%s\")", clientId,
+ "Gateway: client %u is no longer advertising channel %llu (\"%s\")", clientId,
channelId, it->second.topicName.c_str());
_gatewayClientAdvertisedTopics.erase(it);

@@ -1563,7 +1563,7 @@ void FoxgloveBridge::gatewayClientMessage(uint32_t clientId,
auto it = _gatewayClientAdvertisedTopics.find(key);
if (it == _gatewayClientAdvertisedTopics.end()) {
RCLCPP_ERROR(this->get_logger(),
- "Gateway: dropping message from client %u for unknown channel %lu", clientId,
+ "Gateway: dropping message from client %u for unknown channel %llu", clientId,
channelId);
return;
}
@@ -1574,7 +1574,7 @@ void FoxgloveBridge::gatewayClientMessage(uint32_t clientId,
try {
publishClientData(ad, data, dataLen);
} catch (const std::exception& ex) {
- RCLCPP_ERROR(this->get_logger(), "Gateway: dropping message from client %u for channel %lu: %s",
+ RCLCPP_ERROR(this->get_logger(), "Gateway: dropping message from client %u for channel %llu: %s",
clientId, channelId, ex.what());
}
}
16 changes: 8 additions & 8 deletions patch/ros-rolling-foxglove-bridge.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9285c891..d8b058ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -75,6 +75,18 @@ else()
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
@@ -62,6 +62,18 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aar
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
set(FOXGLOVE_SDK_PLATFORM "x86_64-unknown-linux-gnu")
set(FOXGLOVE_SDK_SHA "f3d2f6a8ba97fedeae13b978f5e8a51dec4803eddfd23b198a292bf9ab6675ff")
set(FOXGLOVE_SDK_SHA "b949295e80eb1a9bb356e657b9c2579c886717fac290c4e48a5e9846063bf2e8")
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
+ set(FOXGLOVE_SDK_PLATFORM "aarch64-apple-darwin")
+ set(FOXGLOVE_SDK_SHA "6cb695e997e47a61c317177f13dd911c90ec1a95477473e1c5fb86db8a2da8ed")
+ set(FOXGLOVE_SDK_SHA "1c6a32fc25c3a29eb9f3c5156f9c82970a8714523ffc3893ea4e852b977ee1e5")
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+ set(FOXGLOVE_SDK_PLATFORM "x86_64-apple-darwin")
+ set(FOXGLOVE_SDK_SHA "21cba2f3d032b3d0a921b7eda8ef103393f93f66ab891cbc4851f57c8080b94b")
+ set(FOXGLOVE_SDK_SHA "12249d4b2f16c3ff661f21d19603fb33a82888f0391576269f31f9cc1a4cb7a8")
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
+ set(FOXGLOVE_SDK_PLATFORM "aarch64-pc-windows-msvc")
+ set(FOXGLOVE_SDK_SHA "602676101883defac7494e70fdc6bc8dd2daa1783da07645906ef595e6654a05")
+ set(FOXGLOVE_SDK_SHA "5d4999f3231fbf06c6c54eee00db9cab5c8a96d043dcf143a401c72bf2efec01")
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")
+ set(FOXGLOVE_SDK_PLATFORM "x86_64-pc-windows-msvc")
+ set(FOXGLOVE_SDK_SHA "6cdf69d23ae45a1643f6e430b9928c5546679ffa3b9fb54a79f244b93bdc8323")
+ set(FOXGLOVE_SDK_SHA "58c3c5e945623bc02b596f748c82e1c8b82daef7871f11f600ff1a606ac9295d")
else()
message(FATAL_ERROR "Unsupported platform/architecture combination: ${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}")
endif()
@@ -185,6 +197,12 @@ target_link_libraries(foxglove_bridge_component
@@ -157,6 +169,12 @@ target_link_libraries(foxglove_bridge_component
rosx_introspection::rosx_introspection
)

Expand Down
Loading