Closed ivanperez-keera closed 5 months ago
Change Manager: Confirmed that the issue exists.
Technical Lead: Confirmed that the issue should be addressed.
Technical Lead: Issue scheduled for fixing in Ogma 1.4.
Fix assigned to: @ivanperez-keera.
Implementor: Solution implemented, review requested.
Change Manager: Verified that:
ros
command generates valid ROS applications now uses an example with a float
and a double
.float
and double
variable.Change Manager: Implementation ready to be merged.
*Description**
The ROS backend is, by default, assuming that the data carried by
std_msgs::msg::Float32
is of typefloat32
, when it appears to be just afloat
. The same is happening forFloat64
,float64
anddouble
. The code currently produced for those cases does not compile.The type mappings are described in http://docs.ros.org/en/humble/Concepts/Basic/About-Interfaces.html, which states that, in C++,
float
anddouble
should be used.Type
Additional context
None.
Requester
Method to check presence of bug
Compiling a specification with an input of type
Float
orDouble
results in code that will not compile:Expected result
The execution above should produce a Copilot specification that can be compiled using docker.
Desired result
The execution above should produce a Copilot specification that can be compiled using docker.
Proposed solution
Modify the ROS backend to map the contents of
Float32
messages tofloat
, and variables of typefloat
(in the vars DB) to justfloat
in C++.Further notes
None.