ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

.msg files not created after catkin_make for an action

asked 2019-04-10 00:50:11 -0500

wanna_be_ironman gravatar image

updated 2019-04-10 02:52:51 -0500

gvdhoorn gravatar image

I am using ROS melodic on python2.7 in anaconda env. My Custom message and custom service functions are working properly.

I have two folders one is: catkin_ws/src/ my_robot_tutorials which contains scripts in which there are .py executable files. my_robot_msgs: this contains all my header files like srv, action, and msg.

I have created an action folder inside catkin_ws/src/my_robot_msgs/action/SampleAction1.msg which contains:

string goal_message         
---
string result_message         
---
string feedback_message

catkin_ws/src/my_robot_msgs/CMakeList.txt

my CMakeLists.txt contains:

find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
  message_generation
  actionlib_msgs
)

 add_message_files(
   FILES
   HardwareStatus.msg
   RocketStatusCheck.msg 
)

## Generate services in the 'srv' folder

 add_service_files(
   FILES
   ComputeDiskArea.srv   
)


## Generate actions in the 'action' folder

 add_action_files(
  FILES
  SampleAction1.action
)

## Generate added messages and services with any dependencies listed here


 generate_messages(
   DEPENDENCIES
   std_msgs
   actionlib_msgs
)


catkin_package(
  #INCLUDE_DIRS include
  #LIBRARIES my_robot_msgs
  CATKIN_DEPENDS roscpp rospy std_msgs message_runtime actionlib_msgs
  #DEPENDS system_lib
)

my package catkin_ws/src/my_robot_msgs/package.xml contains:

  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>rospy</build_depend>
  <build_depend>std_msgs</build_depend>
  <build_depend>message_generation</build_depend>
  <build_export_depend>roscpp</build_export_depend>
  <build_export_depend>rospy</build_export_depend>
  <build_export_depend>std_msgs</build_export_depend>
  <exec_depend>roscpp</exec_depend>
  <exec_depend>rospy</exec_depend>
  <exec_depend>std_msgs</exec_depend>
  <exec_depend>message_runtime</exec_depend>

  <build_depend>actionlib</build_depend>
  <build_depend>actionlib_msgs</build_depend>
  <exec_depend>actionlib</exec_depend>
  <exec_depend>actionlib_msgs</exec_depend>

my catkin_ws/src/my_robot_tutorials/CMakeLists.txt

find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
  std_srvs
  rospy_tutorials
  my_robot_msgs
  actionlib_msgs 
  actionlib
)

my catkin_ws/src/my_robot_tutorials/package.xml

 <buildtool_depend>catkin</buildtool_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>rospy</build_depend>
  <build_depend>std_msgs</build_depend>
  <build_export_depend>roscpp</build_export_depend>
  <build_export_depend>rospy</build_export_depend>
  <build_export_depend>std_msgs</build_export_depend>
  <exec_depend>roscpp</exec_depend>
  <exec_depend>rospy</exec_depend>
  <exec_depend>std_msgs</exec_depend>

  <build_depend>actionlib</build_depend>
  <build_depend>actionlib_msgs</build_depend>
  <exec_depend>actionlib</exec_depend>
  <exec_depend>actionlib_msgs</exec_depend>

  <depend>my_robot_msgs</depend>

After catkin_make and source devel/setup.bash

I cannot find any .msg files generated in the catkin_ws/src/my_robot_msgs/msg/ folder. Can anyone point out any bugs/ ideas which I can try to make ROS generate .msg file.

edit retag flag offensive close merge delete

Comments

1

I cannot find any .msg files generated in the catkin_ws/src/my_robot_msgs/msg/ folder.

Generated files are not placed in the src space, but in the devel space.

gvdhoorn gravatar image gvdhoorn  ( 2019-04-10 02:54:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-12-05 11:11:58 -0500

rbed23 gravatar image

To manually generate the message files from this file, use the script genaction.py from the actionlib_msgs package.

Remember to use the correct action message argument from the <package>/action/ folder...

$ rosrun actionlib_msgs genaction.py -o msg action/SampleAction1.action

Note: As @gvdhoorn mentioned, the msgs are created and placed in the devel space. This script simply places the messages into the <package>/msg folder, as well.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2019-04-10 00:50:11 -0500

Seen: 1,077 times

Last updated: Apr 10 '19