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 [email protected]

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 <[email protected]>
Signed-off-by: Chris Lalancette <[email protected]>
@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 <[email protected]>
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 <[email protected]>
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 <[email protected]>

* Updated the CHANGELOG and version to release binary packages

Signed-off-by: Pyo <[email protected]>

* Update README.md

* - fixed buffer overflow bug (rxpacket size)

* Fixed buffer overflow bug (rxpacket size)

Signed-off-by: Pyo <[email protected]>

* Added change log information

Signed-off-by: Pyo <[email protected]>

* Fixed typo in the package.xml and header files

Signed-off-by: Pyo <[email protected]>

* 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 <[email protected]>

* - 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 <[email protected]>
Co-authored-by: Pyo <[email protected]>
Co-authored-by: zerom <[email protected]>
Co-authored-by: kijonggil <[email protected]>
Co-authored-by: Darby Lim <[email protected]>
Co-authored-by: guichristmann <[email protected]>
Co-authored-by: Will Son <[email protected]>
Co-authored-by: Ryan Jaehyun Shim <[email protected]>
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