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

Fix deprecation from realtime_tools on humble #1965

Closed
8 tasks
christophfroehlich opened this issue Dec 21, 2024 · 10 comments
Closed
8 tasks

Fix deprecation from realtime_tools on humble #1965

christophfroehlich opened this issue Dec 21, 2024 · 10 comments
Assignees

Comments

@christophfroehlich
Copy link
Contributor

Background

We changed the API of lock_memory a bit

/workspaces/ros2_humble_ws/src/ros2_control/controller_manager/src/ros2_control_node.cpp: In function ‘int main(int, char**)’:
/workspaces/ros2_humble_ws/src/ros2_control/controller_manager/src/ros2_control_node.cpp:62:50: warning: ‘bool realtime_tools::lock_memory(std::string&)’ is deprecated: Use std::pair<bool, std::string> lock_memory() instead. [-Wdeprecated-declarations]
   62 |   if (lock_memory && !realtime_tools::lock_memory(message))
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
In file included from /workspaces/ros2_humble_ws/src/ros2_control/controller_manager/src/ros2_control_node.cpp:24:
/workspaces/ros2_humble_ws/src/realtime_tools/include/realtime_tools/realtime_helpers.hpp:70:6: note: declared here
   70 | bool lock_memory(std::string & message);
      |      ^~~~~~~~~~~

Instructions

Hi, this is a good-first-issue issue. This means we've worked to make it more legible to people who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.

We're interested in helping you take the first step, and can answer questions and help you out along the way. Note that we're especially interested in contributions from underrepresented groups!

We know that creating a pull request is the biggest barrier for new contributors. This issue is for you 💝

If you have contributed before, consider leaving this PR for someone new, and looking through our general bug issues. Thanks!

🤔 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 Step 3 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_control, here is a guide that you can follow (You will have to remove or empty the existing ros2_control folder before cloning your own fork)

  • Checkout a new branch using git checkout -b <branch_name>

  • 🤖 Apply pre-commit auto formatting, by running pip3 install pre-commit and running pre-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:

  1. If you are not familiar with GitHub or how to create a pull request, here is a guide you can follow on how GitHub works.
  • 🏁 Done Ask in comments for a review :)

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!

@kumar-sanjeeev
Copy link
Contributor

kumar-sanjeeev commented Dec 21, 2024

@christophfroehlich hi, I would like to work on this.

@christophfroehlich
Copy link
Contributor Author

alright. although this not your first issue anymore 😄

@kumar-sanjeeev
Copy link
Contributor

alright. although this not your first issue anymore 😄

Ahh now I read Instructions carefully, next time I will focus on other bugs or good second issue. Thanks

@imsudiproy
Copy link
Contributor

Hi @christophfroehlich , I would like to work on this if this is available.

@christophfroehlich
Copy link
Contributor Author

@kumar-sanjeeev ok for you taking another one?

@kumar-sanjeeev
Copy link
Contributor

Yeah sure 👍🏻

@imsudiproy
Copy link
Contributor

@christophfroehlich @kumar-sanjeeev Thanks

@imsudiproy
Copy link
Contributor

Hi @christophfroehlich,
I have reised a PR to address this issue.
Changes are tested locally and it passed without any errors-

root@1bd3e3af4a7d:~/ros2_humble_ws# colcon test
Starting >>> joint_limits
Starting >>> ros2_control_test_assets
Starting >>> controller_manager_msgs
Finished <<< ros2_control_test_assets [0.02s]
Finished <<< joint_limits [0.82s]                                                        
Starting >>> hardware_interface
Finished <<< hardware_interface [3.82s]                                                        
Starting >>> controller_interface
Starting >>> hardware_interface_testing
Starting >>> transmission_interface
Finished <<< controller_interface [1.00s]                                                                                                                            
Finished <<< transmission_interface [1.73s]                                                                                            
Finished <<< hardware_interface_testing [6.97s]                                                          
Finished <<< controller_manager_msgs [22.2s]             
Starting >>> controller_manager
[Processing: controller_manager]                    
[Processing: controller_manager]                             
[Processing: controller_manager]                              
[Processing: controller_manager]                              
[Processing: controller_manager]                              
[Processing: controller_manager]                              
[Processing: controller_manager]                              
[Processing: controller_manager]                              
[Processing: controller_manager]                              
Finished <<< controller_manager [4min 40s]                    
Starting >>> ros2controlcli
Starting >>> rqt_controller_manager
Finished <<< ros2controlcli [0.71s]                                                            
Starting >>> ros2_control
Finished <<< ros2_control [0.03s]
Finished <<< rqt_controller_manager [0.78s]

Summary: 11 packages finished [5min 3s]

@imsudiproy
Copy link
Contributor

@christophfroehlich @saikishor PR is merged. This issue can be closed now.
Thanks

@saikishor
Copy link
Member

Closing in favor of #1970 and #1971

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants