Zhefan-Xu / map_manager

3D Mapping Library for Autonomous Robots (C++/ROS)
MIT License
46 stars 4 forks source link

Fix Compile Issue #6

Closed SwiftGust closed 2 months ago

SwiftGust commented 3 months ago

Allow messages & services to-be built first, to avoid compilation at the first time to resolve issue such as https://github.com/Zhefan-Xu/map_manager/issues/5

Zhefan-Xu commented 3 months ago

@SwiftGust Hi, thanks for the PR. Could you also provide how to reproduce issue https://github.com/Zhefan-Xu/map_manager/issues/5

SwiftGust commented 3 months ago

Hi @Zhefan-Xu, I also had encountered the same issue when I first started to build CERLAB autonomy stack, you may be able to reproduce it when you try to build the repo with new clean catkin workspace, make sure not to source devel/setup.bash existing workspace containing this package. or make sure to manually remove build/devel directories existing workspace for clean build, otherwise, previously built message/service headers would be left inside workspace's devel/include/package_name, issue won't be reproduced.

Zhefan-Xu commented 3 months ago

Hi, I was not able to reproduce the issue. Here is what I have done:

mkdir -p ~/test_ws/src
cd ~/test_ws
catkin_make

cd ~/test_ws/src
git clone --recursive https://github.com/Zhefan-Xu/CERLAB-UAV-Autonomy.git
cd ~/test_ws
catkin_make

I create a brand new workspace and did not do source. Catkin make won't cause problem. Could you please let me know if I did anything wrong?

SwiftGust commented 3 months ago

Hi, @Zhefan-Xu It's weird, could you check echo $CMAKE_PREFIX_PATH doesn't contain existing path to the map_manager's workspace There is possibility that environment variable still leftover so I think it would be very certain reboot after once you comment out workspace's setup.bash lines other than /opt/ros/noetic/setup.bash in the ~/.bashrc file then try clean build to reproduce the issue.

Zhefan-Xu commented 3 months ago

I didn't see path related to map_manager when I do echo $CMAKE_PREFIX_PATH as shown below:

zhefan@mbp:~/test_ws$ echo $CMAKE_PREFIX_PATH
/opt/ros/noetic

I have tried rebooting and still cannot reproduce the issue. I am testing with Ubuntu 20.04. Could you provide more information on which version of Ubuntu you tested? Also, would you be able to reproduce the issue with my previous mentioned steps?

Thanks

SwiftGust commented 3 months ago

HI, I'm also on Ubuntu 20.04 with ROS Noetic environment I've followed https://github.com/Zhefan-Xu/CERLAB-UAV-Autonomy?tab=readme-ov-file#ii-installation-guide and instruction above, I cannot reproduce the issue anymore too it's weird.

Zhefan-Xu commented 3 months ago

Alright, I am closing this PR but if you happen to find out the way to reproduce, feel free to reopen it. Thank you very much for your contribution!