I built ros1_bridge (from the foxy branch) with a total of 250 message definitions, many of them custom but none particularly complex. The command to build was:
RUN /bin/bash -c " \
source /opt/ros/${ROS1_DISTRO}/setup.bash && \
source /opt/ros/${ROS2_DISTRO}/setup.bash && \
source /app/install/setup.bash && \
source /ros2_msgs_ws/install/local_setup.bash && \
cd /bridge_ws && \
MAKEFLAGS=-j1 colcon build \
--packages-select ros1_bridge \
--cmake-force-configure \
--event-handlers console_cohesion+ \
"
This produced the file ros1_bridge/lib/libros1_bridge.so which weighs in at 392 MB. That's 1.6 MB per message type.
It seems like there is a problem with the amount of code being generated. Adding --cmake-args -DCMAKE_BUILD_TYPE=Release shrinks it down to 82 MB which is a lot better in comparison, but still seems large.
I built ros1_bridge (from the
foxybranch) with a total of 250 message definitions, many of them custom but none particularly complex. The command to build was:This produced the file
ros1_bridge/lib/libros1_bridge.sowhich weighs in at 392 MB. That's 1.6 MB per message type.It seems like there is a problem with the amount of code being generated. Adding
--cmake-args -DCMAKE_BUILD_TYPE=Releaseshrinks it down to 82 MB which is a lot better in comparison, but still seems large.