Skip to content
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

Add doTransform support for Point32, Polygon and PolygonStamped #616

Merged
merged 3 commits into from
Aug 17, 2023

Conversation

doisyg
Copy link

@doisyg doisyg commented Aug 16, 2023

Point32 and PolygonStamped were in the python API but not the cpp one. Added them along with Polygon

* \return The Vector3 converted to a geometry_msgs message type.
*/
inline
geometry_msgs::msg::Point32 & toMsg(const tf2::Vector3 & in, geometry_msgs::msg::Point32 & out)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using an argument and return for the same. Is there any reason to do so ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea, I just copied what was done for the geometry_msgs::msg::Point :

/** \brief Convert a tf2 Vector3 type to its equivalent geometry_msgs representation.
* This function is a specialization of the toMsg template defined in tf2/convert.h.
* \param in A tf2 Vector3 object.
* \return The Vector3 converted to a geometry_msgs message type.
*/
inline
geometry_msgs::msg::Point & toMsg(const tf2::Vector3 & in, geometry_msgs::msg::Point & out)
{
out.x = in.getX();
out.y = in.getY();
out.z = in.getZ();
return out;
}

Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

@ahcorde ahcorde merged commit 70d8c95 into ros2:humble Aug 17, 2023
1 check passed
@ahcorde
Copy link
Contributor

ahcorde commented Aug 17, 2023

https://github.com/Mergifyio backport iron rolling

@mergify
Copy link
Contributor

mergify bot commented Aug 17, 2023

backport iron rolling

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Aug 17, 2023
Co-authored-by: Guillaume Doisy <guillaume@dexory.com>
(cherry picked from commit 70d8c95)
mergify bot pushed a commit that referenced this pull request Aug 17, 2023
Co-authored-by: Guillaume Doisy <guillaume@dexory.com>
(cherry picked from commit 70d8c95)
ahcorde added a commit that referenced this pull request Aug 21, 2023
…port #616) (#619)

* Add doTransform support for Point32, Polygon and PolygonStamped (#616)

Co-authored-by: Guillaume Doisy <guillaume@dexory.com>
(cherry picked from commit 70d8c95)
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
ahcorde added a commit that referenced this pull request Aug 21, 2023
…port #616) (#618)

* Add doTransform support for Point32, Polygon and PolygonStamped (#616)

Co-authored-by: Guillaume Doisy <guillaume@dexory.com>
(cherry picked from commit 70d8c95)
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
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.

2 participants