-
Notifications
You must be signed in to change notification settings - Fork 4
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
Updates #15
Updates #15
Conversation
@SammyRamone can you review and test on your machine? |
Thanks a lot for the effort you put into fixing this weird issue! |
The code works (both for the Python interface as well as through normal ROS 2 calls) 🥳 For the init problem, I think that just having a small C++ method with Python interface is the best solution. There are some methods to optain However, I agree that this (+ some dokumentation how to run the ROS 2 plugins from Python) can be resolved in a second PR. If you want to, I can programm it. |
Excellent; I'll go ahead and merge then
Good point. I've used the Python interface in the past to run a series of reach studies where I changed some ROS parameters in between runs, so I think that would be a useful addition
Sure, that would be helpful. I'll open an issue about the features we want to expose in the Python interface for reference |
This PR updates the ROS interface singleton pattern to allow the plugin library from this library to be loaded dynamically from within Python and for downstream custom plugins to be able to link against the interface implementations in this repo. This PR partially addresses #13. My guess is that the primary issue was that the
extern
declaration of the node singleton. Since the node was provided in the c++ reach study executable (and not in the library itself), the node singleton looked like an undefined reference to any other executable that tried to load it.Although this PR allows ROS2-enabled plugins to be loaded in Python, they won't actually work in a Python script because
rclcpp::init
needs to be called first with the contents ofargv
(i.e. parameters, etc.). I tried callingrclpy.init()
in the Python script instead (see below), but that doesn't seem to do the trick. I think we'll need to add a small Python interface to this repo for invokingrclcpp::init
from Python. I propose that be done in a separate PR