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

Build error 'fatal error: nav_msgs/Odometry.h: No such file or directory' #3

Closed
bigbellmercy opened this issue Feb 22, 2021 · 5 comments

Comments

@bigbellmercy
Copy link

Hi~ When catkin_make is commanded for compile as the README.md, The following build error (and similar errors) happens:

/home/user/catkin_ws/src/MLMapping/src/independent_modules/repub_rec.cpp:6:10: fatal error: nav_msgs/Odometry.h: No such file or directory
 #include "nav_msgs/Odometry.h"
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /home/user/catkin_ws/src/MLMapping/src/node_visualization.cpp:7:0:
/home/user/catkin_ws/src/MLMapping/src/rviz_vis.h:8:10: fatal error: visualization_msgs/Marker.h: No such file or directory
 #include <visualization_msgs/Marker.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

...and so on...

Build environment: Ubuntu 18.04, ROS Melodic

@bigbellmercy
Copy link
Author

In my catkin_ws/common_msgs/nav_msgs folder, any header file, including Odometry.h, does not exist.
As I go to the GitHub for common_msgs/nav_msgs no header file is there too.

@bigbellmercy
Copy link
Author

I've found a solution for it.

In the CMakeList.txt of MLMapping folder, I added the following sentences:

  1. In find_package(), nav_msgs, visualization_msgs and pcl_conversions were added.
  2. In generate_messages(), nav_msgs and visualization_msgs were added.

After that, such errors disappeared and its build succeeded.

@bigbellmercy
Copy link
Author

It's nice VIO!
When I used the provided dataset the 'Large Scale Mapping Dataset', its 3D maps are drawn nicely.

@Ttoto
Copy link
Contributor

Ttoto commented Mar 3, 2021

Thank you for your feedback! I have updated the CMakeLists.txt.

Ttoto added a commit that referenced this issue Mar 3, 2021
@bigbellmercy
Copy link
Author

Thanks. It's built and run well after the change. You may close this issue.

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