This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 1623 - Add AlignedBox::extend(aligned_box, affine_transform) ?
Summary: Add AlignedBox::extend(aligned_box, affine_transform) ?
Status: REVIEWNEEDED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Geometry (show other bugs)
Version: 3.4 (development)
Hardware: All All
: Normal Feature Request
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-16 15:56 UTC by Martin Pecka
Modified: 2019-12-04 18:07 UTC (History)
5 users (show)



Attachments

Description Martin Pecka 2018-11-16 15:56:36 UTC
For the Moveit project, I implemented a function that allows extending an AlignedBox with another AlignedBox transformed by an affine transform.

I just had the idea that it could be moved directly to Eigen if other people agree  such a function makes sense. For Moveit, it does, since we merge a lot of AABBs from robot links to create one big AABB of the whole robot. So what do you think about it?

There already are two extend() implementations in Eigen::AlignedBox - one for extending with points, the other for extending by another (untransformed) AlignedBox.

I have two suggestions on how this could be ported into Eigen and I'm not sure which one would be better, so please comment.

1) Add method `extend(const AlignedBox &b, AffineTransform &a)`.
2) Add method `transform(AffineTransform &a)` that would just apply the transform on the current AlignedBox. Merging with another one could be made using the already existing `extend(AlignedBox &b)` method.

Implementation is here:
https://github.com/ros-planning/moveit/blob/1906f8e67e2e191023c763f3cbc504e8d667e969/moveit_core/robot_model/include/moveit/robot_model/aabb.h

https://github.com/ros-planning/moveit/blob/1906f8e67e2e191023c763f3cbc504e8d667e969/moveit_core/robot_model/src/aabb.cpp
Comment 1 Christoph Hertzberg 2018-11-18 11:50:30 UTC
I would go for option 2, unless combining both operations really makes a difference. 
It might actually be simpler to just overload operator*(Transform,AlignedBox).

The implementation you link to actually implements the requested functionality only for boxes centered at the origin.
Comment 3 Gael Guennebaud 2019-11-15 09:59:23 UTC
For consistency with Hyperplane and ParametrizedLine we should use a transform() method.
Comment 4 Nobody 2019-12-04 18:07:12 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1623.

Note You need to log in before you can comment on or make changes to this bug.