I wonder why this error?

Respected Sir,
I created .msg file and did all the steps to update .txt and .xml files. Now when I try to compile the msgs with catkin_make, it throws this error shown in the screenshot below:

Following are the modifications in .txt file I made:

find_package(catkin REQUIRED COMPONENTS
** rospy**
** std_msgs**
** message_generation**
)

add_message_files(
** FILES**
** age.msg**
)

generate_messages(
** DEPENDENCIES**
** std_msgs # Or other packages containing msgs**
)

catkin_package(
** INCLUDE_DIRS include**
** LIBRARIES odometry_package**
** CATKIN_DEPENDS rospy message_runtime**
** DEPENDS system_lib**
)

Following are the modifications of .xml file I made. The screenshot shows it:

1 Like

Hello @abdulbasitisdost,

The problem here is that you have uncommented the whole catkin_package() function:

catkin_package(

 INCLUDE_DIRS include
 LIBRARIES odometry_package
 CATKIN_DEPENDS rospy message_runtime
 DEPENDS system_lib

)

But you actually only have to uncomment one line of the function, like this:

catkin_package(

#  INCLUDE_DIRS include
#  LIBRARIES my_package
CATKIN_DEPENDS rospy message_runtime
#  DEPENDS system_lib

)

Best,

1 Like