Giter Club home page Giter Club logo

Comments (9)

Chambana avatar Chambana commented on August 11, 2024

I believe this issue is related to CMake 3.16 (the default version for Ubuntu 20.04).

In any case, a workaround was found.
The CMakeLists has "humble" hardcoded into a path. Changing that, along with 2 others small tweaks, allow for this repo to compile and (as far as I've tested) work satisfactorily in Ubuntu 20.04 w/ROS2 Foxy.

If you need this repo to work on Foxy or want to make this repo support ROS2 Foxy natively, see my fork with changes.
Chambana@655f745

from witmotion_imu_ros.

twdragon avatar twdragon commented on August 11, 2024

@Chambana can you prepare a PR to do that?

from witmotion_imu_ros.

gsokoll avatar gsokoll commented on August 11, 2024

Rather than hard coding in the ROS2 release name, I think you can address this by appropriate use of find_package() and set() in the CMakeLists.txt. Something like:

# Find dependencies
find_package(ament_cmake REQUIRED)
find_package(tf2 REQUIRED)
find_package(tf2_geometry_msgs REQUIRED)
find_package(rclcpp REQUIRED)
....

set(THIS_PACKAGE_INCLUDE_DEPENDS
  tf2 
  tf2_geometry_msgs 
  rclcpp
  ...
  )

ament_target_dependencies(witmotion_ros ${THIS_PACKAGE_INCLUDE_DEPENDS})

from witmotion_imu_ros.

tfoldi avatar tfoldi commented on August 11, 2024

@gsokoll do you have a PR you can share? ran into the same issue...

from witmotion_imu_ros.

tfoldi avatar tfoldi commented on August 11, 2024

nevermind, I did for myself. shall I share a PR? I did changes like instead of using qt5_wrap_cpp I went for AUTOMOC:

# JY901

add_library(witmotion-jy901 SHARED
    src/jy901-uart.cpp
    include/witmotion/jy901-uart.h
    )
  target_link_libraries(witmotion-jy901 witmotion-wt901 Qt5::Core)
  add_executable(witmotionctl-jy901
      src/jy901-control.cpp
    )
  target_link_libraries(witmotionctl-jy901 witmotion-jy901 Qt5::Core)

set_target_properties(witmotion-jy901 PROPERTIES AUTOMOC TRUE)

for the top level CMakeLists.txt I did what gsokoll suggested:


set(dependencies
  tf2
  tf2_geometry_msgs
  rclcpp
  std_srvs
  sensor_msgs
  std_msgs
  rcl_interfaces
  rclcpp_lifecycle
  lifecycle_msgs
  )
ament_target_dependencies(witmotion_ros ${dependencies})

it builds on my Mac as well

from witmotion_imu_ros.

gsokoll avatar gsokoll commented on August 11, 2024

@tfoldi a PR would be great.

from witmotion_imu_ros.

tfoldi avatar tfoldi commented on August 11, 2024

was a heroic battle with Iron dependencies, but #36 compiles on Humble, Iron and Rolling. I've added a github action/workflow that checks compilation on these distributions

from witmotion_imu_ros.

tfoldi avatar tfoldi commented on August 11, 2024

@gsokoll can you have a look at #36? does it look right?

from witmotion_imu_ros.

twdragon avatar twdragon commented on August 11, 2024

@tfoldi elaborating #36

from witmotion_imu_ros.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.