Hi Giri,

Are you using the latest code in the ‘main’ branch of the Chrono GitHub 
repository? There were some recent commits addressing issues related to this 
kind of use of the Chrono::ROS module.

If yes, the Chrono CMake project configuration script should be tweaked a 
little bit more to pass a default for the ROS2_DIR path (Aaron, if you are 
reading this, could you please look into this?)

But even without that, the solution seems quite straightforward: during CMake 
configuration of your project, fill in the ROS2_DIR with the path where the 
CMake configuration files for ROS are located.  You must have done this already 
when you configured Chrono with the ROS module enabled. Simply put in here the 
same path as you did when configuring Chrono.

--Radu

From: projectchrono@googlegroups.com <projectchrono@googlegroups.com> On Behalf 
Of Giri Mugundan
Sent: Tuesday, December 24, 2024 5:09 PM
To: ProjectChrono <projectchrono@googlegroups.com>
Subject: Re: [chrono] Re: Chrono_ROS error while running demo_ROS_custom_handler

Hello All,

I have been trying to use the ROS2 module with an external project and 
everytime I try to compile I get errors (I have attached screenshots).

For more information:
1. I am using ROS2 Humble, I tried with Galactic too, but got the same results.
2. The example programs all compile and work for me.
3. I downloaded, built and then linked chrono_ros_interface during my chrono 
build processes and it works too.

Please help me out.

Sincerely,
Giri



On Friday, November 29, 2024 at 7:56:30 AM UTC-5 Radu Serban wrote:
I believe certain issues related to using Chrono::ROS in external projects are 
also due to an incomplete set up of this module in the Chrono project 
configuration file.
Harry – I will provide you with an updated configuration template file. If you 
could test that and confirm that it addresses the issues raised by Madhava I 
will push it to the main Chrono branch.
--Radu

From: 'Harry ZHANG' via ProjectChrono <projec...@googlegroups.com>
Sent: Wednesday, November 27, 2024 2:42 PM
To: ProjectChrono <projec...@googlegroups.com>
Subject: [chrono] Re: Chrono_ROS error while running demo_ROS_custom_handler

While we are trying to fix this issue, I just found out I forgot to make the 
debugging message public available in the user forum. Right now Madhava could 
fix the issue and run the demo, and the following is the debugging log that 
might be helpful for people have similar issues.

--------------------------------------------------------------------------------------------------------
Hello Madhava,

So, I think the issue you have is using/building Chrono::ROS as an external 
project . I have some suggesions that you can try.

1. Can you build and run Chrono::ROS related demos in the chrono/src/demos/ros/ 
folder? This is a good test of building and configuring Chrono::ROS module.

2. If you can run 1. fine, then we could narrow down the issue with external 
configuration of Chrono::ROS. We did something similar couple of places before. 
You can check: 1): 
https://github.com/uwsbel/autonomy-research-testbed/blob/master/sim/cpp/CMakeLists.txt<https://urldefense.com/v3/__https:/github.com/uwsbel/autonomy-research-testbed/blob/master/sim/cpp/CMakeLists.txt__;!!Mak6IKo!PwfC4Jc3x-MLNvEI2kWhghJR8nqPyfp-6h8DonYAozDY4D91CLDDUeTVPm9yfrbkAfPHC8eZ81-dAQJ_TPRzWTJ-FGRJf4I$>
 or 2):  the file (CMakeList.txt) I attached here to see if using similar 
cmakelist could solve your problem or not.

3. If 1 or 2 didn't solve the problem, then are you willing to try ROS2 humble 
version? Because all the code we tested for Chrono::ROS module is based on ROS2 
humble version. Although I don't think there are too much change between 
galactic and humble as they're all ros2 version, it might be good to check

Best,
Harry

--------------------------------------------------------------------------------------------------------
Hello Harry,

1) While building Chrono itself, the demos are built without error. So the 
first step is success.

2) I used the CMake file that you have sent me. This resolved the issue I got. 
But it also required two more changes. Namely enabling the parser module with 
proper directory setup and adding the path of the parser lib directory to 
LD_LIBRARY_PATH. By doing so the problem has been resolved and the demo file 
seems to be working fine (check CMakeLists_worked.txt and 
demo_ROS_custom_handler.cpp). I am also planning to add the LD path to bashrc 
so it will be reflected in all terminals.

3) Also I forgot to mention in my previous email. I also got the same type of 
error with ROS2 Humble. So this solution will also resolve the issue with 
Humble I think.

The issue with ROS seems to be resolved now. So thanks for the detailed 
instructions.  I have also attached the new CMake file and the output of the 
demo file so it may help others. Once again thank you for helping me resolve 
this issue.

Kind regards,
Madhava Pandiyan

On Monday, November 25, 2024 at 3:43:32 AM UTC-6 madhavap...@gmail.com wrote:
Hallo all,

I am trying to run Chrono_ROS. While building the file 
demo_ROS_custom_handler.cpp, I am getting an error. I have attached that file 
along with the CMake file and error message. It seems to be related to rclcpp 
and Qos. Could you help me resolve this issue? Thank you in advance.

Regards,
Madhava Pandiyan
--
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/002309e7-74ff-4572-a719-39079c3734a5n%40googlegroups.com<https://urldefense.com/v3/__https:/groups.google.com/d/msgid/projectchrono/002309e7-74ff-4572-a719-39079c3734a5n*40googlegroups.com?utm_medium=email&utm_source=footer__;JQ!!Mak6IKo!NkFkxNxRfIFa6jN9vbHo2f6pEt0eONg8L9nBLoVWZvH9TE2lI_AnmrbFc8PNeJDNdpb54hAjHOfmrJ2SlR0xmtBrbKQ$>.
--
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 
projectchrono+unsubscr...@googlegroups.com<mailto:projectchrono+unsubscr...@googlegroups.com>.
To view this discussion visit 
https://groups.google.com/d/msgid/projectchrono/10bec892-65d2-492f-ba01-82aaa30f24d5n%40googlegroups.com<https://urldefense.com/v3/__https:/groups.google.com/d/msgid/projectchrono/10bec892-65d2-492f-ba01-82aaa30f24d5n*40googlegroups.com?utm_medium=email&utm_source=footer__;JQ!!Mak6IKo!KPYimasLQBgRT1XfW_NIvlqiLEkwikd8mfXL-Z6Qc3UyJuBH_dNClyfMrAYSNef22Pf_RYsL11_ahnIFkutO$>.

-- 
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 projectchrono+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/projectchrono/CH3PPF46CDC2185BE96752E32AD2B9313D1A70E2%40CH3PPF46CDC2185.namprd06.prod.outlook.com.

Reply via email to