Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Waypoint.h Header File in rosns3_client Package #2

Open
JamesWaynessss opened this issue Nov 18, 2023 · 2 comments
Open

Missing Waypoint.h Header File in rosns3_client Package #2

JamesWaynessss opened this issue Nov 18, 2023 · 2 comments

Comments

@JamesWaynessss
Copy link

Dear Malintha Fernando,

Thank you for developing and sharing the rosns3_client project.

I encountered a small issue while trying to use the project. It seems that the Waypoint.h header file is missing from the rosns3_client/include directory. This caused a #include "rosns3_client/Waypoint.h" 'file not found' error during compilation.

Alternatively, if I missed some steps that led to this problem, your guidance on the correct procedure would be greatly appreciated.

Thank you for your time and effort!

@malintha
Copy link
Owner

malintha commented Nov 26, 2023

Hello @JamesWaynessss,

Thank you for trying out the simulator! Can you try building the rosns3_client first using catkin build rosns3_client and second doing a full build with catkin build? The problem is the recursive dependency of the message in https://github.com/malintha/rosns3/tree/master/rosns3_client/msg.

I've encountered this issue also in malintha/multi_uav_simulator#11 too. I believe the permanent solution here would be to move the Waypoint.h to a whole new package and including it in rosns3_client's and simulator_util's package.xml files as a dependency.

@JamesWaynessss
Copy link
Author

Dear Malintha Fernando,

Thank you for your prompt response and suggestions regarding the rosns3_client project.

I tried building the rosns3_client first using catkin build rosns3_client and then performing a full build with catkin build as you recommended. However, I still encountered issues with the recursive dependency of the message.

After some investigation, I found a solution that resolved the compilation problem effectively. By adding the following lines to the rosns3_client/CMakeLists.txt file:

add_dependencies(
  ${PROJECT_NAME}
  ${${PROJECT_NAME}_EXPORTED_TARGETS}
  ${catkin_EXPORTED_TARGETS}
)

This addition ensured that the necessary dependencies were correctly handled during the build process, and the issue was resolved. Specifically, placing this add_dependencies command after the add_executable command and before the target_link_libraries command ensured that all dependencies were properly managed.

I hope this information is helpful for you and others who might encounter a similar problem. Thank you again for your support and the valuable work you have done with this project.

Best regards,
James

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants