Skip to content

Commit

Permalink
fixed the bug with direction and feedback on motor position
Browse files Browse the repository at this point in the history
  • Loading branch information
missxa committed May 14, 2021
1 parent 140a94a commit 16bf18b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/roboyPlexus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void RoboyPlexus::MotorStatePublisher() {
case DIRECT_PWM: msg.setpoint.push_back(bus->GetSetPoint(m.first)*m.second->direction);
default: msg.setpoint.push_back(bus->GetSetPoint(m.first));
}
msg.encoder0_pos.push_back(bus->GetEncoderPosition(m.first,ENCODER0_POSITION)*m.second->encoder0_conversion_factor*m.second->direction);
msg.encoder0_pos.push_back(bus->GetEncoderPosition(m.first,ENCODER0_POSITION)*m.second->encoder0_conversion_factor);//*m.second->direction);
msg.encoder1_pos.push_back(bus->GetEncoderPosition(m.first,ENCODER1_POSITION)*m.second->encoder1_conversion_factor);
msg.displacement.push_back(bus->GetDisplacement(m.first));
// msg.displacement.push_back(msg.encoder0_pos.back()-msg.encoder1_pos.back());
Expand Down

0 comments on commit 16bf18b

Please sign in to comment.