Name.action catkin_make error

Hi @girishkumar.kannan @bayodesegun ,

I face this error in creating my custom action file. I check my ros install directory the “/noetic/share/rospy/cmake” is present but I don’t why catkin_make can’t find the msg path. Any help would be highly appreciated.

Name.action

#goal
std_msgs/Int32 goal
---
#result
std_msgs/Int32 result
---
#feedback
std_msgs/Int32 feedback

CMakelists.txt

cmake_minimum_required(VERSION 3.0.2)
project(my_custom_action_msg_pkg)


find_package(catkin REQUIRED COMPONENTS
  actionlib_msgs
  rospy
  std_msgs
)

# Generate actions in the 'action' folder
add_action_files(
  FILES
  Name.action
)

## Generate added messages and services with any dependencies listed here
generate_messages(
  DEPENDENCIES
  std_msgs
  actionlib_msgs
)

The error msg in terminal

I am really lost like why does get error in unit_5_services/CMakeLists.txt:10 (find_package) and what that has to do with the current pkg am working

Thank you,

  • BG

I even tried Updating the CMakelist with message_generation in find package() and also updated it in package.xml with the 3 build depend but now I get a different error from another package.

Name.action

#goal
int32 goal_var
---
#result
int32 result_var
---
#feedback
int32 feedback_var

@girishkumar.kannan Could you have a look at this pls ?

Hi @balajigunasekeran22 ,

Please check your unit_5_services package. In the CMakeLists.txt file of that package, make sure you have included iri_wam_reproduce_trajectory package like below:

find_package(catkin REQUIRED COMPONENTS
  iri_wam_reproduce_trajectory
  rospy
)

That should (probably) solve your problem.

Also, I think you are using catkin_make
instead of catkin_make --only-pkg-with-deps <pkg_name>.

Let me know if your issue is solved.

Regards,
Girish

Hello @girishkumar.kannan ,

Thank you for the reply. I solved the error for Name.action and the “rosmsg list | grep Name” shows me the expected results. However in this unit_5_services I have already included iri_wam_reproduce_trajectory but I don’t why that I shows errors only now and Not while I was in that package. Does this has anything to do with my deletion of the devel and build folder as it did to solve the error in Name.action

cmake_minimum_required(VERSION 3.0.2)
project(unit_5_services)


## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
  #iri_wam_reproduce_trajectory
  iri_wam_reproduce_trajectory
  rospy
)


catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES unit_5_services
  CATKIN_DEPENDS iri_wam_reproduce_trajectory rospy
#  DEPENDS system_lib
)


## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
# include
  ${catkin_INCLUDE_DIRS}
)

Reagrds,
BG

Hi @balajigunasekeran22 ,

If you deleted your build and devel folder, the very first compilation after the folder deletion must be
catkin_make only - to build all the packages at once. You can also use --only-pkg-with-deps but that is only when you choose to compile packages individually.

But you must build your custom message package before compiling the package that uses the custom message package.

Hope this helps.

Regards,
Girish

1 Like

Hi @balajigunasekeran22 ,

Besides what has been added by @girishkumar.kannan (that you can use catkin_make --only-pkg-with-deps <pkg_name> instead of catkin_make), I know that sometimes it is easiar to launch the smaller command even though and compile all packages (even though it may incur in spending more time).
In fact, sometimes problems related to past packages can influence the compilation of the current package and in this case you were correct in trying to delete “build” folder. You may have noticed that in this case new logs are presented in your bash.

In your specific case, another solution would be simply temporarily commenting that line in the CMakelists.txt. For compilation of the package you are interested now.

bests,