Portable types (Vector, Matrix, Quaternion, Vec2D, MapGrid2D, Image, Sound, PointCloud) #1603
Replies: 7 comments
-
Related: #1559 Statement: Fully reasoning on this comment, we'd say What would be left unresolved is where robotic classes (map, pose/quaternion) go. Two options here:
I left out options that contradict the first statement (putting them in Another topic is rather specific types should even exist (as you state, MapGrid2D vs Image). IMHO, types are good, even if it's just a typdef or raw public inheritance that adds no extra functionality. n/a
Sounds good, see below.
That implementation LGTM. :-) |
Beta Was this translation helpful? Give feedback.
-
Just to clarify, IMHO... I understand the conception of small vector mathematical operations vs big media objects. Following this reasoning, the general use case is that layer set up should look more like this:
The additional advantage of this is maintaining a certain degree of modularity and avoid mutual dependencies, enabling at least being able to (1) freely disable the top math layer (2) freely disable the above sig/dev and math layers. It would be great to know different opinions! :-) |
Beta Was this translation helpful? Give feedback.
-
If I remember correctly the logic in the current separation was more or less: Place in
I agree that portable containers could go to If you think that other "mathematical entities" (like |
Beta Was this translation helpful? Give feedback.
-
It's not very clear the meaning of "signal" here... I believe that the original reason for having them separate, was that the math library was dependent on a GPL library, therefore when you wrote the library you had to separate them, in order to be able to transmit them, without actually using them, even when the math library was not available. Am I wrong here? This situation at the moment is very odd, and it implies that in order to do use the operators for I know this is a big breaking change, but I think that the clean way to handle this would be to have a "storage vector" in |
Beta Was this translation helpful? Give feedback.
-
It is true that operators that act on They can be used in isolation, or with another linear algebra library, in my opinion their existence in the The implementation of storage vector in |
Beta Was this translation helpful? Give feedback.
-
Refactoring A different thing is instead moving Vector/Matrix out of All the other signals (e.g. quaternions, sound, point-cloud) could have potentially their own math, even though we haven't defined it yet. To that end, one might need to resort to proper external libraries to implement those operations efficiently; that's why separating signals from their math (available, yet-to-come, won't-provide) is useful and wieldy. |
Beta Was this translation helpful? Give feedback.
-
Again... some confusion here. There is no "matrix" data structure in computer science, a matrix can be implemented using different methods, a single array (possibly with padding between lines), an array of array; it can be stored by rows, or by columns. Yes, in case of the Matrix class, the underlying structure does not have the methods to access elements by rows and columns... Perhaps we could have a |
Beta Was this translation helpful? Give feedback.
-
I have a huge confusion in my head about these classes, hence I'm opening this issue to discuss about this. I think we should start clarifying a few things. I'll just leave a few discussion points and a few ideas here, just to start...
I see 3 types of objects here:
I remember there was a discussion at some point, where it came out that Vector is serialized better than std::vector for some reason. Was it just in thrift, or was it somewhere else? If it is in thrift, we should definitely improve it. In
yarpidl_rosmsg
, vectors are stored using std::vector and serialized/de-serialized usingconnection.appendExternalBlock
(in "bare" mode) or with a for loop andappendDouble()
(in "text" mode). I think this makes sense.Vector is used in several places as a container and in many places as mathematical vector. This is really confusing, I think we should have a
Portable
vector" that is just a storage, and that is used internally by the mathematical vector.What do you think about having "portable containers" (vector, array, list, and more), possibly implemented as
This will be some sort of compatibility layer between c++ and YARP, something similar to opencv and yarp images, and pcl and yarp point clouds.
Beta Was this translation helpful? Give feedback.
All reactions