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

fix issues with spdlog #15

Closed
wants to merge 2 commits into from
Closed

Conversation

jediofgever
Copy link

@jediofgever jediofgever commented Oct 20, 2021

Hi,
the foxy branch won't build without linking spdlog,

1 error detected in the compilation of "/home/atas/colcon_ws/src/perception_cupoch/cupoch_conversions/src/cupoch_conversions.cu".
CMake Error at cupoch_conversions_generated_cupoch_conversions.cu.o.Release.cmake:280 (message):
  Error generating file
  /home/atas/colcon_ws/build/cupoch_conversions/CMakeFiles/cupoch_conversions.dir/src/./cupoch_conversions_generated_cupoch_conversions.cu.o

The PR has included linking of spdlog

A few humble opinions that might be helpful and improve cupoch and its ROS integration;

  • colcon of ROS2 is actually able to build cupoch inside a workspace(e.g colcon_ws), this may not be desirable for some, as cupoch is a large library and takes time to build, but some may find it useful if they are actively modifying/developing code within cupoch, so you don't need to separately build ROS2 packages and cupoch.

  • I have copied the cmake files in perception_cupoch and used them to build ROS2 package,
    THank you ! these are very valuable, is there anything to do to simplify these files ? It took me some time to get my head around and build MWE with cupoch, perception_cupoch and my own ROS2 code

@ZhenshengLee
Copy link
Owner

@jediofgever thank you for your report and contributions!

  • colcon of ROS2 is actually able to build cupoch inside a workspace(e.g colcon_ws)

Yes you are right

  • as cupoch is a large library and takes time to build, but some may find it useful if they are actively modifying/developing code within cupoch

You can do some separation of interests, and just add a package named cupoch_contrib(I already have it https://github.com/ZhenshengLee/cupoch_contrib , let's do it together), like opencv and opencv_contrib, apollo, apollo_contrib

is there anything to do to simplify these files ?

Yes you can! In CMake it's a common case to write a FindCupoch.cmake file to help developer get better cpp intergrations.
Check this issue if you like #3
After this, you can use cupoch only through find_package(cupoch) as easy as OpenCV.

@ZhenshengLee ZhenshengLee self-requested a review October 25, 2021 02:32
@ZhenshengLee ZhenshengLee added the enhancement New feature or request label Oct 25, 2021
@ZhenshengLee ZhenshengLee modified the milestones: PR1, PR2 Oct 25, 2021
@ZhenshengLee ZhenshengLee linked an issue Oct 25, 2021 that may be closed by this pull request
Copy link
Owner

@ZhenshengLee ZhenshengLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

${spdlog_LIBRARIES} and spdlog are repeated, choose one and delete the other.

@@ -75,6 +77,7 @@ set(CUPOCH_LIBRARIES
liblzf
rply
spdlog
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

${spdlog_LIBRARIES} and spdlog are repeated, choose one and delete the other.

Copy link
Owner

@ZhenshengLee ZhenshengLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will have to change. Thanks.


APPEND_TARGET_ARCH_FLAGS()

set_directory_properties(PROPERTIES COMPILE_DEFINITIONS "")
APPEND_TARGET_ARCH_FLAGS()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repeated and trivial changes.

add_definitions(${CUPOCH_DEFINITIONS})
message("zs: ${CMAKE_PROJECT_NAME} CUDA_NVCC_FLAGS = " ${CUDA_NVCC_FLAGS})
include(GATest)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add this into cupoch_conversions/cmake/ga_build_common.cmake line 107 rather than here.

@@ -2,8 +2,8 @@
set(GA_BUILD_TEST ON)

# root dirs
#set(CUPOCH_ROOT $ENV{HOME}/colcon_ws/install/cupoch)
set(CUPOCH_ROOT "/opt/cupoch/cupoch/")
set(CUPOCH_ROOT $ENV{HOME}/colcon_ws/install/cupoch)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not commit this change. Individual developer maintains his/her own paths.

@ZhenshengLee
Copy link
Owner

@jediofgever friendly ping for any update?

@jediofgever
Copy link
Author

@ZhenshengLee apologies, I forget to keep track of this, I was planning to take a look into it one of these days

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

Successfully merging this pull request may close these issues.

Add findcupoch.cmake.
2 participants