Skip to content

Commit

Permalink
fix: Fixed building with ROS
Browse files Browse the repository at this point in the history
  • Loading branch information
maceiras committed Dec 16, 2024
1 parent d11d1eb commit c374aa3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ set(PYTHON_SITE_PACKAGES_INSTALL_DIR "${Python3_SITEARCH}")


if(DEFINED ENV{USE_COLCON})

set(PYTHON_SITE_PACKAGES_REL_INSTALL_DIR "lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/dist-packages")
set(PYTHON_SITE_PACKAGES_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${PYTHON_SITE_PACKAGES_REL_INSTALL_DIR}")

message(STATUS "ROS2 INSTALLATION DETECTED")
find_package(ament_cmake REQUIRED)
find_package(ament_cmake_python REQUIRED)
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ compiling *pygafro*, which can become problematic on lower-end computers.
export CXX=/usr/bin/clang++
pip install pygafro

## Installation with ROS2

Add PyGafro in your colcon workspace and build it with:

CC=clang CXX=clang++ USE_COLCON=1 colcon build

## Installation from source

(works either in a conda or virtual environment)
Expand Down

0 comments on commit c374aa3

Please sign in to comment.