-
Notifications
You must be signed in to change notification settings - Fork 334
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
Cleanup all the deprecations warning from the recent ros2_control variant changes #1442
Comments
@kumar-sanjeeev or @MartinPeris you might be interested to work on this |
@saikishor, thanks. I will look into this. |
@saikishor Hi, I took a look at this and made adjustments to the |
@kumar-sanjeeev let's try to address all these depreciations in a single PR |
but you always can submit a draft PR if you want to get feedback before you work on the other controllers |
@christophfroehlich, yeah I would like to do that, just to check if I am in right direction or not. So I will submit draft PR. |
Thank you! |
Background
Recently after the new variants feature in Handles (ros-controls/ros2_control#1688) We have a bunch of deprecation warnings that needs to be cleanup. This could be a nice first issue.
Instructions
The best approach to this is to create the temporary variables where ever needed and then if the
set_value
orget_value
returnsFalse
. Then, better to print a warning and simply return OK. This way, if we have some failures in getting data, the user will be able to know and can introspect properly.Moreover, If everything is running synchronously. it should work as expected without any failures.
For example:
For the following lines of the code in the diff_drive_controller:
ros2_controllers/diff_drive_controller/src/diff_drive_controller.cpp
Lines 268 to 272 in 81c0d41
The expected code should look like:
For the following
get_value
code in the diff_drive_controller:ros2_controllers/diff_drive_controller/src/diff_drive_controller.cpp
Lines 162 to 164 in 81c0d41
The expected outcome would be:
or
May be the first approach is better as it retains the const ness of the variable
🤔 What you will need to know.
Nothing. This issue is meant to welcome you to Open Source :) We are happy to walk you through the process.
📋 Step by Step
🙋 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 following these instructions, for Step3 use "Download Source Code" section with these instructions.
🍴 Fork the repository using the handy button at the top of the repository page and clone it into
~/ws_ros2_control/src/ros-controls/ros2_controllers
, here is a guide that you can follow (You will have to remove or empty the existingros2_controllers
folder before cloning your own fork)Checkout a new branch using
git checkout -b <branch_name>
🤖 Apply
pre-commit
auto formatting, by runningpip3 install pre-commit
and runningpre-commit install
in the ros2_control repo.💾 Commit and Push your changes
🔀 Start a Pull Request to request to merge your code into
master
. There are two ways that you can start a pull request:Is someone else already working on this?
🔗- 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!
🤔❓ Questions?
Don’t hesitate to ask questions or to get help if you feel like you are getting stuck. For example leave a comment below!
Furthermore, you find helpful resources here:
Good luck with your first issue!
The text was updated successfully, but these errors were encountered: