conan-io / conan-io/examples2

rosenv example conanfile.py representation

Open
#218 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
125
Forks
64
PR merge metrics
No merged PRs in 30d

Description

Hi There,

I was trying to use a conanfile.py instead of the provided conanfile.txt for the ROS navigation example.
I followed https://blog.conan.io/2024/11/28/Enhancing-ros-builds-with-Conan.html and I used this conanfile.py:
`from conan import ConanFile

class NavigaritonROS(ConanFile):
name = "Navigation ROS" # You can change this to your project name
version = "1.0" # You can change this to your project version

# No settings are necessary for this simple case
settings = "os", "compiler", "build_type", "arch"

# Define the required dependencies
requires = [
"yaml-cpp/0.8.0"
]

# Define the generators
generators = [
"CMakeDeps",
"CMakeToolchain",
"ROSEnv"
]`

The generator did its job and created navigation_ws/install/conan/conanrosenv.sh as expected but colcon build command failed by not finding the rclcpp/rclcpp.hpp file:

Image

Using the provided conanfile.txt is working fine.

Could you please give me some hints what is wrong using the conanfile.py?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.