[ros-users] [Discourse.ros.org] [Next Generation ROS] Software reuse in ROS1 and ROS2
ros.discourse at gmail.com
Fri Jul 21 19:56:54 UTC 2017
That makes sense short term for bridge, but is problematic for long term code maintenance. For the basic data type, I would think they should be the same with the only difference would be the serialization operators.
Would it be possible to define a base class with data type, and then a specific derived class that overrides the serialization for ROS1 and ROS2 usage? For internal code, you'd only need to pass the base data type around.
With this model, you could then put the specific derived classes in separate paths for your bridge. Only the top level middleware specific wrapper would need to know about the derived serialization wrappers.
[Visit Topic](https://discourse.ros.org/t/software-reuse-in-ros1-and-ros2/2262/9) or reply to this email to respond.
More information about the ros-users