As pointed out in this issue using new in the constructor for smart pointers is less performant (it has to do two dynamic memory allocations vs just one) than using the methods std::make_shared or std::make_unique. This issue is for updating one of those uses in moveit_core.
Hi, this is a first-timer-only issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.
If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open-source software!
We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you ๐
If you have contributed before, consider leaving this one for someone new, and looking through our general bug issues. Thanks!
Nothing. This issue is meant to welcome you to Open Source :) We are happy to walk you through the process.
[ ] ๐ Claim this issue: Comment below. If someone else has claimed it, ask if they've opened a pull request already and if they're stuck -- maybe you can help them solve a problem or move it along!
[ ] ๐๏ธCreate a local workspace for making your changes and testing follwing these instructions
[ ] ๐ Update the file moveit_core/background_processing/src/background_processing.cppby applying the change shown in the diff below.
diff --git a/moveit_core/background_processing/src/background_processing.cpp b/moveit_core/background_processing/src/background_processing.cpp
index 37991357b..5614aa514 100644
--- a/moveit_core/background_processing/src/background_processing.cpp
+++ b/moveit_core/background_processing/src/background_processing.cpp
@@ -46,7 +46,7 @@ BackgroundProcessing::BackgroundProcessing()
// spin a thread that will process user events
run_processing_thread_ = true;
processing_ = false;
- processing_thread_.reset(new boost::thread(boost::bind(&BackgroundProcessing::processingThread, this)));
+ processing_thread_ = std::make_unique<boost::thread>(boost::bind(&BackgroundProcessing::processingThread, this));
}
BackgroundProcessing::~BackgroundProcessing()
[ ] ๐ค Apply clang-format-10 auto formatting, following these instructions
[ ] ๐พ Commit your changes
[ ] ๐ Start a Pull Request. There are two ways how you can start a pull request:
If you are familiar with the terminal or would like to learn to use it, here is a great tutorial on how to send a pull request using the terminal.
[ ] ๐ Done Ask in comments for a review :)
๐- We encourage contributors to link to the original issue in their pull request so all users can easily see if someone's already started on it.
๐ฅ- If someone seems stuck, offer them some help!
Leave a comment below!
See this issue: https://github.com/ros-planning/moveit/issues/2384
Hey! Super interested in getting involved in open source robotics projects. Always been a bit worried about just jumping into an open source project, but this seems like a wonderful way to start, Ill claim this issue! ๐
Some questions / notes after working through this:
More of a note for the guide at https://moveit.ros.org/install/source/, rosdep does not appear to be included in a ROS desktop install, so rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} failed initially. (this might have just been user error on my part through)
I was unsure of how to properly clone my own fork into the workspace, since the code in src is being managed by wstool. Ended up just deleting the moveit folder and then cloning my fork, but it felt a bit hacky (I think wstool would attempt to overwrite if I ever updated). Would the correct way be changing my fork's moveit.rosinstall file and using that in the wstool merge command?
Once I had my fork ready, I was unsure which branch to pull request to. I chose master after looking through some other pull requests. Was this correct?
Thanks for taking the time to write out this awesome guide!
More of a note for the guide at https://moveit.ros.org/install/source/, rosdep does not appear to be included in a ROS desktop install, so
rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO}failed initially. (this might have just been user error on my part through)
No, this is not user error. rosdep was removed from the default set of installed packages some time ago. So if you're running Noetic, you'll have to install it manually.
I was unsure of how to properly clone my own fork into the workspace, since the code in
srcis being managed by wstool. Ended up just deleting the moveit folder and then cloning my fork, but it felt a bit hacky (I think wstool would attempt to overwrite if I ever updated). Would the correct way be changing my fork'smoveit.rosinstallfile and using that in the wstool merge command?
One approach I've used when I don't want wstool the complain at me is to edit the .rosinstall file and remove whatever repo I'm working on. Then you can use wstool for the rest of the packages and use git directly to interact with the repo you have forked and are working on.
Once I had my fork ready, I was unsure which branch to pull request to. I chose master after looking through some other pull requests. Was this correct?
master is the correct branch to target for PRs. Would you mind creating a first-timer-only issue using the issue template (click new issue) and include a diff to the file .github/ISSUE_TEMPLATE/first_timers_only.md to clarify this in the instructions. That would help as you can provide a similarly curated issue for someone else and help make it clearer for them.
Thank you for joining us and working to make open source robotics better. We look forward to you being a part of the community.
@LegoYoda112 I've converted your rosdep catch into a first timer issue :-)
https://github.com/ros-planning/moveit/issues/2416
Also, this issue should be closed as https://github.com/ros-planning/moveit/pull/2412 is merged
closing as this is done, congrats ๐ฅ
Most helpful comment
Hey! Super interested in getting involved in open source robotics projects. Always been a bit worried about just jumping into an open source project, but this seems like a wonderful way to start, Ill claim this issue! ๐