dynamixel_hardware icon indicating copy to clipboard operation
dynamixel_hardware copied to clipboard

Delayed Read Write Calls till after `on_activate()` is completed

Open soham2560 opened this issue 9 months ago • 3 comments

In this PR

  • Fixed #88 (refer abab217f3d3c2a7a3618062cf50228268b6caab1)
  • Added bool variable that exits out of the read and write calls till on_activate is completed

How was this tested?

  • Tested on Humble with XC330-M288T in Position Control Mode at 200HZ with JTC

soham2560 avatar May 12 '24 09:05 soham2560

@ijnek can you have a look at this?

soham2560 avatar Jun 02 '24 14:06 soham2560

I found a bug with this code. It doe solve the Port in Use bug. But it also means we can't read the current joint position when we active the plugin. As the reset_command() is called before activated_ = true; is set. Hence we can't read any values from the servo motor. This is the output from the this: joints_[i].command.position = joints_[i].state.position;

joints_[i].state.position: nan

brennand avatar Jul 23 '24 00:07 brennand

I found a bug with this code. It doe solve the Port in Use bug. But it also means we can't read the current joint position when we active the plugin. As the reset_command() is called before activated_ = true; is set. Hence we can't read any values from the servo motor. This is the output from the this: joints_[i].command.position = joints_[i].state.position;

joints_[i].state.position: nan

aah, missed that. do you have any solution for the same?

soham2560 avatar Jul 28 '24 09:07 soham2560