Skip to content

Unnecessary equal operators #1114

Closed
Closed
@TauTheLepton

Description

@TauTheLepton

Describe the bug
The functions below generate compilation errors.

bool operator==(const geometry_msgs::msg::Point & v0, const geometry_msgs::msg::Point & v1);
bool operator==(const geometry_msgs::msg::Vector3 & v0, const geometry_msgs::msg::Vector3 & v1);

Both equal operators are ambiguous. ROS2 message types have automatically generated equal operator member function. Any usage of the aforementioned functions results in a compilation error.
It is unnecessary to keep functions that cannot be used, so I suggest removing these functions.

Context:
I am adding unit tests for the geometry package and wanted to add tests for these functions as well, but as it turns out they cannot be used.

To Reproduce
Steps to reproduce the behavior:

  1. Edit any source code file or add a new one
  2. Include the linear_algebra.hpp header file
  3. Write any code that uses the equal operator
  4. Try to compile
  5. See error

Expected behavior
Using Point and Vector3 equal operator should result in a correct evaluation and not in a compilation error.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]: Ubuntu
  • Browser [e.g. chrome, safari]: Firefox
  • Version [e.g. 22]: 22
  • ROS 2 version: Humble
  • DDS: CycloneDDS

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions