-
Notifications
You must be signed in to change notification settings - Fork 305
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
ros1_bridge fails to build from source #168
Comments
@dirk-thomas any input on this? Thanks! |
The error message sounds like your environment is setup incorrectly. Please follow the standard steps to build the Out of my head I would suggest:
|
I understand the concern but I am actually using this on an automated build script and for the Bouncy release I was always able to correctly build the ros1_bridge by following the above steps (most of them as I said are automated by script in the same terminal). So even if it is not recommended, this did work before, so my question is what did change on the ros1_bridge side/ROS side? |
Btw, the automation script can be found here: https://github.com/PX4/px4_ros_com/blob/master/scripts/build_all.bash |
The referenced build script first sources the ROS 2 workspace and then the ROS 1 workspace (which is again not the recommended order) [1]. The output shows this kind of warning which later seems to also be responsible to fail the build:
I am not aware of any changes on the ROS side. But it seems that you have changed this specific order of sourcing the workspaces in your build scipt just two days ago: PX4/px4_ros_com@fa7f6cb#diff-737734c8edcb8cec03dd6b034a6328c9 |
@dirk-thomas even using the reverse order as bellow: unset ROS_DISTRO
if [ -z $ros1_path ]; then
source /opt/ros/$ROS1_DISTRO/setup.bash
else
source $ros1_path
fi
if [ -z $ros2_path ]; then
source /opt/ros/$ROS2_DISTRO/local_setup.bash
else
source $ros2_path
fi
# source the ROS workspaces
source $ROS1_WS_DIR/install/setup.bash
source $ROS2_WS_DIR/install/setup.bash The result is the same. Though, after building the workspaces, if I actually try to build the unset ROS_DISTRO
# if [ -z $ros1_path ]; then
# source /opt/ros/$ROS1_DISTRO/setup.bash
# else
# source $ros1_path
# fi
# if [ -z $ros2_path ]; then
# source /opt/ros/$ROS2_DISTRO/local_setup.bash
# else
# source $ros2_path
# fi
# source the ROS workspaces
source $ROS1_WS_DIR/install/setup.bash
source $ROS2_WS_DIR/install/setup.bash It will eventually start building, but it fails, since it gets some symlink problems: [ 18%] Linking CXX executable test_ros2_server_cpp
CMakeFiles/test_ros2_server_cpp.dir/test/test_ros2_server.cpp.o: In function `rclcpp::Service<diagnostic_msgs::srv::SelfTest>::Service(std::shared_ptr<rcl_node_t>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::AnyServiceCallback<diagnostic_msgs::srv::SelfTest>, rcl_service_options_t&)':
test_ros2_server.cpp:(.text._ZN6rclcpp7ServiceIN15diagnostic_msgs3srv8SelfTestEEC2ESt10shared_ptrI10rcl_node_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_18AnyServiceCallbackIS3_EER21rcl_service_options_t[_ZN6rclcpp7ServiceIN15diagnostic_msgs3srv8SelfTestEEC5ESt10shared_ptrI10rcl_node_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_18AnyServiceCallbackIS3_EER21rcl_service_options_t]+0xb0): undefined reference to `rosidl_service_type_support_t const* rosidl_typesupport_cpp::get_service_type_support_handle<diagnostic_msgs::srv::SelfTest>()'
collect2: error: ld returned 1 exit status
CMakeFiles/test_ros2_server_cpp.dir/build.make:162: recipe for target 'test_ros2_server_cpp' failed
make[2]: *** [test_ros2_server_cpp] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/test_ros2_server_cpp.dir/all' failed
make[1]: *** [CMakeFiles/test_ros2_server_cpp.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 20%] Linking CXX executable test_ros2_client_cpp
CMakeFiles/test_ros2_client_cpp.dir/test/test_ros2_client.cpp.o: In function `rclcpp::Client<diagnostic_msgs::srv::SelfTest>::Client(rclcpp::node_interfaces::NodeBaseInterface*, std::shared_ptr<rclcpp::node_interfaces::NodeGraphInterface>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rcl_client_options_t&)':
test_ros2_client.cpp:(.text._ZN6rclcpp6ClientIN15diagnostic_msgs3srv8SelfTestEEC2EPNS_15node_interfaces17NodeBaseInterfaceESt10shared_ptrINS5_18NodeGraphInterfaceEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEER20rcl_client_options_t[_ZN6rclcpp6ClientIN15diagnostic_msgs3srv8SelfTestEEC5EPNS_15node_interfaces17NodeBaseInterfaceESt10shared_ptrINS5_18NodeGraphInterfaceEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEER20rcl_client_options_t]+0xc0): undefined reference to `rosidl_service_type_support_t const* rosidl_typesupport_cpp::get_service_type_support_handle<diagnostic_msgs::srv::SelfTest>()'
collect2: error: ld returned 1 exit status
CMakeFiles/test_ros2_client_cpp.dir/build.make:162: recipe for target 'test_ros2_client_cpp' failed
make[2]: *** [test_ros2_client_cpp] Error 1
CMakeFiles/Makefile2:700: recipe for target 'CMakeFiles/test_ros2_client_cpp.dir/all' failed
make[1]: *** [CMakeFiles/test_ros2_client_cpp.dir/all] Error 2
[ 26%] Linking CXX executable simple_bridge_1_to_2
CMakeFiles/simple_bridge_1_to_2.dir/src/simple_bridge_1_to_2.cpp.o: In function `rclcpp::Publisher<std_msgs::msg::String_<std::allocator<void> >, std::allocator<void> >::Publisher(rclcpp::node_interfaces::NodeBaseInterface*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rcl_publisher_options_t const&, std::shared_ptr<std::allocator<std_msgs::msg::String_<std::allocator<void> > > > const&)':
simple_bridge_1_to_2.cpp:(.text._ZN6rclcpp9PublisherIN8std_msgs3msg7String_ISaIvEEES4_EC2EPNS_15node_interfaces17NodeBaseInterfaceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK23rcl_publisher_options_tRKSt10shared_ptrISaIS5_EE[_ZN6rclcpp9PublisherIN8std_msgs3msg7String_ISaIvEEES4_EC5EPNS_15node_interfaces17NodeBaseInterfaceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK23rcl_publisher_options_tRKSt10shared_ptrISaIS5_EE]+0x22): undefined reference to `rosidl_message_type_support_t const* rosidl_typesupport_cpp::get_message_type_support_handle<std_msgs::msg::String_<std::allocator<void> > >()'
collect2: error: ld returned 1 exit status
CMakeFiles/simple_bridge_1_to_2.dir/build.make:158: recipe for target 'simple_bridge_1_to_2' failed
make[2]: *** [simple_bridge_1_to_2] Error 1
CMakeFiles/Makefile2:1281: recipe for target 'CMakeFiles/simple_bridge_1_to_2.dir/all' failed
make[1]: *** [CMakeFiles/simple_bridge_1_to_2.dir/all] Error 2
[ 28%] Linking CXX executable simple_bridge_2_to_1
CMakeFiles/simple_bridge_2_to_1.dir/src/simple_bridge_2_to_1.cpp.o: In function `rclcpp::create_subscription_factory<std_msgs::msg::String_<std::allocator<void> >, void (&)(std::shared_ptr<std_msgs::msg::String_<std::allocator<void> > >), std::allocator<void>, std_msgs::msg::String_<std::allocator<void> >, rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> >, std::allocator<void> > >(void (&)(std::shared_ptr<std_msgs::msg::String_<std::allocator<void> > >), rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::String_<std::allocator<void> >, std::allocator<void> >::SharedPtr, std::shared_ptr<std::allocator<void> >)::{lambda(rclcpp::node_interfaces::NodeBaseInterface*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rcl_subscription_options_t&)#1}::operator()(rclcpp::node_interfaces::NodeBaseInterface*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rcl_subscription_options_t&) const':
simple_bridge_2_to_1.cpp:(.text._ZZN6rclcpp27create_subscription_factoryIN8std_msgs3msg7String_ISaIvEEERFvSt10shared_ptrIS5_EES4_S5_NS_12SubscriptionIS5_S4_EEEENS_19SubscriptionFactoryEOT0_NS_23message_memory_strategy21MessageMemoryStrategyIT2_T1_E9SharedPtrES6_ISI_EENKUlPNS_15node_interfaces17NodeBaseInterfaceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEER26rcl_subscription_options_tE_clESO_SW_SY_[_ZZN6rclcpp27create_subscription_factoryIN8std_msgs3msg7String_ISaIvEEERFvSt10shared_ptrIS5_EES4_S5_NS_12SubscriptionIS5_S4_EEEENS_19SubscriptionFactoryEOT0_NS_23message_memory_strategy21MessageMemoryStrategyIT2_T1_E9SharedPtrES6_ISI_EENKUlPNS_15node_interfaces17NodeBaseInterfaceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEER26rcl_subscription_options_tE_clESO_SW_SY_]+0xa6): undefined reference to `rosidl_message_type_support_t const* rosidl_typesupport_cpp::get_message_type_support_handle<std_msgs::msg::String_<std::allocator<void> > >()'
collect2: error: ld returned 1 exit status
make[2]: *** [simple_bridge_2_to_1] Error 1
CMakeFiles/simple_bridge_2_to_1.dir/build.make:158: recipe for target 'simple_bridge_2_to_1' failed
CMakeFiles/Makefile2:2187: recipe for target 'CMakeFiles/simple_bridge_2_to_1.dir/all' failed
make[1]: *** [CMakeFiles/simple_bridge_2_to_1.dir/all] Error 2 |
@dirk-thomas also if I try to follow your suggestion, regarding the Terminal C, it fails: colcon build --symlink-install --packages-select ros1_bridge --cmake-force-configure --event-handlers console_direct+
Starting >>> ros1_bridge
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found rmw: 0.6.1 (/opt/ros/crystal/share/rmw/cmake)
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.7", minimum required is "3")
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Override CMake install command with custom implementation using symlinks instead of copying resources
-- Found rosidl_adapter: 0.6.3 (/opt/ros/crystal/share/rosidl_adapter/cmake)
-- Found rclcpp: 0.6.3 (/opt/ros/crystal/share/rclcpp/cmake)
-- Found rmw_implementation_cmake: 0.6.1 (/opt/ros/crystal/share/rmw_implementation_cmake/cmake)
-- Found std_msgs: 0.6.1 (/opt/ros/crystal/share/std_msgs/cmake)
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'roscpp'
-- No package 'roscpp' found
CMake Warning at CMakeLists.txt:33 (message):
Failed to find ROS 1 roscpp, skipping...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nuno/PX4/px4_ros_com_ros2/build/ros1_bridge
Install the project...
-- Install configuration: ""
-- Execute custom install script
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ament_index/resource_index/package_run_dependencies/ros1_bridge
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ament_index/resource_index/parent_prefix_path/ros1_bridge
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ros1_bridge/environment/ament_prefix_path.sh
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ros1_bridge/environment/path.sh
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ros1_bridge/local_setup.bash
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ros1_bridge/local_setup.sh
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ros1_bridge/local_setup.zsh
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ament_index/resource_index/packages/ros1_bridge
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ros1_bridge/cmake/ros1_bridgeConfig.cmake
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ros1_bridge/cmake/ros1_bridgeConfig-version.cmake
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ros1_bridge/package.xml
--- stderr: ros1_bridge
CMake Warning at CMakeLists.txt:33 (message):
Failed to find ROS 1 roscpp, skipping...
---
Finished <<< ros1_bridge [1.50s]
Summary: 1 package finished [1.58s]
1 package had stderr output: ros1_bridge |
Are similar paths to the bellow that I should expect? -- Using CMAKE_PREFIX_PATH: /home/nuno/PX4/px4_ros_com_ros2/install/px4_msgs;/home/nuno/PX4/px4_ros_com_ros2/install/px4_ros_com;/home/nuno/PX4/px4_ros_com_ros1/install/px4_ros_com;/home/nuno/PX4/px4_ros_com_ros1/install/px4_msgs;/opt/ros/melodic;/opt/ros/crystal;/home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge
-- This workspace overlays: /home/nuno/PX4/px4_ros_com_ros1/install/px4_ros_com;/home/nuno/PX4/px4_ros_com_ros1/install/px4_msgs;/opt/ros/melodic |
With the steps I mentioned I above I only get that far:
In order to be able to help you with your problem I need to be able to easily reproduce the case following our recommended workflow and copy-n-paste steps. Currently that is not the case and it took me way too much time to even get until here. Therefore I will wait for more thorough steps before trying it again. |
I get that but we are setting this on the same script so or I install
The only thing required is installing FastRTPS on your system by source or using a binary release. You should install release 1.7.
Most of the steps are documented in https://dev.px4.io/en/middleware/micrortps.html. But part of it is already outdated given the restructure I did on |
@dirk-thomas thanks for giving a try to this. |
I will try to capture the reasons for the various failures mentioned in this thread as well as how to fix them:
When building a ROS 2 workspace the ROS_DISTRO environment variable must be set to the ROS 2 distro name. Otherwise the implicitly sourced environment will print a warning which isn't expected and results in that failue.
Do not mix the order of ROS 1 and ROS 2 workspaces: always source all ROS 1 workspace first, then source all ROS 2 workspaces. That ensures that CMake finds the ROS 2 packages (pkg_config is used for ROS 1 packages).
resulting in:
This doesn't work since the
or
This happens when the ROS 2 package With all this I was finally able to build the bridge. So nothing seems to indicate a problem in this package since all issues are related to the environment setup. |
This comment has been minimized.
This comment has been minimized.
Since there is no further comment I assume the problem was somewhere in the process and you were able to resolve it based on the provided information. |
@dirk-thomas I am actually still trying to find a way of having this done in a propper way and still maintain flexibility. Regarding the |
Also, even after building both workspaces in separate windows and having colcon build --symlink-install --packages-select ros1_bridge --cmake-force-configure --event-handlers console_direct+
Starting >>> ros1_bridge
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found rmw: 0.6.1 (/opt/ros/crystal/share/rmw/cmake)
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.7", minimum required is "3")
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Override CMake install command with custom implementation using symlinks instead of copying resources
-- Found rosidl_adapter: 0.6.3 (/opt/ros/crystal/share/rosidl_adapter/cmake)
-- Found rclcpp: 0.6.3 (/opt/ros/crystal/share/rclcpp/cmake)
-- Found rmw_implementation_cmake: 0.6.1 (/opt/ros/crystal/share/rmw_implementation_cmake/cmake)
-- Found std_msgs: 0.6.1 (/opt/ros/crystal/share/std_msgs/cmake)
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'roscpp'
-- No package 'roscpp' found
CMake Warning at CMakeLists.txt:33 (message):
Failed to find ROS 1 roscpp, skipping...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nuno/PX4/px4_ros_com_ros2/build/ros1_bridge
Install the project...
-- Install configuration: ""
-- Execute custom install script
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ament_index/resource_index/package_run_dependencies/ros1_bridge
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ament_index/resource_index/parent_prefix_path/ros1_bridge
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ros1_bridge/environment/ament_prefix_path.sh
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ros1_bridge/environment/path.sh
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ros1_bridge/local_setup.bash
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ros1_bridge/local_setup.sh
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ros1_bridge/local_setup.zsh
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ament_index/resource_index/packages/ros1_bridge
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ros1_bridge/cmake/ros1_bridgeConfig.cmake
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ros1_bridge/cmake/ros1_bridgeConfig-version.cmake
-- Symlinking: /home/nuno/PX4/px4_ros_com_ros2/install/ros1_bridge/share/ros1_bridge/package.xml
--- stderr: ros1_bridge
CMake Warning at CMakeLists.txt:33 (message):
Failed to find ROS 1 roscpp, skipping...
---
Finished <<< ros1_bridge [1.30s]
Summary: 1 package finished [1.38s]
1 package had stderr output: ros1_bridge The process, in the same terminal:
|
A further note: I am building the ROS1 workspace using |
If you want to use a ROS 1 package you should source a ROS 1 environment. Anything else is a hack.
If you are referring to the package provided by Debian upstream you shouldn't mix those packages with packages provided by the OSRF apt repo.
Please re-read my previous comment where I specifically mention this case and that you need to manually source the ROS 1 underlay (before sourcing the ROS 1 overlay). |
Alright so that did solve the issue. But now, I am facing the problem with Starting >>> ros1_bridge
-- Found rmw: 0.6.1 (/opt/ros/crystal/share/rmw/cmake)
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Override CMake install command with custom implementation using symlinks instead of copying resources
-- Found rosidl_adapter: 0.6.3 (/opt/ros/crystal/share/rosidl_adapter/cmake)
-- Found rclcpp: 0.6.3 (/opt/ros/crystal/share/rclcpp/cmake)
-- Found rmw_implementation_cmake: 0.6.1 (/opt/ros/crystal/share/rmw_implementation_cmake/cmake)
-- Found ament_lint_auto: 0.6.3 (/opt/ros/crystal/share/ament_lint_auto/cmake)
CMake Error at CMakeLists.txt:67 (message):
Failed to find ROS 2 package 'diagnostic_msgs'
-- Configuring incomplete, errors occurred!
See also "/home/nuno/PX4/px4_ros_com_ros2/build/ros1_bridge/CMakeFiles/CMakeOutput.log".
--- stderr: ros1_bridge
CMake Error at CMakeLists.txt:67 (message):
Failed to find ROS 2 package 'diagnostic_msgs'
---
Failed <<< ros1_bridge [ Exited with code 1 ]
Summary: 0 packages finished [0.69s]
1 package failed: ros1_bridge
1 package had stderr output: ros1_bridge |
OK, I just saw that that PR was just to induce an error message when the package is not found. So in that sense, I am still blocked since I am getting into the same trouble as before.
I did this and I am facing the same problem as before. |
@dirk-thomas from the #168 (comment) comment, it's not clear what steps did you actually take to make this work. Would you mind writing them so I can properly reproduce a working setup? Thanks! |
This thread describes numerous different problems. So this is simply not enough information for me to give you any feedback.
I have reproduced your setup multiple times and tried to comment on each and every problem discovered in this thread and how I got around them. At the end it built successfully for me - with the steps described before. As mentioned before: if you would like help to debug a problem you can't resolve please include all exact steps you are doing and the resulting error as well as what you have already tried to resolve the problem. |
Ok, so there's not misunderstand here:
In terminal 3, this results in:
|
I assume you have double checked that the ROS 2 package |
Yes I have and it is available.
How do I effectively check that? |
@dirk-thomas is the order of the setup I wrote in #168 (comment) correct or not? Cause that's what I am trying to figure out. I still cannot be sure I am following the right procedure and can't move on to other kind of debug if I am not even sure I am following the correct order of the setup. |
Update: New attempt, now without |
It looks fine.
When you get to the error message
|
$ env | grep _PREFIX_PATH
AMENT_PREFIX_PATH=/home/nuno/PX4/px4_ros_com_ros2/install/px4_ros_com:/home/nuno/PX4/px4_ros_com_ros2/install/px4_msgs:/opt/ros/crystal
CMAKE_PREFIX_PATH=/home/nuno/PX4/px4_ros_com_ros2/install/px4_ros_com:/home/nuno/PX4/px4_ros_com_ros2/install/px4_msgs:/home/nuno/PX4/px4_ros_com_ros1/install/px4_ros_com:/home/nuno/PX4/px4_ros_com_ros1/install/px4_msgs:/opt/ros/melodic
COLCON_PREFIX_PATH=/home/nuno/PX4/px4_ros_com_ros2/install:/home/nuno/PX4/px4_ros_com_ros1/install:/opt/ros/crystal What output should I expect? Since |
When you mean in front, do you mean, in the Note: I think the problem here is that AMENT_PREFIX_PATH=/home/nuno/PX4/px4_ros_com_ros2/install/px4_ros_com:/home/nuno/PX4/px4_ros_com_ros2/install/px4_msgs:/opt/ros/crystal
CMAKE_PREFIX_PATH=/home/nuno/PX4/px4_ros_com_ros2/install/px4_ros_com:/home/nuno/PX4/px4_ros_com_ros2/install/px4_msgs
COLCON_PREFIX_PATH=/home/nuno/PX4/px4_ros_com_ros2/install:/opt/ros/crystal |
Yes, the order of paths in
Please check my comment from above (#168 (comment)):
What version of |
|
I suppose we are expecting ros2/ros2#653 fix, meaning ros2/ros_workspace#11, to be included, but from what I can see, https://discourse.ros.org/t/patch-release-and-new-packages-for-ros-2-crystal-clemmys-2019-02-14/7867 is out but my system states it's up to date. |
http://repo.ros2.org/status_page/ros_crystal_default.html?q=ros_workspace. It seems to be the latest. So I suppose it includes the patch as well, meaning that this still doesn't seem to be the problem. |
Just because the announcement was sent on Feb 14th doesn't imply that all Debian packages have been rebuilt on that date. Actually it is very common that the rebuild happens some time before and the resulting Debian packages are being checked / tested before being announced. The second patch release announcement does contain this version bump:
And you already confirmed that you do have version I have to revised my previous comment:
As long as When your build in the 3rd terminal failed the environment was: CMAKE_PREFIX_PATH=
/home/nuno/PX4/px4_ros_com_ros2/install/px4_ros_com:
/home/nuno/PX4/px4_ros_com_ros2/install/px4_msgs:
/home/nuno/PX4/px4_ros_com_ros1/install/px4_ros_com:
/home/nuno/PX4/px4_ros_com_ros1/install/px4_msgs:
/opt/ros/melodic
COLCON_PREFIX_PATH=
/home/nuno/PX4/px4_ros_com_ros2/install:
/home/nuno/PX4/px4_ros_com_ros1/install:
/opt/ros/crystal While If it does read something like this: |
The latest release of |
@dirk-thomas so should I wait for a new ROS patch release? |
@dirk-thomas by manually exporting the export CMAKE_PREFIX_PATH=/home/nuno/PX4/px4_ros_com_ros2/install/px4_ros_com:/home/nuno/PX4/px4_ros_com_ros2/install/px4_msgs:/home/nuno/PX4/px4_ros_com_ros1/install/px4_ros_com:/home/nuno/PX4/px4_ros_com_ros1/install/px4_msgs:/opt/ros/crystal:/opt/ros/melodic It seems I was able to build the bridge, even though with some warnings regarding CMake Warning at CMakeLists.txt:117 (add_executable):
Cannot generate a safe runtime search path for target dynamic_bridge
because files in some directories may conflict with libraries in implicit
directories:
runtime library [liburdfdom_sensor.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/crystal/lib
runtime library [liburdfdom_model_state.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/crystal/lib
runtime library [liburdfdom_model.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/crystal/lib
runtime library [liburdfdom_world.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/crystal/lib
Some of these libraries may not be found correctly.
Call Stack (most recent call first):
CMakeLists.txt:177 (custom_executable)
CMake Warning at CMakeLists.txt:117 (add_executable):
Cannot generate a safe runtime search path for target static_bridge because
files in some directories may conflict with libraries in implicit
directories:
runtime library [liburdfdom_sensor.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/crystal/lib
runtime library [liburdfdom_model_state.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/crystal/lib
runtime library [liburdfdom_model.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/crystal/lib
runtime library [liburdfdom_world.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/crystal/lib
Some of these libraries may not be found correctly.
Call Stack (most recent call first):
CMakeLists.txt:163 (custom_executable)
CMake Warning at CMakeLists.txt:146 (add_library):
Cannot generate a safe runtime search path for target ros1_bridge because
files in some directories may conflict with libraries in implicit
directories:
runtime library [liburdfdom_sensor.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/crystal/lib
runtime library [liburdfdom_model_state.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/crystal/lib
runtime library [liburdfdom_model.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/crystal/lib
runtime library [liburdfdom_world.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/crystal/lib
Some of these libraries may not be found correctly.
CMake Warning at CMakeLists.txt:117 (add_executable):
Cannot generate a safe runtime search path for target parameter_bridge
because files in some directories may conflict with libraries in implicit
directories:
runtime library [liburdfdom_sensor.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/crystal/lib
runtime library [liburdfdom_model_state.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/crystal/lib
runtime library [liburdfdom_model.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/crystal/lib
runtime library [liburdfdom_world.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/crystal/lib
Some of these libraries may not be found correctly.
Call Stack (most recent call first):
CMakeLists.txt:170 (custom_executable) This is however outputting as a
Also, I suppose that soon as the new release of |
Python packages like |
I haven't seen the warnings during my build (if I remember correctly). I general I wouldn't recommend to ignore such warnings. The packaging_linux job doesn't show that warning either but it is also using a much simpler setup than your builds. I am not sure what exact part causes the warnings in your case.
CMake outputs warnings to |
Yep it seems like I don't require to manually extend
Do you have any tip on what may be causing this? I only get this on
Yes that seems reasonable. Thanks! |
Some ROS 1 package(s) is linking against it (expecting the libraries to come from |
@dirk-thomas I do see another thing appearing in the terminal where I am building the [0.179s] WARNING:colcon.colcon_ros.prefix_path.catkin:The path '/home/nuno/PX4/px4_ros_com_ros1/install/px4_ros_com' in the environment variable CMAKE_PREFIX_PATH seems to be a catkin workspace but it doesn't contain any 'local_setup.*' files. Maybe the catkin version is not up-to-date?
[0.180s] WARNING:colcon.colcon_ros.prefix_path.catkin:The path '/home/nuno/PX4/px4_ros_com_ros1/install/px4_msgs' in the environment variable CMAKE_PREFIX_PATH seems to be a catkin workspace but it doesn't contain any 'local_setup.*' files. Maybe the catkin version is not up-to-date?
[0.180s] WARNING:colcon.colcon_ros.prefix_path.catkin:The path '/opt/ros/melodic' in the environment variable CMAKE_PREFIX_PATH seems to be a catkin workspace but it doesn't contain any 'local_setup.*' files. Maybe the catkin version is not up-to-date? |
Currently the ROS 1 overlay built with
ros/catkin#993 is introducing these |
Alright makes sense. Thanks! Although it's still not clear to me how to solve the |
@dirk-thomas I have been facing similar issue, exactly similar to the below comment, where I get the same error in Terminal B and can't find a way to solve it to reach Terminal C. Using Ubuntu 18.04, ROS1 Melodic, and ROS2 Crystal. Your feedback would be much appreciated on how did you resolve this issue and was able to build ros1_bridge accordingly in the the third terminal. Thank you!
|
@slmat27 Please ask your question on answers.ros.org and include enough information to reproduce your problem.
For this generic question my simple answer will be: as described in the above thread. |
@dirk-thomas Thank you for your feedback, I came directly to you instead of ROS Answers, since your problem was exactly like mine and I read all the messages in the thread above, but none was explaining how did you solve the problem. I am using Ubuntu 18.04, with ROS Melodic and ROS2 Crystal, followed these setup steps:
Steps to reproduce issue:
which based on the above thread, it was the same error you got and @TSC21 replied saying:
which I already have it installed, but yet the error persists and I was simply wondering if you can help me fixing the error you managed to fix, since my ultimate goal later is to build Thanks once again! |
@slmat27 if you have doubts regarding how to properly set px4_ros_com, move your questions to an issue on px4_ros_com instead. What was debated here was a completely different matter. Thanks |
Bug report
Required Info:
ros1_bridge
from source. ROS Melodic and ROS2 Crystal by deb961ddee6b76bcb670ce3cb939d125044de820102
Steps to reproduce issue
master
branch to a ROS2 workspace;master
branch to the same ROS2 workspace;ros1
to a ROS1 workspace;ros1
branch to the same ROS1 workspace;colcon
;ros1_bridge
to the ROS2 workspace;ros1_bridge
, by the same order:ros1_bridge
usingcolcon build --symlink-install --packages-select ros1_bridge --cmake-force-configure
.Expected behavior
It's expected that the
ros1_bridge
builds successfully. A notice that the above works when using the ROS2 Bouncy release.Actual behavior
Output from the console:
The text was updated successfully, but these errors were encountered: