Skip to content

Conversation

@jschlind411
Copy link
Contributor

@jschlind411 jschlind411 commented Nov 1, 2017

Rovers would get stuck in the ROTATE state of the statemachine inside DriveController.cpp . The values being passed out of the fastPID method were too low (varied from 40 all the way to 0 or 1). The net result was the rover would send these through ROSAdapter into sendDriveCommand resulting in constant power to motors but the rover wouldn't move. The fix was to set a hard min value for rover motor speeds coming out of fastPID inside the ROTATE state. Currently set to 80 and seems to run ok. Needs testing. Made changes to PID.cpp and ROSAdapter.cpp with cleaning up and commenting all 3 files and moving some braces for readability while debugging problem. Currently left debugging cout statements in code for future hardware testing. Will remove once testing is complete before pull request is accepted.

Actual fix located in DriveController.cpp on lines 139-171

Fixes issue #91

Rovers would get stuck in the ROTATE state of the statemachine inside DriveController.cpp .  The values being passed out of the fastPID method were too low (varied from 40 all the way to 0 or 1).  The net result was the rover would send these through ROSAdapter into sendDriveCommand resulting in constant power to motors but the rover wouldn't move.  The result was to set a hard min value for rover motor speeds coming out of fastPID inside the ROTATE state.  Currently set to 80 and seems to run ok.  Needs testing.  Made changes to PID.cpp and ROSAdapter.cpp with cleaning up and commenting all 3 files and moving some braces for readability while debugging problem.  Currently left debugging cout statements in code for future hardware testing.  Will remove once testing is complete before pull request is accepted.
Copy link
Contributor

@kristiana-rendon kristiana-rendon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working

1.) Rover no longer gets stuck while turning

Not Working

None

Additional Comments

None

Copy link
Contributor

@kristiana-rendon kristiana-rendon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mischecked the review response. This pull request is ready for merging!

@gmfricke gmfricke merged commit 03ca026 into master Nov 2, 2017
@gmfricke gmfricke deleted the bug-rover_lockedup_state branch November 29, 2017 16:10
mike-matera pushed a commit to mike-matera/SwarmBaseCode-ROS that referenced this pull request Dec 31, 2019
Use tf2 and the tf_static latched topic and get rid of our old foes the sonar transforms.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants