-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
How to create a ros2 node written in c++ to co-simulate with webots?? #626
Comments
You can create your own package for your simulations and own plugins (in C++ and Python) to extend the interface between the package and Webots. There are tutorials located in the wiki to help you: I am not sure to understand what your exact needs are, but in case you are looking for a more simpler node that processes data, publishes and subscribes to existing topics, you can take a look at the following tutorial on the official ROS 2 documentation: https://docs.ros.org/en/foxy/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Cpp-Publisher-And-Subscriber.html. |
First, thank you for your reply. I have read both of the two links you provided. The first link uses python language, and the webots_ros2 function package used in the second link seems to be out of date, or I don't understand the meaning of the second function package. May I ask if there are more in-depth examples? Thanks! |
In my knowledge, there is no other example based on C++. Concerning the tutorial on the C++ plugin, what exactly do you mean by "out of date"? Is something not working anymore? Could you give a pointer to the part that is deprecated, so I can update it? |
You are right, the tutorial was broken when we switched the controller API from C++ to C in I will fix it and let you know once it is done. |
Ok, thank you very much. Since I am in a hurry to implement the function shown in the problem, would you mind telling me an approximate repair time, or could you give a routine under the current code framework? |
This is it, the tutorial is now up-to-date and fixed. I also added additional information to make it clearer. Don't hesitate if you have any additional suggestions. Since #508, it is not possible anymore to use the C++ API from plugins. Exclusively the C API should now be used. |
Oh, thank you very much. I will follow the tutorial and try to write my own code. If there is any problem, I hope to wait for your help. Thank you again. |
I assume we can now close this issue. Feel free to re-open it if needed. |
I am trying to create a ros2 node written in c++ to co-emulate with webots. Although I have checked a lot of materials, I still have no success. I wonder if the official can write relevant tutorials?
The text was updated successfully, but these errors were encountered: