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

(moveit_py) Add Trajectory Execution Manager #2406

Merged
merged 9 commits into from Nov 10, 2023

Conversation

MatthijsBurgh
Copy link
Contributor

@MatthijsBurgh MatthijsBurgh commented Oct 4, 2023

Description

Add Trajectory Execution Manager.

Note: I have not been able to test the correct behaviour of all added functions. Also I skipped some functions, which are shown as comments.

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation reference
  • Document API changes relevant to the user in the MIGRATION.md notes
  • Create tests, which fail without this PR reference
  • Include a screenshot if changing a GUI
  • While waiting for someone to review your request, please help review another open pull request to support the maintainers

@sjahr
Copy link
Contributor

sjahr commented Oct 6, 2023

@MatthijsBurgh Can you run pre-commit? See here for instructions on how to do that https://moveit.ros.org/documentation/contributing/code/#pre-commit-formatting-checks

@MatthijsBurgh
Copy link
Contributor Author

@sjahr done

@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (51dfbcc) 50.39% compared to head (22c61d7) 50.79%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2406      +/-   ##
==========================================
+ Coverage   50.39%   50.79%   +0.41%     
==========================================
  Files         391      392       +1     
  Lines       31996    32170     +174     
==========================================
+ Hits        16121    16339     +218     
+ Misses      15875    15831      -44     
Files Coverage Δ
...eit_core/controller_manager/controller_manager.cpp 85.72% <66.67%> (-14.28%) ⬇️

... and 8 files with indirect coverage changes

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

@MatthijsBurgh MatthijsBurgh force-pushed the traj_exec_manager branch 2 times, most recently from d37246e to cbdf49e Compare October 9, 2023 06:58
@MatthijsBurgh
Copy link
Contributor Author

MatthijsBurgh commented Oct 9, 2023

Sorry for breaking CI again. pre-commit didn't do its jobs correctly. I don't know how, but it is fixed again.

Copy link
Member

@henningkayser henningkayser left a comment

Choose a reason for hiding this comment

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

I gave this a quick pass, the bindings look all correct to me. I would appreciate if @peterdavidfagan or @JafarAbdi could verify and test this.

@peterdavidfagan
Copy link
Member

peterdavidfagan commented Oct 11, 2023

Thanks for these updates @MatthijsBurgh, reviewing this is on my list for things to do, hopefully I'll get around to this during the week. I want to first fix the tutorials as these are broken.

@MatthijsBurgh
Copy link
Contributor Author

Created an issue and referenced it in the code. Updated the copyright headers of only the changed files in this PR.

@peterdavidfagan
Copy link
Member

Created an issue and referenced it in the code. Updated the copyright headers of only the changed files in this PR.

🚀🚀🚀

@MatthijsBurgh
Copy link
Contributor Author

@peterdavidfagan friendly ping to merge this PR ;)

@peterdavidfagan
Copy link
Member

Hi @MatthijsBurgh,

I do need to finish reviewing this on my side, I will look to find time this week.

@henningkayser henningkayser added the backport-iron Mergify label that triggers a PR backport to Iron label Oct 24, 2023
@mergify
Copy link

mergify bot commented Oct 27, 2023

This pull request is in conflict. Could you fix it @MatthijsBurgh?

Copy link
Member

@peterdavidfagan peterdavidfagan left a comment

Choose a reason for hiding this comment

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

These changes LGTM. I haven't had the opportunity to test all the added functionalities but I would be in favour of merging these changes and addressing any follow ups in issues.

Thanks @MatthijsBurgh for this contribution 🚀.

Copy link
Contributor

@sjahr sjahr left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this contribution (and your patience regarding reviews). Only one thing left to be changed and then this can finally be merged!

Manages the trajectory execution.
)")

.def("isManagingControllers", &trajectory_execution_manager::TrajectoryExecutionManager::isManagingControllers,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.def("isManagingControllers", &trajectory_execution_manager::TrajectoryExecutionManager::isManagingControllers,
.def("is_managing_controllers", &trajectory_execution_manager::TrajectoryExecutionManager::isManagingControllers,

Shouldn't the python functions be defined in snake_case (camelCase is used for cpp functions)? I think it is done like this everywhere else, so we should be consistent about it. Can you update the other function signatures as well?

Copy link
Member

Choose a reason for hiding this comment

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

We need to update many of the existing cpp methods as there are discrepancies elsewhere in the library which may have lead to @MatthijsBurgh using different conventions.

Not sure if there is an easy way to add this to auto formatter (clang-format) but I agree with the above convention.

Copy link
Member

Choose a reason for hiding this comment

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

Added issue: #2499

Copy link
Contributor

@sjahr sjahr Oct 30, 2023

Choose a reason for hiding this comment

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

I think that got covered by #2177 or do you mean something else @peterdavidfagan? That PR also added clang-tidy checks to warn about cpp function names that don't follow the conventions. But don't think there are checks to catch convention mistakes in .def("...", ..).

Copy link
Member

Choose a reason for hiding this comment

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

49052c1 ❤️.

My fork was outdated only seeing these updates now. Thanks so much.

As for .def I would personally need to become more familiar with clang-tidy, maybe there is a way to get a rule which also flags .def. For now I am happy to be more vigilant about this when pushing code or reviewing.

Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome, thanks for opening the issue though!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So the python functions will be snake_case?

@MatthijsBurgh
Copy link
Contributor Author

@sjahr I fixed the styling. I think then this one is ready to be merged too, correct?

@sjahr sjahr enabled auto-merge (squash) November 10, 2023 17:13
@sjahr sjahr merged commit 76a488b into moveit:main Nov 10, 2023
10 of 11 checks passed
mergify bot pushed a commit that referenced this pull request Nov 10, 2023
* (moveit_py) add trajectory execution manager

* (moveit_py) add __bool__ to ExecutionStatus

* (moveit_py) Update copyright header of changed files

* (moveit_py) add comment referencing issue

* Rename init_trajectory_execution_manager -> initTrajectoryExecutionManager

* (moveit_py) python functions snake_case

* (moveit_py) fix styling

---------

(cherry picked from commit 76a488b)

# Conflicts:
#	moveit_py/src/moveit/planning.cpp
@MatthijsBurgh MatthijsBurgh deleted the traj_exec_manager branch November 12, 2023 09:36
@MatthijsBurgh MatthijsBurgh mentioned this pull request Nov 12, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-iron Mergify label that triggers a PR backport to Iron
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants