Skip to content

rosenv example conanfile.py representation #218

@sschleic

Description

@sschleic

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions