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

Use select to reduce CPU usage. #361

Open
wants to merge 2 commits into
base: ros2
Choose a base branch
from

Conversation

clalancette
Copy link

Since the file descriptor to the COM port is non-blocking,
use select to sleep for as long as we need to get data. This
reduces CPU usage quite a lot.

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

Since the file descriptor to the COM port is non-blocking,
use select to sleep for as long as we need to get data.  This
reduces CPU usage quite a lot.

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

Friendly ping; what do you think about this change?

ROBOTIS-zerom added a commit that referenced this pull request Jan 9, 2020
- Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
ROBOTIS-zerom added a commit that referenced this pull request Jan 9, 2020
Fix two potential memory leaks. (#361)
ROBOTIS-zerom added a commit that referenced this pull request Jan 9, 2020
- Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
ROBOTIS-zerom added a commit that referenced this pull request Jan 9, 2020
Fix two potential memory leaks. (#361)
smkaeser added a commit to WeRobotics/DynamixelSDK that referenced this pull request Jan 14, 2021
* Non-standard baudrates are supported on the latest Mac OS

* - added clear instruction & example

* fixed bug removeStuffing

* - added clear instruction

* added clear_multi_turn example

* remove python build

* - reduced TXPACKET_MAX_LEN & RXPACKET_MAX_LEN (4K -> 1K)
  because the size of most Dynamixel receive buffers is 1K.
- checked whether memory allocation was successful.
- marked the crc table as static const
- changed addStuffing() function (reduced stack memory usage)
- removed busy waiting for rxPacket()
- fixed the broadcastping bug in dxl_monitor

* - modified "ros" directory C++ code.

* added clearmultiturn packet handler

* added ros clearMultiTurn API

* modified ros clear multi turn

* sync opencjr

* sync opencm

* add macro

* updated the CHANGELOG and version to release binary packages

* Update bulk_read_write.py

fixed typo.

* - updated c lib & dll file.

* fixed typo.

* - fixed "protocol_combined" example bug

* - changed C# / win32 / protocol_combined output path.

* Updated the CHANGELOG and version to release binary packages

Signed-off-by: Pyo <pyo@robotis.com>

* Updated the CHANGELOG and version to release binary packages

Signed-off-by: Pyo <pyo@robotis.com>

* Update README.md

* - fixed buffer overflow bug (rxpacket size)

* Fixed buffer overflow bug (rxpacket size)

Signed-off-by: Pyo <pyo@robotis.com>

* Added change log information

Signed-off-by: Pyo <pyo@robotis.com>

* Fixed typo in the package.xml and header files

Signed-off-by: Pyo <pyo@robotis.com>

* Added imports to __init__.py in ros package.

* - packet timeout in broadcastPing() overflow bug fixed.
- bug in python removeStuffing() fixed.

* - fixed "conflicting types for 'reboot'" error in mac OS.

* Fix two potential memory leaks. (ROBOTIS-GIT#361)
- Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>

* - fixed memory leak issue (group sync/bulk series)

* - fixed an issue loading the wrong library (in x86)

* 3x faster getError member function of GroupSync&BulkRead Class ROBOTIS-GIT#388

* Update setup.py

changed the version of Dynamixel SDK

* support noetic

* update version info

* resolve package name conflict

* revise ROS1 version

* DynamixelSDK_ros_examples

* update comment

* Update CMakeLists.txt

* - modified setCustomBaudrate() function. (ROBOTIS-GIT#430)

* update changelog

* update issue template

* update issue template

* Update read_write.py

- position length bug fixed.

Co-authored-by: kizitorashiro <kizitora.shiro@gmail.com>
Co-authored-by: Pyo <pyo@robotis.com>
Co-authored-by: zerom <zerom@robotis.com>
Co-authored-by: kijonggil <kkjong@robotis.com>
Co-authored-by: Darby Lim <thlim@robotis.com>
Co-authored-by: guichristmann <guichristmann@gmail.com>
Co-authored-by: Will Son <willson@robotis.com>
Co-authored-by: Ryan Jaehyun Shim <38637417+rjshim@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

1 participant