Static assertion failed: Destination not large enough for array
weicong96 opened this issue · 4 comments
Bug report
Required Info:
- Operating System:
- Ubuntu 18.04
- Installation type:
- Install from source
- Version or commit hash:
- Tag 0.8.3(eloquent branch)
- DDS implementation:
- Fast DDS
Steps to reproduce issue
I am trying to bridge messages sent from mavros(ROS1) to ros2
In 1 shell:
source /opt/ros/melodic/setup.bash
(verified that mavros can run, with rostopic and able to echo)
In another shell
source /opt/ros/melodic/setup.bash
source /opt/ros/eloquent/local_setup.bash
colcon build --symlink-install --packages-select ros1_bridge --cmake-force-configure
Expected behavior
Build to be successful
Actual behavior
--- stderr: ros1_bridge
CMake Warning at /opt/ros/eloquent/share/actionlib_msgs/cmake/actionlib_msgsConfig.cmake:29 (message):
Package 'actionlib_msgs' is deprecated (This package will be removed in a
future ROS distro, once the ROS 1 bridge supports actions.)
Call Stack (most recent call first):
CMakeLists.txt:94 (find_package)
/srv/ros1_bridge/generated/mavros_msgs__msg__OverrideRCIn__factories.cpp: In static member function ‘static void ros1_bridge::Factory<ROS1_T, ROS2_T>::convert_1_to_2(const ROS1_T&, ROS2_T&) [with ROS1_T = mavros_msgs::OverrideRCIn_<std::allocator<void> >; ROS2_T = mavros_msgs::msg::OverrideRCIn_<std::allocator<void> >]’:
/srv/ros1_bridge/generated/mavros_msgs__msg__OverrideRCIn__factories.cpp:60:3: error: static assertion failed: destination array not large enough for source array
static_assert(
^~~~~~~~~~~~~
make[2]: *** [CMakeFiles/ros1_bridge.dir/generated/mavros_msgs__msg__OverrideRCIn__factories.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/ros1_bridge.dir/all] Error 2
make: *** [all] Error 2
---
Failed <<< ros1_bridge [8min 32s, exited with code 2]
ROS Eloquent is E.O.L (https://docs.ros.org/en/foxy/Releases.html), do we have the same problem with Foxy or Galactic?
@fujitatomoya Hi, not able to switch to Galactic or Foxy as Ubuntu 20.04 can't be used in the environment for this.
Previously i had same setup and was able to build ros1_bridge with same steps.
I have isolated the problem down to some of the apt-get packages being different in version(ros-melodic-mavros-msgs package)
Does not seem to be related to ros1_bridge specifically.
Can i check there is a way to "diff" ros1 to ros2 msg definitions to find out which msg is causing the error above?
I am not sure about that. it seems that ros-melodic-mavros-msgs package is the one having this error, i would check the difference in git repo based on tags or something.
Thanks, I dont think this is an issue with ros1_bridge, closing the issue