-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ogma-core
: ROS backend incorrectly maps float
, double
type to std::float32
and std::float64
#138
Labels
CR:Status:Closed
Admin only: Change request that has been completed
CR:Type:Bug
Admin only: Change request pertaining to error detected
Milestone
Comments
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. |
ivanperez-keera
added a commit
that referenced
this issue
May 21, 2024
The ROS backend is, by default, assuming that the data carried by std_msgs::msg::Float32 is of type float32, when it appears to be just a float. The same is happening for Float64, float64 and double. 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 and double should be used. This commit modifies the ROS backend so that it expects global variables of input types `float` and `double` in the variable DB to have the types `float` and `double`, respectively, in the generated C++ code.
ivanperez-keera
added a commit
that referenced
this issue
May 21, 2024
ivanperez-keera
added a commit
that referenced
this issue
May 22, 2024
…#138. This commit modifies an example to use also an input variable of type float and one of type double, both of which were failing in the ROS backend. The example in question is currently being used by a CI script to test the ROS backend, making the new example serve as a regression test.
ivanperez-keera
added a commit
that referenced
this issue
May 22, 2024
ivanperez-keera
added a commit
that referenced
this issue
May 22, 2024
Implementor: Solution implemented, review requested. |
Change Manager: Verified that:
|
Change Manager: Implementation ready to be merged. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CR:Status:Closed
Admin only: Change request that has been completed
CR:Type:Bug
Admin only: Change request pertaining to error detected
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.
The text was updated successfully, but these errors were encountered: