Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timers: consider implementation of timers which uses wait thread #6

Closed
wjwwood opened this issue Sep 8, 2014 · 1 comment
Closed
Assignees

Comments

@wjwwood
Copy link
Member

wjwwood commented Sep 8, 2014

Currently timers are naively implemented using a thread per timer, but it should be possible to implement the timers using a timeout argument to the ros_middleware_interface::wait function. This would potentially be much more efficient and at least more ellegant, as the total number of threads and ros_middleware_interface::GuardConditionHandle's would be significantly reduced. A stepping stone to this, without requiring a timeout in the ros_middleware_interface::wait function, would be to have one thread for all timers which does the same waiting mechanism, but using a sleep function not as a parameter to ros_middleware_interface::wait.

@wjwwood wjwwood added the enhancement New feature or request label Sep 8, 2014
@wjwwood wjwwood added backlog and removed enhancement New feature or request labels Feb 24, 2015
@jacquelinekay jacquelinekay self-assigned this Jul 28, 2015
@jacquelinekay jacquelinekay added the ready Work is about to start (Kanban column) label Jul 28, 2015
@jacquelinekay
Copy link
Contributor

Assigning this to myself and thinking about it this week because of its relationship to real-time performance.

this issue also mentions adding a timeout argument to rmw_wait, which is addressed in this series of changes: ros2/ros2#73

@jacquelinekay jacquelinekay added in progress Actively being worked on (Kanban column) and removed ready Work is about to start (Kanban column) labels Jul 28, 2015
@jacquelinekay jacquelinekay added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Jul 29, 2015
@dirk-thomas dirk-thomas added in progress Actively being worked on (Kanban column) and removed in review Waiting for review (Kanban column) labels Aug 4, 2015
@jacquelinekay jacquelinekay added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Aug 5, 2015
@jacquelinekay jacquelinekay removed the in review Waiting for review (Kanban column) label Aug 10, 2015
alsora pushed a commit to alsora/rclcpp that referenced this issue Oct 13, 2020
clalancette added a commit to clalancette/rclcpp that referenced this issue Dec 8, 2021
* Remove template defaults that we never use.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>

* Rename MessageT to PublishedType in the IntraProcessManager.

It makes it easier to determine which type we are talking about.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>

* Get all the types setup to push the conversion down to IPM.

There really is no functional change here, just preparing to
move the conversion down to the intra-process manager.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>

* Move conversion down to the intra-process manager.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
clalancette added a commit to clalancette/rclcpp that referenced this issue Dec 21, 2021
* Remove template defaults that we never use.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>

* Rename MessageT to PublishedType in the IntraProcessManager.

It makes it easier to determine which type we are talking about.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>

* Get all the types setup to push the conversion down to IPM.

There really is no functional change here, just preparing to
move the conversion down to the intra-process manager.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>

* Move conversion down to the intra-process manager.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
DensoADAS pushed a commit to DensoADAS/rclcpp that referenced this issue Aug 5, 2022
* First implementation of writer

* Extract storage interface and sqlite3 implementation

* Add test for sqlite storage

* Split main() and rosbag2::record()

* Add close() method to Storage

* Add getMessage() method and refactor test

* Refactor SqliteStorage constructor and open()

* Add linters

* Fix uncrustify

* Fix cpplint

* Specify test working directory

* Better error handling

* Use gmock matchers for assertions

* Add test fixture for SqliteStorage tests

* Extract message retrieval in tests into separate method

* Add integration test for rosbag2::record()

* Add ignore files for empty packages

* Introduce create() method and refactor open()

* Use shared pointer of Storage instead of SqliteStorage

* Remove getDatabaseHandle() method

* Fix uncrustify

* Improve storage interface and add storage factory

* Remove need of sleep() from integration test by usage of std::future

* Move deletion of test database from fixture constructor to destructor

* Use sqlite3 directly in intergration test instead of own sqlite wrapper

* Move rosbag2::record() into Rosbag2 class

* Use the test name as database file name

* Add build instructions to README

* ros2GH-37 Rename camelCase methods to snake_case

* Use common test fixture

* Add RAII wrapper for sqlite API

* Mock away sqlite from sqlite_storage test

* Use more reasonable assert

* Add test

* Add virtual destructor to WritableStorage

* Use file_name instead of database_name in StorageFactory

* Implement saving of test files in a tmp directory for linux/Mac

* Try to implement saving of test files in a tmp directory for Windows

* Write and use proper gmock SqliteWrappe mock

* Refactor integration test and get rid of promise/future where possible

* Throw exception in resource aquisition constructors

* Make SqliteWrapper destructor virtual

* Refactor test fixture and update SqliteWrapper mock

* Fix warning when moving a temporary object

* ros2GH-38 Refactor integration test

* ros2GH-38 Get rid of superfluous string constructor in emplace_back()

* ros2GH-38 Assert also execute_query() argument in sqlite_storage_test

* ros2GH-38 add StorageFactory test

* ros2GH-38 Refactor rosbag2 Test Fixture

* ros2GH-40 Add first implementation of a rosbag reader and publisher

* ros2GH-40 Add StorageFactory test when reading non-existing file

* ros2GH-40 Fix uncrustify

* ros2GH-40 Minor cleanup of CMakeLists

* ros2GH-40 Wrap sqlite statements

* ros2GH-40 Remove superfluous import

* ros2GH-40 Use better include

* ros2GH-40 Add play integration test

* ros2GH-40 Fix Warning when moving a temporary object in reading

* ros2GH-40 Initialize database pointer to nullpointer

* ros2GH-40 Fix reader integration test

* ros2GH-40 Polish storage wrapper

* Revert "ros2GH-40: Wrap sqlite statements"

* ros2GH-38 Fix Test Fixture after rebase

* ros2GH-38 Refactor read_integration_test and refix Windows conversion warning

* ros2GH-38 Add StorageFactory test

* Simplify storage factory test

* ros2GH-38 Try to fix flaky test

* ros2GH-38 Move rclcpp::shutdown() at the end

* ros2GH-41 Fix windows warning due to virtual explicit operator bool

* ros2GH-41 Use sqlite3 vendor package in rosbag2

* ros2GH-41 Stop linking tests to sqlite

* ros2GH-41 Fix test fixture on Windows

* ros2GH-41 Cleanup test fixture includes

* ros2GH-41 Print test database name

* ros2GH-41 Correctly determine temp dir on Windows

* ros2GH-41 Show error message on sqlite_open failure

* ros2GH-41 Actually create temp dir on Windows

* ros2GH-41 Fix bool conversion warning in VS2015 build

* Fix CMakeLists.txt after rebase

* ros2GH-40 Implement workouround to fix flaky test

* Update package.xml

* Add gtest test dependencies to package.xml

* ros2GH-40 Move to sqlite3_storage_plugin folder

- The separation into the intended structure and plugin apis is not
  there yet. However, most code will stay in the storage plugin for
  sqlite3 file.
- Proper separation of this code into storage plugin and rosbag layer
  will be done in bosch-io/aos-rosbag2#5.

* ros2GH-40 Add TODO comments and small cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants