Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building ros1_bridge with vision_msgs installed fails (Melodic + Eloquent) #344

Closed
asasine opened this issue Feb 16, 2022 · 3 comments
Closed

Comments

@asasine
Copy link

asasine commented Feb 16, 2022

Bug report

Required Info:

  • Operating System:
    • Ubuntu 18.04
  • Installation type:
    • Source
  • Version or commit hash:
  • DDS implementation:
    • Fast-RTPS (Eloquent default)
  • Client library (if applicable):
    • N/A

Steps to reproduce issue

After installing ROS1 Melodic and ROS2 Eloquent, and installing ros-melodic-vision-msgs and ros-eloquent-vision-msgs,
building ros1_bridge fails with the following error:

FAILED: CMakeFiles/ros1_bridge.dir/generated/vision_msgs__msg__ObjectHypothesisWithPose__factories.cpp.o 
/usr/bin/c++  -Dros1_bridge_EXPORTS -I/home/adam/src/Azure-Compute-Robotics/src/robot/bridge/ros1_bridge/include -Igenerated -I/home/adam/src/Azure-Compute-Robotics/install/ros2/nvapriltags_ros2/include -I/home/adam/src/Azure-Compute-Robotics/install/ros2/azc_msgs/include -I/opt/ros/eloquent/include -I/opt/ros/melodic/include -I/home/adam/src/Azure-Compute-Robotics/install/ros1/azc_msgs/include -I/usr/include/eigen3 -I/home/adam/src/Azure-Compute-Robotics/install/ros1/realsense2_camera/include -I/usr/include/opencv -I/home/adam/src/Azure-Compute-Robotics/install/ros1/ros_sdr_agent_msgs/include -I/usr/include/suitesparse -I/opt/ros/melodic/include/g2o -I/home/adam/src/Azure-Compute-Robotics/install/ros1/wibotic_msg/include -I/usr/include/OGRE/Overlay -I/usr/include/OGRE -g -fPIC   -Wall -Wextra -std=gnu++14 -Wno-unused-parameter -MD -MT CMakeFiles/ros1_bridge.dir/generated/vision_msgs__msg__ObjectHypothesisWithPose__factories.cpp.o -MF CMakeFiles/ros1_bridge.dir/generated/vision_msgs__msg__ObjectHypothesisWithPose__factories.cpp.o.d -o CMakeFiles/ros1_bridge.dir/generated/vision_msgs__msg__ObjectHypothesisWithPose__factories.cpp.o -c generated/vision_msgs__msg__ObjectHypothesisWithPose__factories.cpp
generated/vision_msgs__msg__ObjectHypothesisWithPose__factories.cpp: In static member function ‘static void ros1_bridge::Factory<ROS1_T, ROS2_T>::convert_2_to_1(const ROS2_T&, ROS1_T&) [with ROS1_T = vision_msgs::ObjectHypothesisWithPose_<std::allocator<void> >; ROS2_T = vision_msgs::msg::ObjectHypothesisWithPose_<std::allocator<void> >]’:
generated/vision_msgs__msg__ObjectHypothesisWithPose__factories.cpp:87:26: error: cannot convert ‘const _id_type {aka const std::__cxx11::basic_string<char>}’ to ‘vision_msgs::ObjectHypothesisWithPose_<std::allocator<void> >::_id_type {aka long int}’ in assignment
   ros1_msg.id = ros2_msg.id;
                          ^~

[271/297] Building CXX object CMakeFiles/ros1_bridge.dir/g...erated/vision_msgs__msg__ObjectHypothesis__factories.cpp.o�[K
FAILED: CMakeFiles/ros1_bridge.dir/generated/vision_msgs__msg__ObjectHypothesis__factories.cpp.o 
/usr/bin/c++  -Dros1_bridge_EXPORTS -I/home/adam/src/Azure-Compute-Robotics/src/robot/bridge/ros1_bridge/include -Igenerated -I/home/adam/src/Azure-Compute-Robotics/install/ros2/nvapriltags_ros2/include -I/home/adam/src/Azure-Compute-Robotics/install/ros2/azc_msgs/include -I/opt/ros/eloquent/include -I/opt/ros/melodic/include -I/home/adam/src/Azure-Compute-Robotics/install/ros1/azc_msgs/include -I/usr/include/eigen3 -I/home/adam/src/Azure-Compute-Robotics/install/ros1/realsense2_camera/include -I/usr/include/opencv -I/home/adam/src/Azure-Compute-Robotics/install/ros1/ros_sdr_agent_msgs/include -I/usr/include/suitesparse -I/opt/ros/melodic/include/g2o -I/home/adam/src/Azure-Compute-Robotics/install/ros1/wibotic_msg/include -I/usr/include/OGRE/Overlay -I/usr/include/OGRE -g -fPIC   -Wall -Wextra -std=gnu++14 -Wno-unused-parameter -MD -MT CMakeFiles/ros1_bridge.dir/generated/vision_msgs__msg__ObjectHypothesis__factories.cpp.o -MF CMakeFiles/ros1_bridge.dir/generated/vision_msgs__msg__ObjectHypothesis__factories.cpp.o.d -o CMakeFiles/ros1_bridge.dir/generated/vision_msgs__msg__ObjectHypothesis__factories.cpp.o -c generated/vision_msgs__msg__ObjectHypothesis__factories.cpp
generated/vision_msgs__msg__ObjectHypothesis__factories.cpp: In static member function ‘static void ros1_bridge::Factory<ROS1_T, ROS2_T>::convert_2_to_1(const ROS2_T&, ROS1_T&) [with ROS1_T = vision_msgs::ObjectHypothesis_<std::allocator<void> >; ROS2_T = vision_msgs::msg::ObjectHypothesis_<std::allocator<void> >]’:
generated/vision_msgs__msg__ObjectHypothesis__factories.cpp:79:26: error: cannot convert ‘const _id_type {aka const std::__cxx11::basic_string<char>}’ to ‘vision_msgs::ObjectHypothesis_<std::allocator<void> >::_id_type {aka long int}’ in assignment
   ros1_msg.id = ros2_msg.id;
                          ^~

Expected behavior

ros1_bridge should successfully build by not associating ROS1 and ROS2 versions of vision_msgs/msg/ObjectHypothesisWithPose and vision_msgs/msg/ObjectHypothesis, as the types for the field id do not match.

Actual behavior

ros1_bridge build fails since it tries to associate ROS1 and ROS2 versions of vision_msgs/msg/ObjectHypothesisWithPose and vision_msgs/msg/ObjectHypothesis, despite the types for the field id not matching.

Additional information

ROS1 vision_msgs/msg/ObjectHypothesis uses an int64 for the id field. ROS2 vision_msgs/msg/ObjectHypothesis uses a string for the id field.

The default field matching rules, according to the docs in the repo, indicate automatic message associations are only created when all field types match.

Related discussion in vision_msgs: ros-perception/vision_msgs#39

@asasine asasine changed the title Building ros1_bridge with vision_msgs installed (Melodic + Eloquent) fails Building ros1_bridge with vision_msgs installed fails (Melodic + Eloquent) Feb 16, 2022
@gbiggs
Copy link
Member

gbiggs commented Feb 19, 2022

ROS 2 Eloquent is no longer supported. Does this problem occur on a more recent version of ROS 2?

@clalancette
Copy link
Contributor

No response in over two weeks, so closing. Feel free to respond to the last question and reopen.

@cuge1995
Copy link

cuge1995 commented Oct 4, 2022

sudo apt-get install ros-melodic-vision-msgs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants