Skip to content

Velocity control mode doesn't work in dummy mode #71

@ErikParkerrr

Description

@ErikParkerrr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions