Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.
This repository was archived by the owner on May 31, 2025. It is now read-only.

Error in C++ message auto generation in ROS groovy #6

@drdas

Description

@drdas

If a comment description line in a .msg file (starting with #) ends in a a special character such as ( ), extra newlines are added in the generated header file which gives compiler errors when included. Example below:

# ICD-XXXXX - Delta Position
# Primary Measurement: Change in position over a time interval (1D, 2D, or 3D)
# Standard Header
Header header 
#1, 2, or 3 elements based on dimension specified in metadata
float64[] delta_pos
# Delta position covariance matrix (row-major) in [units^2] of size nDim x nDim.
# The matrix is linearized into a single array for storage.
float64[]  delta_pos_covariance

generates the header with the following code (note the extra newlines):

template<class ContainerAllocator>
struct Definition< ::MyClass::DeltaPosition_<ContainerAllocator> >
{
  static const char* value()
  {
    return "# ICD-XXXXX - Delta Position
\n\
# Primary Measurement: Change in position over a time interval (1D, 2D, or 3D)
\n\

\n\
# Standard Header
\n\
Header header

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions