Skip to content

ogma-core: Allow for inputs to be deeply nested fields in ROS 2 template. Refs #547. - #550

Open
ivanperez-keera wants to merge 2 commits into
nasa:developfrom
ivanperez-keera:develop-ros-subfields
Open

ogma-core: Allow for inputs to be deeply nested fields in ROS 2 template. Refs #547.#550
ivanperez-keera wants to merge 2 commits into
nasa:developfrom
ivanperez-keera:develop-ros-subfields

Conversation

@ivanperez-keera

Copy link
Copy Markdown
Member

Modify the default ROS 2 template so that the test node generated uses variable names that do not include the sub-field name and thus do not result in code that does not compile if variables are populated from message sub-fields, as prescribed in the solution proposed for #547.

@nasa nasa deleted a comment from philphauler Aug 23, 2026
@ivanperez-keera
ivanperez-keera force-pushed the develop-ros-subfields branch 3 times, most recently from df0e450 to 123f321 Compare August 25, 2026 01:50
…bfields. Refs nasa#547.

The default ROS 2 template does not handle random value generation
correctly in the auto-generated test package when subfields are used.

For example, if an input variable `input_signal` is supposed to denote a
field `pose.pose.position.x` of an input message, the code generated in
the tests includes the invalid variable declaration:

```C++
double input_signal_pose.pose.position.x = randomFloat();
```

This commit modifies the default ROS 2 template so that the test node
generated uses variable names that do not include the sub-field name,
and thus do not result in code that does not compile if variables are
populated from message sub-fields.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant