-
Notifications
You must be signed in to change notification settings - Fork 57
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
Adding some non-trivial examples to docs #57
Comments
@yck011522 thanks for the suggestion! I added several advanced examples here and also details about disconnection and reconnection. I did not (yet) add an example of using json with Does that look good? |
Thanks @gonzalocasas More discussion on the dictionary to string hack: So I suppose the preferred way is to use custom messages. But that requires rebuilding ROS. What if a user do not have access to building their own ROS? Any alternative solutions? |
I'd just like to give a major 👍 for additional+clarified samples, indexed by core needs. After "how do I connect?" and "how to I create a topic?", which are covered reasonably in the docs, the next question I had was "how do I send a message?". That's covered in general, until you hit nested message types. It's not immediately obvious that the correct approach is nested dictionaries. Once I figured that out, the next hurdle was the values of those types -- and I think Edit: it also appears that the sample code computes |
I am trying to decode sensor_msgs/PointCloud2 messages without much success. The data is encoded pretty much like an image, but it is necessary to decode the PointField[] fields to determine the structure, etc. I am considering using ros_numpy: e.g https://github.com/eric-wieser/ros_numpy/blob/master/src/ros_numpy/point_cloud2.py but it relies on the original ROS libraries. |
This is not really an issue but more of a friendly feature that could be added to reduce new-comer learning curve. I believe adding some non-trivial examples to the ReadTheDocs would help a lot of new comers start with their production code.
There are recurring themes that have been asked / discussed in this Issue Tracker in the past weeks and I realized those conversations could have been summarized into some examples files that can be shared to users. The following are some examples I have in mind:
Connect, disconnect and reconnect to ROS
Some confusion between
client.close()
andclient.terminate()
and when to use them. As discussed in #56.How to check message round trip latency.
The publisher and listener node testing code used by @gonzalocasas to diagnose #41
Non-blocking subscription of messages that requires long processing time.
A multi-thread example where each received messages needs to be processed for a long time. Requiring the use of
Threading
for processing.Handshake between publisher / nodes to ensure each other is connected and responsive.
Subscribing to but only keeping the latest messages:
The use case / behaviour described by @HWiese1980 in #41 (comment) and answered by #41 (comment)
Examples of all standard message types that ROS support.
For example how to take advantage of
std_msgs/String
for transmitting json-serialized Python Dictionary. Usage ofstd_msgs/Header
. Transmitting a python time stamp usingstd_msgs/Time
, and different*MultiArray
types to hold a Python list.I believe each of these samples deserves a short page to describe the case and also provide with the actual file that can be executed. I personally like the layout of the index page and grouping strategy used by Rhino Python Samples.
The text was updated successfully, but these errors were encountered: