Closed jmflpalera closed 2 months ago
Describe the bug
There is an error inside function run_profile_velocity_mode in header file canopen_fake_slaves/include/canopen_fake_slaves /cia402_slave.hpp.
The line is the next:
std::this_thread::sleep_for( std::chrono::milliseconds(((int32_t)control_cycle_period_d * 1000)));
The purpose of this line is to sleep 10 ms but control_cycle_period_d is truncated to 0 so sleep is always 0.
Replace with
std::this_thread::sleep_for( std::chrono::milliseconds(((int32_t)(control_cycle_period_d * 1000.0))));
Describe the bug
There is an error inside function run_profile_velocity_mode in header file canopen_fake_slaves/include/canopen_fake_slaves /cia402_slave.hpp.
The line is the next:
std::this_thread::sleep_for( std::chrono::milliseconds(((int32_t)control_cycle_period_d * 1000)));
The purpose of this line is to sleep 10 ms but control_cycle_period_d is truncated to 0 so sleep is always 0.
Replace with
std::this_thread::sleep_for( std::chrono::milliseconds(((int32_t)(control_cycle_period_d * 1000.0))));