Comments (2)
@rotu you have sharp eyes! As long as the caller dutifully frees the memory all is well, but I never really looked into the details of how the result of deserialization is handled, other than in returning it to the caller of rmw_take
. I simply followed the example Fast-RTPS's dynamic RMW code, assuming that it would get these details correct.
A little bit of digging now tells me that this particular case is never used! It is implemented in the eProsima Fast-CDR library with good reason — that's a generic tool for applications to build upon — but this particular use in TypeSupport_impl.h
always uses the std::string
case.
Deleting the char *
case would be best.
There’s a lot of other questionable code in here, including much use of macros where templates would be more appropriate and repeated code.
I agree with that assessment. What I tried originally was classifying types as primitive or not, then have a single templatized one for all primitive ones and handling the few others with special cases, but I got lost in the C++ template error messages. Macros were simply the quickest way to getting something up and running. Now that times have changed, I'm all for cleaning this up.
The best thing would be to rewrite TypeSupport
and serdes
both. There is quite a bit of code involved in interpreting the ROS type description and some — I would suspect, common — types such as arrays of records of floats involve a significant bit of overhead now. It makes much more sense to preprocess the type to a simpler form that can be interpreted more efficiently.
from rmw_cyclonedds.
I agree that a rewrite is in order, and I’ll pitch in with a few PRs.
You may find (as I do) that Clang is tons better than gcc for writing template code. It gives clearer error messages.
from rmw_cyclonedds.
Related Issues (20)
- Update rmw_cyclonedds to use Cyclone 0.9.0 and Iceoryx 2.0
- Cyclone DDS hangs in Galactic within a VM with all defaults using ros2cli HOT 4
- Hidden limitation in action server names? HOT 6
- Using mv_cyclonedds , not working comunication between two computers in the same network HOT 1
- Memory leak when using ROS 2 actions HOT 4
- segfault in lease_renew on publish with manual by topic liveliness qos HOT 8
- Crash on Ubuntu 22.04 HOT 3
- Missing cstring include
- Gzserver crashes on ROS 2 Foxy w Cyclone DDS HOT 2
- colcon rmw_cyclonedds compile failed! HOT 7
- Content Filtering Topics Support HOT 1
- rmw_cyclonedds_cpp: Cannot locate rosdep definition for [iceoryx_binding_c] HOT 3
- Shared memory not working with transient_local durability HOT 8
- fatal error: iceoryx_binding_c/chunk.h: No such file or directory, but "chunk.h" is exist HOT 2
- Invalid read & leaks in node and publisher destruction HOT 1
- Include topic names in error messages HOT 3
- Action based CI Broken for foxy pull requests HOT 9
- Potential dangling pointer in event data
- ros_data may changed when data invalid HOT 1
- configuration to enable communications with lan and vpn interface HOT 2
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 rmw_cyclonedds.