ROS2 in external project

84 views
Skip to first unread message

Giri Mugundan

unread,
Dec 26, 2024, 10:44:28 AM12/26/24
to ProjectChrono
Hello all,

Thank you for your amazing open source software. I have been trying to integrate the ROS2 module in my external project. I followed the instructions, sourced my ROS2 Humble environment, cloned and built chrono_ros_interfaces, then sourced that local environment too and then built the ROS module and all it's examples. They run flawlessly without any issue.

Now, I want to try and include a simple publisher that publishes the state of my vehicle and a simple subscriber that subscribes to a set of control inputs. These are custom messages that I am trying to code with the example programs which are really helpful.

My issue now is that the minute I include ROS as a component I run into the ROS2-DIR_NOT_FOUND error.

find_package(Chrono

             COMPONENTS Irrlicht ROS

             OPTIONAL_COMPONENTS

             CONFIG)

I then tried the fix from this thread:

https://groups.google.com/g/projectchrono/c/UjbfrPj2sss/m/DPsrl6w4AgAJ

Still my error persists. Please do help me out. I really would like to make this work out as this new feature is a game changer.

Sincerely,

Giri Mugundan Kumar

Aaron Young

unread,
Jan 22, 2025, 5:22:41 PMJan 22
to ProjectChrono
Hi Giri,

Sorry for the delay. Were you able to figure out the issue? I can't seem to replicate the issue you mention here or in the other thread. ROS2_DIR should be the same as CHRONO_DIR if the installation works as expected. Ensure you're using an installed version (i.e. make install/ninja install) of chrono so the cmake files are correctly copied.

Thanks,
Aaron

Reply all
Reply to author
Forward
0 new messages