dynamixel_hardware icon indicating copy to clipboard operation
dynamixel_hardware copied to clipboard

Velocity control mode doesn't work in dummy mode

Open ErikParkerrr opened this issue 10 months ago • 0 comments

Title says it all. Source code indicates this to be true.

return_type DynamixelHardware::write(const rclcpp::Time & /* time */, const rclcpp::Duration & /* period */)
{
  if (use_dummy_) {
    for (auto & joint : joints_) {
      joint.prev_command.position = joint.command.position;
      joint.state.position = joint.command.position;
    }
    return return_type::OK;
  }

I tried to fix it myself with

if (use_dummy_) {
    for (auto & joint : joints_) {
      joint.prev_command.position = joint.command.position;
      joint.state.position = joint.command.position;
      joint.prev_command.velocity = joint.command.velocity;
      joint.state.velocity = joint.command.velocity;
      
    } 

but no dice.

ErikParkerrr avatar Apr 20 '24 16:04 ErikParkerrr