-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Update using-ros.md #6156
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
Update using-ros.md #6156
Conversation
Added instructions to implement a ROS node to serve as an extern Webots controller in C++. Only Python has been mentioned so far.
ygoumaz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the enhancement!
I am wondering if we should not directly provide a sample C++ controller corresponding to ros_python.py and call it ros_cpp.cpp. The package could also contain the CMakeLists.txt file. The controller could be compiled from the webots_ros package and a dedicated launch file (webots_ros_cpp.launch) would allow to start the same world as the Python example with the compiled C++ controller.
The content of the CMakeLists.txt file could be removed from the .md documentation and we could provide instructions to run the launch file equivalent to the Python one.
Co-authored-by: Yannick Goumaz <[email protected]>
Co-authored-by: Yannick Goumaz <[email protected]>
For me, it makes sense to keep the cmake instructions in the doc because they are generally applicable and precisely show what has to be added. Might be more straightforward than having to look up an example... |
|
I agree with you. While it is important to keep the content in the document for reference and quick lookup, I would still include the example in the package. Simply relying on the CMakeLists file may not be straightforward for everyone to implement. Adding the example in the project, along with the detailed file and instructions in the documentation, would help users to understand the differences with the Python implementation (including the controller file), while also being able to run it. Note: there is a small error in the test of the documentation related to uppercase in a title. |
ygoumaz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is still waiting for the required changes.
|
Just to clarify, I do not have time to implement myself an example for this (if this is what was understood), sorry! |
|
As it is, I really believe it won't help a lot of people. Experts in programming will easily find a way to get the equivalent in C++, while beginners will struggle with this only paragraph in the documentation. Without a concrete example I think this doesn't make a lot of sense, lacks some clarity and is not consistent with the current Python example. I am closing this PR for now. Feel free to reopen it if you find time to implement the example. |
|
As you wish, if you prefer to provide no help at all instead of a useful hint, which only requires some basic knowledge about how to build a ROS node, fine by me... |
Description
Added instructions to implement a ROS node to serve as an extern Webots controller in C++. Only Python has been mentioned so far.
This only requires some minimal setup in the ROS package's
CMakeLists.txtand is therefore quite straightforward.Documentation
This pull-request changes the following file:
https://cyberbotics.com/doc/guide/using-ros?version=released