Comments (5)
Thanks.
I'm curious why not implement it with code instead of relying on log functions? Implementing it by the user would also be simple.
You could say that about all the log macros.
We have ended up implementing many "simple" things throughout our code base in relation to rclcpp functionality and it get tiring writing out the same boilerplate. I intend to follow the same approach here but I wanted to see if it was possible using log macros. If it can, then great I will create a PR, if not, it goes into our private libraries never seeing the light of day.
from rcutils.
Currently, the log provides the function RCLCPP_INFO_ONCE(), but it doesn't fully meet your needs.
If you want to implement it, you can refer to the implementation of RCLCPP_INFO_ONCE()
- rclcpp/resource/logging.hpp.em
- rcutils/resource/logging_macros.h.em
I'm curious why not implement it with code instead of relying on log functions? Implementing it by the user would also be simple.
from rcutils.
I have no reason to oppose adding such a feature to the log function. It brings convenience to the users. Let's hear the opinions of other community members.
from rcutils.
@russkel thanks for creating issue.
hardware not ready yet
// and finally system swaps over
System in good state, ready.
// and then back again
hardware not ready yet
i guess RCLCPP_INFO_ONCE
would not be useful with above use case, that state gets back to the previous state.
maybe there are some constraints, but i would not use topics to share the hardware or sensor state.
instead,
- using service, so that client (user) can know the state anytime they want. (client can ask it when needed, instead of waiting for the topics. this probably conserves the inter-process communication.)
- or parameters? make it read only parameter and read it from the remote nodes, so that client can know the state. besides, using parameter events can be more useful to get the event once the parameter is changed on the device.
from rcutils.
maybe there are some constraints, but i would not use topics to share the hardware or sensor state.
This was an example (and it's dealing with the data stream such as serial from a hardware sensor), this is pretty common where sensors will report their state at > 1Hz. There's no publishing in the example.
I imagine there's a few use cases outside of this example too.
from rcutils.
Related Issues (20)
- logging_macros.h not found HOT 1
- Why does `rcutils_expand_user` fail on non-existent directory? HOT 2
- High logging overhead HOT 5
- AddressSanitizer: new-delete-type-mismatch in rcutils_string_map_fini HOT 3
- Human Readable time in logs HOT 12
- "Failed to find exported target names" error while colcon build HOT 3
- Undefined symbol: rcutils_log_internal HOT 2
- Make logging functionality truly thread-safe HOT 3
- performance_test_fixture not found HOT 4
- Valgrind shows leak in rcutils_load_shared_library HOT 1
- Superfluous `va_copy` call in `rcutils_char_array_vsprintf` HOT 2
- Test failure on nightly_linux_address_sanitizer
- Consol formating ignores escape sequences HOT 4
- Setting/relying on _GNU_SOURCE seems incorrect HOT 2
- out-of-memory in allocator.c HOT 3
- Should logging use ROS time instead of system time? HOT 2
- UB: memcpy with overlapping memory in rcutils_array_list_remove when destroying child logger during tear down
- CMakeFiles.txt lib dir is fixed HOT 1
- Option for rcutils_set_env() to not overwrite existing environment variables. 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 rcutils.