TypeAdapted publishing doesn't use provided allocator
Maintainer thường phản hồi trong vòng 1 ngày
@clalancette đang làm issue này rồi.
Từ ngày 18/4/2024.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Bug report
Required Info:
- Operating System:
- Ubuntu 20.04
- Installation type:
- From source
- Version or commit hash:
- DDS implementation:
- Fast-RTPS, RTI Connext
- Client library (if applicable):
- rclcpp
Steps to reproduce issue
Create a publisher using an adapted type and a custom allocator
using AdaptedType = rclcpp::adapt_type<std::string>::as<std_msgs::msg::String>;
auto alloc = std::make_shared<MyAllocator<void>>();
rclcpp::PublisherOptionsWithAllocator<MyAllocator<void>> publisher_options;
publisher_options.allocator = alloc;
auto publisher = node->create_publisher<AdaptedType>(
"allocator_tutorial", 10, publisher_options);
publisher->publish("A string");
Expected behavior
The ROS message that is created by Publisher::publish() will be allocated using the provided allocator.
Actual behavior
The ROS message is allocated using std::make_unique<ROSMessageType>()
Additional information
Rather than using std::make_unique<ROSMessageType>(), the create_ros_message_unique_ptr() can be used instead in the following two locations:
- https://github.com/ros2/rclcpp/blob/f9c4894f96ea083fc5acfcea4f1ea83850759e63/rclcpp/include/rclcpp/publisher.hpp#L323
- https://github.com/ros2/rclcpp/blob/f9c4894f96ea083fc5acfcea4f1ea83850759e63/rclcpp/include/rclcpp/publisher.hpp#L370
- auto ros_msg_ptr = std::make_unique<ROSMessageType>();
+ auto ros_msg_ptr = create_ros_message_unique_ptr();
- Ngôn ngữ chính
- C++
- Star
- 829
- Fork
- 587
- Merge trung bình
- 4 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 30
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ros2/rclcpp
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Memory grows per callback group created and destroyed on long lived nodesCó thể đã có người làm @jwallace42 đã nhận 1 ngày trước. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
ros2/rclcpp#3428 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
removing and immediately re-adding a node to the EventsCBGExecutor leaves its entities unregisteredCó thể đã có người làm @skyegalaxy đã nhận 10 ngày trước. Đang mởbug
ros2/rclcpp#3418 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Humble] Removing a node with more than one auto-added callback group leaves a dangling guard condition in the executorCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
ros2/rclcpp#3410 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
bug
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
EchoTools/nevr-runtime#2912 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[SDL3pp] update to 0.12.0Đang mởcategory:port-update
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug-unconfirmed
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
libc++
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
llvm/llvm-project#246508 ·
Maintainer thường phản hồi trong vòng 1 ngày