ROS2 can't be enabled

74 views
Skip to first unread message

Salman Husain

unread,
Nov 5, 2025, 4:04:07 PMNov 5
to ProjectChrono
Hi,

I installed the parsers module correctly, and here is the version I am using:
sudo git log -3
commit b7287f1fd06d823ca451c6f257f0f218fec95a97 (HEAD -> main, origin/main, origin/HEAD)
Merge: 5457cc302 1ea3d7fe8
Author: Bocheng Zou <boche...@outlook.com>
Date:   Mon Nov 3 10:03:22 2025 -0600

However, cmake can't seem to find ROS2 even though it is sourced. I am attaching the cmake log.
cmake_log.txt

Bocheng Zou

unread,
Nov 5, 2025, 7:11:01 PMNov 5
to projec...@googlegroups.com

Hi Salman,

Could you please report (1) your OS version (e.g. Ubuntu 22.04), (2) your ROS 2 version (3) the cmake arguments that you use?

Best,

Bocheng Zou

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/projectchrono/c898a588-3722-4177-8839-49333737cb92n%40googlegroups.com.

Salman Husain

unread,
Nov 5, 2025, 7:15:16 PMNov 5
to ProjectChrono
Hi Bocheng Zou,

ROS2 Jazzy Jalisco on Ubuntu 24.04. I used the ccmake GUI, and turned the ROS module and Parser module on. For context, it builds just fine in a different directory where I used the tagged release of Chrono 9.0.1

Cheers,
sal



Bocheng Zou

unread,
Nov 5, 2025, 8:47:13 PMNov 5
to projec...@googlegroups.com

Hi sal,

Could you please check if ROS_DISTRO and AMENT_PREFIX_PATH present in your environment variable by using "env"? If not, you might need to run "source /opt/ros/Jazzy/setup.sh" in the same terminal as you run cmake to set it up.

Salman Husain

unread,
Nov 6, 2025, 3:47:45 PMNov 6
to ProjectChrono
Hi Bocheng Zou,

Yes, in fact I have sourced it on the source bashrc. Note, the tagged release builds with the ROS module just fine. 

Bocheng Zou

unread,
Nov 8, 2025, 11:51:51 PMNov 8
to projec...@googlegroups.com

Hi Salman,

Sorry for the long delay. Could you please perform the following inspection (all in the same terminal)?

1. Start in a completely new clone (without old build folder)

2. Manually run "source /opt/ros/Jazzy/setup.sh"

3. Report the value of ROS_DISTRO and AMENT_PREFIX_PATH using "echo $ROS_DISTRO" and "echo $AMENT_PREFIX_PATH"

4. Run the cmake configuration (remember to report the specific way you run cmake, e.g. through cmake-gui, cmake command line or other cmake tools).

I did try on my end with the latest commit and ROS 2 Jazzy today. It works well on my end. I additionally check all changes from v9.0.1 through the latest and confirmed that there isn't significant change that might be related to your issue.

Given the fact that you are able to compile the tagged release with ROS 2 but not the latest one, I think it's possible that there's some minor issue, such as you used the old build dir or used different cmake frontend which doesn't inherit variables in bashrc. 

Best,

Bocheng Zou

Reply all
Reply to author
Forward
0 new messages