Jaeyoung-Lim / mavros_controllers

Aggressive trajectory tracking using mavros for PX4 enabled vehicles
BSD 3-Clause "New" or "Revised" License
400 stars 164 forks source link

fix the compile bug #216

Closed MingshanHe closed 2 years ago

MingshanHe commented 2 years ago

I have a compile error in Ubuntu 20.04 ROS(noetic) and it will hint me the project haven't find out the controller_msgs, so I have checked that the controller_msgs has not added in the find_package.

Jaeyoung-Lim commented 2 years ago

@MingshanHe This should not be necessary, and the builds are being checked automatically with the CI: https://github.com/Jaeyoung-Lim/mavros_controllers/actions

Could you explain how to reproduce the build failing?

MingshanHe commented 2 years ago

OK. Thanks for your quick response. image I have not changed anything for your project, and I just used catkin build to build it. And there is an error happening on my laptop. Then, I checked the CMakeList.txt in the hint position, and add the controller_msgs in the find_package. Finally, I have successfully compiled your code.

Jaeyoung-Lim commented 2 years ago

@MingshanHe Have you tried to build the package explicitly?

catkin build geometric_controller
MingshanHe commented 2 years ago

Yes I have tried this command but it also build failed

Jaeyoung-Lim commented 2 years ago

@MingshanHe I still don't understand why this works in the CI and does not for you: https://github.com/Jaeyoung-Lim/mavros_controllers/blob/d3e0fa0e1873cdfdf3233b6777e8f67818137a64/.github/workflows/build_test.yml#L44

The package.xml also specifies the dependency explicitly, therefore you should not have the problem as you described: https://github.com/Jaeyoung-Lim/mavros_controllers/blob/d3e0fa0e1873cdfdf3233b6777e8f67818137a64/geometric_controller/package.xml#L20

I would be curious to know what is going on, but I am not sure if I understand your problem correctly.

Could you share the output of

catkin conifg

Are you sure the "Devel Space Layout" is marked as "merged"?

MingshanHe commented 2 years ago

image I have seen that the controller_msgs in the package.xml, and If I used the self-defined message, I always add the message project name in the CMakeList.txt and package.xml. It is my habit.

MingshanHe commented 2 years ago

I have seen that my catkin config has shown the Devel Space Layout is shown as linked which is not merged you have marked as above. I think it has made the compile fail. I will check it again and thanks for your comments and I will close this PR. Thanks for your patiently review and comments.