Both work.  The angle brackets are preferable because this is a "system" include file specified with the -I option to the compiler.  From the gcc documentation:

2.1 Include Syntax

Both user and system header files are included using the preprocessing directive `#include'. It has two variants:

#include <file>
This variant is used for system header files. It searches for a file named file in a standard list of system directories. You can prepend directories to this list with the -I option (see Invocation).
#include "file"
This variant is used for header files of your own program. It searches for a file named file first in the directory containing the current file, then in the quote directories and then the same directories used for <file>. You can prepend directories to the list of quote directories with the -iquote option.


On Wed, Aug 25, 2010 at 9:50 AM, Joel Cartwright <J.J.Cartwright@hw.ac.uk> wrote:
Hello all,

I have a question about ROS C++ include convention: For header files
from another package, which include method is preferable?

       #include <geometry_msgs/Twist.h>

or
       #include "geometry_msgs/Twist.h"

Both compile correctly, and both are seen in the standard ROS stacks.

Joel
--
Research Assistant
Ocean Systems Laboratory
Heriot-Watt University, UK
_______________________________________________
ros-users mailing list
ros-users@code.ros.org
https://code.ros.org/mailman/listinfo/ros-users