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

PRBT IkFast patch from robostack #2395

Merged
merged 1 commit into from
Sep 29, 2023
Merged

Conversation

tylerjw
Copy link
Member

@tylerjw tylerjw commented Sep 28, 2023

Description

Modified version of this: https://github.com/RoboStack/ros-humble/blob/main/patch/ros-humble-moveit-resources-prbt-ikfast-manipulator-plugin.patch

Quoting @traversaro

This seems a use of variable length array (that is not supported on MSVC) and hack to implement a static assert that can be substituted with a C++11's static_assert ?

I used a std::vector as we tend to use C++ types to avoid raw new/delete here in MoveIt.

On the version of ikfast changing in that static_assert. I searched for copies of the ikfast.h header, and it is in two places in our repo, and in both places, the version is 61. When I set the version to what it was in that hack, it failed, complaining that the version is 61 so the old test wasn't working anyway, and we've been compiling with version 61.

@traversaro
Copy link
Contributor

static_assert ?\n\nI used a std::vector as we tend to use C++ types to avoid raw new/delete here in MoveIt.

As long as a dynamic memory allocation is ok in this context, this seems ok.

@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (f998962) 50.78% compared to head (035df7a) 50.80%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2395      +/-   ##
==========================================
+ Coverage   50.78%   50.80%   +0.02%     
==========================================
  Files         386      386              
  Lines       31972    31972              
==========================================
+ Hits        16235    16239       +4     
+ Misses      15737    15733       -4     

see 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tylerjw
Copy link
Member Author

tylerjw commented Sep 28, 2023

As long as a dynamic memory allocation is ok in this context, this seems ok.

I don't understand how it could have worked before without dynamic memory allocation so I have to assume it is ok. C variable length array was using dynamic memory too.

@traversaro
Copy link
Contributor

traversaro commented Sep 29, 2023

C variable length array was using dynamic memory too.

As far as I know (but I do not know in-depth) VLA at least in GCC use the stack, see https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html (the referenced function alloca allocates on the stack, see https://man7.org/linux/man-pages/man3/alloca.3.html).

@tylerjw tylerjw added the backport-humble Mergify label that triggers a PR backport to Humble label Sep 29, 2023
@tylerjw tylerjw merged commit bd45079 into moveit:main Sep 29, 2023
8 checks passed
@tylerjw tylerjw deleted the upstream_ik_fast_patch branch September 29, 2023 15:25
mergify bot pushed a commit that referenced this pull request Sep 29, 2023
tylerjw added a commit that referenced this pull request Sep 29, 2023
(cherry picked from commit bd45079)

Co-authored-by: Tyler Weaver <tyler@picknik.ai>
m-elwin pushed a commit to m-elwin/moveit2 that referenced this pull request Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-humble Mergify label that triggers a PR backport to Humble
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants