Comments (9)
I need more context to answer this question.
Serialization and deserialization need a schema, as it is called in most of serialization libraries.
In ROS a schema is the MessageDefinition.
When you want to serialize message, which schema are you using? Will it be a ROS message or your own?
For example, let's say that you deserialized a JointState.
Now you are telling me that you want to "serialize it back". What do you mean exactly?
If your answer is "just re-publish the very same message as I received as a JointState" than it is easy using ShapeShifter.
from ros_type_introspection.
Let's keep the example of a JointState msg. I received the message, deserialized it with your lib, now modified some values in the data structures provided by the deserialization output. This modified output should now be serialized again (of course using the same message definition) and published.
from ros_type_introspection.
Good news: I can do this and I can create an example that show you how.
Bad news: it is impossible to change the size of any vector, including strings.
In my use case, I was changing the timestamp, so no problem:
If you want to change values of a Pose, Point, Quaternion, Time, values in a covariance matrix, or any other type with fixed size, than it is OK.
Adding generic serialization capabilities to this library would require a lot of work, and I am not planning to work on this.
Unless, of course, there is a client that really need this and is willing to sponsor its development ;)
from ros_type_introspection.
The PlotJuggler example, you are referring to, actually uses ROS serialization/deserialization methods for the compile-time-known Header
type. In my case, the type would not be known at compile time.
Would this still be possible?
from ros_type_introspection.
Would this still be possible?
Out of the box? No.
I can imagine how this can be done, but only if we never change the size of any array/string.
Saving somewhere the offset in memory for each field, if should be possible to rewrite an area of the serialized memory in place, and later you can republish it using ShapeShifter.
from ros_type_introspection.
Would this still be possible?
Out of the box? No.
That's a pity. Thanks a lot anyways. I'm sure your work will be useful for me in another context in the future.
from ros_type_introspection.
If you need this feature or, in general, if you need this library to be adapted to your needs, you may want to consider the possibility to hire me as freelancer to modify the original code.
Whenever an open source is sponsored, I am happy to offer rates well below the standard in our industry.
If you are interested, you can contact me at [email protected]
from ros_type_introspection.
I just pushed a branch related to this issue, just in case...
from ros_type_introspection.
Thanks for this offer, but I can't pay software development myself.
I would be happy to be paid for my open-source activity as well ;-)
from ros_type_introspection.
Related Issues (20)
- ROSTypeFlat::tree shall be moved to BuildROSTypeMapFromDefinition
- Deserialize Object with BuitInTypes without recursion
- ANNOUNCEMENT: 1.0 beta HOT 14
- Move to abseil HOT 11
- Update Wiki HOT 5
- Lookup ROS msg definitions HOT 20
- Does not build with the latest abseil-cpp from https://github.com/Eurecat/abseil-cpp HOT 2
- Partially deserialize the message? HOT 3
- Building a tree with values from FlatMessage HOT 4
- [SUGGESTION] Parser::applyVisitorToBuffer to support early termination HOT 3
- Problems with some message types HOT 4
- How can/why is ShapeShifter::instantiate const? HOT 7
- Parser::applyVisitorToBuffer() method is slow for sensor_msgs/Image HOT 5
- gcc 7.4.0 gives [-Wmaybe-uninitialized] on code using variant.hpp's convert function HOT 1
- Filter out variables
- Bridging generic subscribers and publishers
- -Wsign-compare warnings triggered by abseil removal
- Noetic release?
- File to message in c++ HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ros_type_introspection.