Can't import OccupancyGrid.msg
I try to read /map message which is published by 'slam_gmapping' How I import in my code:
from OccupancyGrid.msg import data
and in my package.xml, I added:
<build_depend>nav_msgs</build_depend>
<build_export_depend>nav_msgs</build_export_depend>
<exec_depend>nav_msgs</exec_depend>
my CMakeLists.txt, I added:
find_package(catkin REQUIRED COMPONENTS roscpp rospy nav_msgs)
However, when I run my code, it showed:
ImportError: No module named OccupancyGrid.msg
Where am I wrong?