3a: Custom Messages slides |

How to create a custom message

Some extra details

Defining Your Own Message Types

  • First look if any of the standard message types can do the job for you
  • Here’s a List of standard message type
  • The procedure for defining a new message is easy but convoluted
  • This is because you define your message in a .msg file with a particular format
  • And then catkin_make uses that to generate appropriate C++ headers and Python libraries

Steps to create a new message type (see Creating a msg)

  1. Define the message file, foo.msg, and place it in the msg/ subdirectory of the package
  2. Update (if needed) the package.xml file to include two new commands to indicate dependencies
  3. Update your python program to import the messages
  4. Update CMakeLists.txt