-
Notifications
You must be signed in to change notification settings - Fork 2
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
i2c/i2c.h is missing from Include folder #3
Comments
I think you might be missing libi2c-dev from the host environment. Either that or the dependency hasn't been explicitly declared on the ROS Node. Here's a repo with a dockerfile which shows how it can be consumed - https://github.com/polyhobbyist/jetbot |
Thank you for quick replay. I have libi2c-dev installed on Jetson. I added manually i2c.h on the include folder and now I get this error: colcon build --packages-select ros_qwiic_icm_20948
|
I'll take a look in a couple days - i'm not near my Jetson at the moment. The warning manifests on the jetson - I haven't root caused it. However, you can work around it by using |
Did you have a look on this issue? Your last suggestion did not solve it. Thanks. |
Thanks for checking in - I'll look at it tonight. |
Working on this now - can you tell me more about how you are using this library? Are you using it in a container or on bare metal? |
I have Ubuntu 20.04 installed on Jetson nano and ros2 foxy. |
Can you post the full build log? (either from the logs folder, or colcon build --event-handlers=console_direct+) I'm unable to reproduce this. the i2c/i2c.h comes from an external cmake project: find_program(MAKE_EXECUTABLE
NAMES gmake mingw32-make make
NAMES_PER_DIR
DOC "GNU Make")
if(NOT MSVC)
include(ExternalProject)
ExternalProject_Add(libi2c
GIT_REPOSITORY https://github.com/amaork/libi2c.git
UPDATE_DISCONNECTED true
BUILD_IN_SOURCE true
CONFIGURE_COMMAND ""
BUILD_COMMAND ${MAKE_EXECUTABLE}
INSTALL_COMMAND ""
)
ExternalProject_Get_property(libi2c SOURCE_DIR)
message (STATUS "*** libi2c installed to ${SOURCE_DIR}")
target_link_libraries(${PROJECT_NAME} ${SOURCE_DIR}/libi2c.so)
add_dependencies(${PROJECT_NAME} libi2c)
else()
endif() I suspect that this isn't being included. Maybe because make isn't found? or the network is blocked? |
Thanks for the logs. un ros_qwiic_icm_20948 do you have the following line in the makefile? add_dependencies(${PROJECT_NAME} libi2c) which happens after these lines? message (STATUS "*** libi2c installed to ${SOURCE_DIR}")
target_link_libraries(${PROJECT_NAME} ${SOURCE_DIR}/libi2c.so) �[35m�[1mScanning dependencies of target libi2c�[0m
�[35m�[1mScanning dependencies of target ros_qwiic_icm_20948�[0m
[ 6%] �[34m�[1mCreating directories for 'libi2c'�[0m
[ 13%] �[34m�[1mPerforming download step (git clone) for 'libi2c'�[0m
[ 26%] �[32mBuilding CXX object CMakeFiles/ros_qwiic_icm_20948.dir/src/wiring_for_ros/Wire.cpp.o�[0m
[ 26%] �[32mBuilding CXX object CMakeFiles/ros_qwiic_icm_20948.dir/src/wiring_for_ros/SPI.cpp.o�[0m
[ 33%] �[32mBuilding CXX object CMakeFiles/ros_qwiic_icm_20948.dir/src/main.cpp.o�[0m
[ 40%] �[32mBuilding CXX object CMakeFiles/ros_qwiic_icm_20948.dir/src/wiring_for_ros/Arduino.cpp.o�[0m
Your branch is up to date with 'origin/master'.
[ 53%] �[34m�[1mSkipping update step for 'libi2c'�[0m
[ 53%] �[34m�[1mNo patch step for 'libi2c'�[0m
[ 60%] �[34m�[1mNo configure step for 'libi2c'�[0m
[ 66%] �[34m�[1mPerforming build step for 'libi2c'�[0m |
I added jetson@nano:~/dev_ws$ colcon build --packages-select ros_qwiic_icm_20948
|
jetson@nano:~/dev_ws$ colcon build --packages-select ros_qwiic_icm_20948
|
jetson@nano:~/dev_ws$ ros2 launch ros_qwiic_icm_20948 qwiic.launch.py |
hmmm... it looks like the --package-select causes the issue. Not quite sure why. |
I got error i2c/i2c.h missing when I try to build the ICM 20948 ros node package on jetson nano with ros2 foxy .
How to fix it?
Thanks
The text was updated successfully, but these errors were encountered: