Comments (1)
Thanks for bringing this up! I agree that this has a lot of upsides.
The goals for the DDS instrumentation, in order of importance, are:
- Collect the necessary information to be able to link published messages to received messages. This is of course the
source_timestamp
value. The DDS writer/reader fields are only used to link thedds:write
/dds:read
to their corresponding publisher/subscription.- We do collect the DDS topic name, but it's not that useful
- Have a tracepoint as close to the network/transport as possible so that we know exactly(-ish) when we've sent or received the message
- This (and symmetry) is the only reason I created
dds:read
, since it doesn't collect thesource_timestamp
- The RMW and DDS tracepoints are very close together, so we don't strictly need anything in DDS
- This (and symmetry) is the only reason I created
Therefore, if we can achieve that directly in RMW, then yeah it's even better. My only concerns are:
- Are the proposed DDS API call changes acceptable? I assume so
- Are there any potential side effects if we use, for example with Cyclone DDS,
std::chrono::system_clock::now().time_since_epoch().count()
instead ofdds_time()
for thesource_timestamp
on the publisher's side? It's not really a problem for tracing, since we only use them as IDs, but it could affect other users.
To add to your proposed changes, we could do a number of other optimizations:
- (Merge
rmw_publish
withdds:write
andrmw_take
withdds:create
, and remove the DDS writer/reader fields) - Remove
dds:create_writer
anddds:create_reader
, since we don't need the DDS writer/reader fields - Remove
rmw_publisher_init
&rmw_subscription_init
, since they're only used to link the ROS 2 pubs/subs to their DDS writer/reader through their GIDs
Regarding making a number of tracepoints effectively optional, if we remove the DDS writer, then we lose the link between rmw_publish
and its publisher, since rmw_publish
doesn't include the publisher (whereas rmw_take
does include the subscription). However, we could always change rmw_publish
to include the publisher. As you said, it would be valuable to reduce the number of required tracepoints.
Can you try to implement your proposed changes to make sure it works? No need for all the optimizations I mentioned above. Then you could open PRs and we could discuss with the rmw_*
maintainers.
from ros2_tracing.
Related Issues (20)
- Clang warning
- Fix mypy test failures HOT 2
- How to trace non-ROS2 functions within ros2_tracing and view in tracecompass HOT 3
- Replace distutils.version.StrictVersion since distutils is deprecated
- Memory leak with tracetools::get_symbol()
- Process trace events into intermediate storage format HOT 4
- Destroy tracing session if it exists when tracing configuration fails
- Remove context_names parameter in Rolling
- Mention needing to start tracing before starting application
- Find solution to allow starting to trace from any point in time
- regression in build on macos HOT 1
- Provide non-interactive 'ros2 trace start/pause/resume/stop' commands HOT 1
- test_tracetools_launch tests causing GitHub CI to hang HOT 1
- Colcon build error after installation of ros2_tracing HOT 2
- rcl_init miss HOT 11
- Empty and partially-filled metadata files from trace HOT 4
- lttngpy fails to build on Windows Debug HOT 3
- Allow tracing tests to be run in parallel with tracing tests & normal tests
- Fix LTTng issue with `test_ros2trace` and `test_tracetools_launch` so that they can run tracing tests in parallel
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 ros2_tracing.