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

can not install package people_tracking_filters #112

Open
bkhnk48 opened this issue Dec 1, 2023 · 1 comment
Open

can not install package people_tracking_filters #112

bkhnk48 opened this issue Dec 1, 2023 · 1 comment

Comments

@bkhnk48
Copy link

bkhnk48 commented Dec 1, 2023

I run the command colcon build to install people_msgs. However, I got error as installing people_tracking_filters
colcon build

[1.388s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:
	'turtlesim' is in: /opt/ros/humble
If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.
If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.

If you understand the risks and want to override a package anyways, add the following to the command line:
	--allow-overriding turtlesim

This may be promoted to an error in a future release of colcon-override-check.
Starting >>> people_msgs
Starting >>> hunav_msgs
Starting >>> hunav_rviz2_panel                                             
Starting >>> turtlesim
Finished <<< people_msgs [1.94s]                                                                                                                           
Starting >>> people_tracking_filter
Starting >>> face_detector                                                                                                                              
Finished <<< turtlesim [2.00s]                                                                                                                                                 
--- stderr: people_tracking_filter                                                                                                                        
CMake Error at /usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:603 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:825 (_pkg_check_modules_internal)
  CMakeLists.txt:6 (pkg_check_modules)

---
Failed   <<< people_tracking_filter [0.36s, exited with code 1]
Aborted  <<< face_detector [0.42s]                                                                                                       
Aborted  <<< hunav_msgs [3.50s]                                                                         
Aborted  <<< hunav_rviz2_panel [6.06s]                            

Summary: 2 packages finished [7.41s]
  1 package failed: people_tracking_filter
  3 packages aborted: face_detector hunav_msgs hunav_rviz2_panel
  2 packages had stderr output: face_detector people_tracking_filter
  7 packages not processed

My OS is Ubuntu 22.04.3 LTS, my ROS2 is humble
As reading the above message, it sounds like orocos-bfl was not found. But I can not install the orocos-bfl as well.
As I run colcon build, I got the error:

--- stderr: orocos-bayesian-filtering                                                                                                                                                     
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must contain a literal, direct call to the project() command.  Add a line of code such as
    project(ProjectName)
  near the top of the file, but after cmake_minimum_required().
  CMake is pretending there is a "project(Project)" command on the first line. This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
  Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions.
CMake Error at CMakeLists.txt:2 (include):
  include could not find requested file:
    /core/rosbuild/rosbuild.cmake
CMake Error at CMakeLists.txt:17 (rosbuild_make_distribution):
  Unknown CMake command "rosbuild_make_distribution".

perhaps, the orocos-bfl is not available for ROS2 humble. Is there any alternative package for orocos-bfl?
Thank you

@bkhnk48
Copy link
Author

bkhnk48 commented Dec 1, 2023

After several attempts, it sounds like I successfully install orocos-bfl. Then I modify the CMakeLists.txt of people_tracking_filters:

cmake_minimum_required(VERSION 3.5)
project(people_tracking_filter)

# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
  set(CMAKE_CXX_STANDARD 14)
endif()

# Look for bfl (Bayesian Filtering Library)
find_package(PkgConfig)
pkg_check_modules(BFL REQUIRED orocos-bfl)
link_directories(${BFL_LIBRARY_DIRS})

# Find dependencies
find_package(ament_cmake REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(message_filters REQUIRED)
find_package(people_msgs REQUIRED)
find_package(rclcpp REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(std_msgs REQUIRED)
find_package(tf2 REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(Boost REQUIRED COMPONENTS thread)

# Declare a library
add_library(${PROJECT_NAME} SHARED
  src/uniform_vector.cpp
  src/gaussian_vector.cpp
  src/gaussian_pos_vel.cpp
  src/mcpdf_pos_vel.cpp
  src/mcpdf_vector.cpp
  src/sysmodel_pos_vel.cpp
  src/sysmodel_vector.cpp
  src/measmodel_pos.cpp
  src/measmodel_vector.cpp
  src/tracker_particle.cpp
  src/tracker_kalman.cpp
  src/detector_particle.cpp
)
ament_target_dependencies(${PROJECT_NAME}
  geometry_msgs
  message_filters
  people_msgs
  rclcpp
  sensor_msgs
  std_msgs
  tf2
  tf2_ros
  Boost
)
target_link_libraries(${PROJECT_NAME} ${BFL_LIBRARIES})

# Declare an executable
add_executable(people_tracker src/people_tracking_node.cpp)
ament_target_dependencies(people_tracker ${PROJECT_NAME})

# Install
install(TARGETS ${PROJECT_NAME} people_tracker
  ARCHIVE DESTINATION lib
  LIBRARY DESTINATION lib
  RUNTIME DESTINATION lib/${PROJECT_NAME}
)
install(DIRECTORY include/ DESTINATION include)
install(DIRECTORY launch DESTINATION share/${PROJECT_NAME})

# Testing
if(BUILD_TESTING)
  find_package(ament_lint_auto REQUIRED)
  ament_lint_auto_find_test_dependencies()
endif()

# Must be called *after* the targets to check have been declared
ament_package()

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

No branches or pull requests

1 participant