-
Notifications
You must be signed in to change notification settings - Fork 176
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
vectornav_msgs ROS2 node does not build without linking tf2_geometry_msgs #58
Comments
PR's always appreciated!
…On Fri, Apr 9, 2021, 16:25 Josh Finken ***@***.***> wrote:
Sensor details:
- Model: VN-200T-CR
- Firmware Version: 2.0.0.1
- Hardware Version : 3
ROS2 version:
- ros2-foxy built from source
Symptom:
- colcon build results in the below header file not found error
Example:
$ colcon build --symlink-install
...
vectornav/vectornav/src/vn_sensor_msgs.cc:24:10: fatal error: tf2_geometry_msgs/tf2_geometry_msgs.h: No such file or directory
#include "tf2_geometry_msgs/tf2_geometry_msgs.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This can be resolved with this change to CMakeLists.txt (effectively
adding tf2_geometry_msgs):
diff --git a/vectornav/CMakeLists.txt b/vectornav/CMakeLists.txt
index 0cf42c8..2af957a 100644
--- a/vectornav/CMakeLists.txt
+++ b/vectornav/CMakeLists.txt
@@ -35,7 +35,7 @@ target_link_libraries(${PROJECT_NAME} vncxx )
# vn_sensor_msgs
add_executable(vn_sensor_msgs src/vn_sensor_msgs.cc)
-ament_target_dependencies(vn_sensor_msgs rclcpp sensor_msgs vectornav_msgs)
+ament_target_dependencies(vn_sensor_msgs rclcpp sensor_msgs vectornav_msgs tf2_geometry_msgs)
I'd be happy to submit a PR to the ros2 branch if interested. Thanks!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#58>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXHVF3E4HAFJEU6XVJDRJLTH5PCBANCNFSM42VT3EXQ>
.
|
I will note that an almost identical build error has surfaced due to the include change made in #114 . Older ROS2 distros (ex. Foxy) only provide tf2_geometry_msgs.h and not a .hpp. The solution involves either changing the .hpp include back to a .h on line 24 of vn_sensor_msgs.cc, or manually adding the newer .hpp header to the tf2_geometry_msgs package. |
Thank you, I had the same issue and this helped! |
On commit
|
Sensor details:
ROS2 version:
Symptom:
colcon build
results in the below header file not found errorExample:
$ colcon build --symlink-install ... vectornav/vectornav/src/vn_sensor_msgs.cc:24:10: fatal error: tf2_geometry_msgs/tf2_geometry_msgs.h: No such file or directory #include "tf2_geometry_msgs/tf2_geometry_msgs.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This can be resolved with this change to
CMakeLists.txt
(effectively addingtf2_geometry_msgs
):I'd be happy to submit a PR to the
ros2
branch if interested. Thanks!The text was updated successfully, but these errors were encountered: