-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pros::IMU : Add relative value functions such as set_rotation(), set_heading(), reset_rotation(), reset_heading() etc. #252
Comments
There is not currently a way to do this with the PROS API, but we should add it (cc @kunwarsahni01 / @WillXuCodes). in the meantime, you can make a class that wraps or inherits from the |
Thank you! |
I may be missing something here... I have implemented pid functions to turn and move the chassis using pros:Imu. If there is no function, say to reset the rotation, how can I make two turns in autonomous code say 45 degrees and another 90 degrees? Should I 'maintain' previous rotation value and manipulate it for the next? |
You could try saving the current angle and add it to how many x degrees you want to turn in the function where you turn another x degrees. Also, I recommend vexforum or the VTOW discord server for questions about coding advice. This github page is for discussion about bugs and features to be implemented. We thank you greatly for the idea of this feature :). |
Thank you! |
Expected Behavior:
set IMU sensor's rotation, yaw and heading to zero value; currently IMU retains the value from the prev reading.
Actual Behavior:
I would like to reset IMU sensor's rotation to zero prior to every turn and don't see method to reset_rotation() like robotmesh api. Are there any methods available to reset heading, rotation etc. in the IMU without actually calibrating the IMU prior to each turn or movement...
Steps to reproduce:
none
System information:
Platform: V5
PROS Kernel Version: 3.2.1
Additional Information
none
Screenshots/Output Dumps/Stack Traces
The text was updated successfully, but these errors were encountered: