Comments (9)
I'm quite certain that Gazebo does not load its plugins in parallel. I don't think that multithreaded access will be an issue there.
from rcl.
From @BrannonKing on August 31, 2017 20:16
I suppose catching the exception in Gazebo is fine. I just wanted the logging removed (since it already throws an exception). BTW, this should move to rcl; it's logged in the wrong spot.
from rcl.
@BrannonKing Can you please provide more information about how the API is being used and if possible how to reproduce the problem.
from rcl.
I start up multiple Gazebo plugins. Each one has to call rclcpp::init because you don't know which plugin will start first. They all run in the same process, but init prints a message and throws an error about having been called already for every subsequent plugin. I can eat the exception but can't hide the message.
from rcl.
You could just ignore the ones that fail to init for this particular reason (assuming that some other code managed to init first). However we should make sure rclcpp::init
is thread-safe. rcl_init
is not:
https://github.com/ros2/rcl/blob/master/rcl/include/rcl/rcl.h#L108
from rcl.
I think that is what he is trying to do but the calls which throw also print an error message which he currently can't avoid. I will come up with a PR to fix this...
from rcl.
The rcl error just needs to be cleared here: https://github.com/ros2/rclcpp/blob/master/rclcpp/src/rclcpp/utilities.cpp#L168
@dirk-thomas I'll let you do that since you already said you were working on it.
But we should also make sure it is thread-safe, because right now it is not I think.
from rcl.
The rcl error just needs to be cleared here: https://github.com/ros2/rclcpp/blob/master/rclcpp/src/rclcpp/utilities.cpp#L168
Indeed: ros2/rclcpp#366
from rcl.
I'll just reiterate that rclcpp::init()
is not thread-safe. So we either could use a pr to make it so, or @BrannonKing you should take care to protect it in your code.
from rcl.
Related Issues (20)
- Flaky test on Windows on the buildfarm: test_logging_rosout__rmw_connextdds
- master branch is behind rolling branch HOT 2
- Test `test_graph__rmw_connextdds` failing on nightly_win_rep
- Fix durability of service introspection topics HOT 9
- Remove `localhost_only` option for turtule-J HOT 1
- Dynamically remap topic names HOT 8
- Feature request: Sending an Action goal can be complexed, require difficult steps HOT 2
- rcl_action: result_timeout should be started on goal completion HOT 21
- 👩🌾 ❄ Flaky `test_get_type_description_service__rmw_cyclonedds_cpp` & `rcl.TestGetTypeDescSrvFixture__rmw_cyclonedds_cpp.test_service_init_and_fini_functions` tests
- Request for API that returns how many messages are ready for a subscription HOT 1
- Segfault creating a publisher in MoveIt 2 Example, only with Fast DDS RMW HOT 7
- Flaky: failed to add guard condition to wait set: guard condition implementation is invalid HOT 5
- :farmer: `test_node__rmw` test failing for `connextdds`, `cyclonedds` and `fastrtps`
- rcl_yaml_param_parser incorrectly parsing integer values bigger than LONG_MAX = 2147483647
- Adding `ament_generate_version_header(..)` to these packages? HOT 1
- Allow non-ros parameters in params file HOT 4
- Actions: Reason for the default QoS for status_topic_qos? HOT 2
- MSVC 2022 - Segfault on timer_test related with fastrtps::SharedMemSegment.hpp
- :farmer: Flaky `test_action_interaction__rmw_connextdds` in Windows debug and release HOT 4
- Service clients freeze on multi-client cases. HOT 1
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 rcl.