Fix a bug on invalid pointer address when using "MESSAGE" compressio…#866
Conversation
|
This modification affects the performance for a case |
|
I made new PR #867 to add new interface to help judgement whether message need to be duplicated. |
emersonknapp
left a comment
There was a problem hiding this comment.
This looks good - but is there any way to add a unit test for this case?
67f9778 to
45c9a78
Compare
|
I submit a new commit (45c9a78) |
|
After checking, the cause of failure is relevant to set |
… mode to write data Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Barry Xu <barry.xu@sony.com>
3563b2a to
161952b
Compare
|
Do rebase |
|
Gist: https://gist.githubusercontent.com/emersonknapp/61f3493495d5b27fb31cdd53f4d29334/raw/e057b1e91a54bdfd8b8b165e3d5fad7a61652ea0/ros2.repos |
| " const std::string & topic_name," \ | ||
| " const std::string & type_name," \ | ||
| " const rclcpp::Time & time) instead." | ||
| )]] |
There was a problem hiding this comment.
Line 199 in this file is causing the Windows warning - since the "non-serialized ROS message" template function calls this "reference version".
I think that the solution is to create a shared_ptr to the SerializedBagMessage, instead of a local instance.
Something like:
template<class MessageT>
void write(
const MessageT & message,
const std::string & topic_name,
const rclcpp::Time & time)
{
auto serialized_msg = std::make_shared<rclcpp::SerializedMessage>();
rclcpp::Serialization<MessageT> serialization;
serialization.serialize_message(&message, serialized_msg.get());
return write(serialized_msg, topic_name, rosidl_generator_traits::name<MessageT>(), time);
Signed-off-by: Barry Xu <barry.xu@sony.com>
|
After checking failure for Rpr__rosbag2__ubuntu_focal_amd64, failed cases are The failure cause isn't related to this PR. |
|
Gist: https://gist.githubusercontent.com/emersonknapp/01dc4976a14df75a802c9e347d0309f8/raw/e057b1e91a54bdfd8b8b165e3d5fad7a61652ea0/ros2.repos |
Address #856