-
Notifications
You must be signed in to change notification settings - Fork 0
Fixes/princeton #23
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
Fixes/princeton #23
Conversation
Also add armPose and point header files Yo sontraen onidgon - Emmie Jones
Heeyaw - Emmie J
2D points use 0.0 as their Z axis values VrOOOOoOoOommM - Emmie Jones
Amazing - Emmie Jones
hEehOO Add tHe .0 - Emmie Jones
"Where are your arms?" - Us, 2023 - Emmie Jones
"Remember when you tried to kill me twice?" - Emmie Jones
yeehaw heeyaw - Emmie Jones
"I was chosen for the constitutional convention!" - Emmie Jones
"AAAAAAAAAVVVVVVVVVEEEEEEEEE MARRRIIIIAAAAA" - Emmie Jones
"AAAAAAAA" - Emmie Jones
"" - Emmie Jones
Initial IK only focused on shoulder and elbow joints on a single plane. Add support for turret angle. - Emmie Jones
Use correct method names. add override keyword for compiler checking. add virtual for base class methods. yeehaw - Emmie Jones
Yeeyee - Emmie Jones
(Because Justin said so but doesn't know why) "Double double double" - Emmie Jones
yee - Emmie Jones
weehaw - Emmie Jones
We Are Toast - Emmie Jones
- Add MoveToIntakeCommand. - Add boundary classes. - Add no-go zones. - Define no-go zones. - Add safety points. - Add reach points. - Emmie Jones
Because Justin said so. - Emmie Jones
- Justin C and Emmie Jones
- Justin C and Emmie Jones
* master: (34 commits) Reformat Fix: Left trigger slows and right trigger speeds up drive Add comments commands: add drivetrain subsystem requirement to DriveTeleopCommand Kill program if unable to open config.toml Fix: build fails when catching exception by value build: Make gradlew executable git: ignore gradle.properties for local overrides add file name to toml load error message change input limiter to accept all values of max and min from the constants file change m_drivetrain to c_drivetrain in driveTeleopCommand add drive command to robot add teleop driving command add subsystems and HIDs to the robot class add Xbox Controller USB interface constants to Interfaces bugfix: change the scope to reset the navX heading to the global scope add enabling/disabling odometry calculation functions add odometry logic add base code for odometry add getter functions for the individual swerve module sensors ...
- Justin C
- Justin C
Turn wheels to form an X and resist shoves or sliding. - Nick Q
Arm teleop was moving the target position kilometers away due to exhaustion induced programming errors merging two incompatible concepts into an incorrect implementation. Rewrite to focus on one concept: compute various offsets, then add to current target position. - Nick Q and Justin C
When arm teleop command is rescheduled, it will continue moving to the previous target. Add method so the command can be reset to hold at the current arm position, not just at initialization. - Nick Q
Try to avoid further destruction of the arm by reducing the max current limits. - Justin C
- Justin C
|
NOTE: this includes the code from the features/arm branch -Nick Q |
|
Added myself because I still need to review arm code -Nick Q |
| const double k_maxPointSpeed = 0.005; | ||
| const double k_maxPointRotSpeed = (2.0 * M_PI / 10.0) * 0.02; // radians per second in 20ms. | ||
| const double k_maxWristRotSpeed = (2.0 * M_PI / 2.0) * 0.02; | ||
| const double k_maxGripSpeed = 0.1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should go in the Constants.h file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These constants aren't meant to be shared with an other parts of the program. I had concerns that someone might be inclined to reuse them for another purpose and have cause to change them.
I'm inclined to leave this for the competition as it's tested, and change it after.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. is there a possibility after competition to rename it to be c_ to clarify that it is not intended to be a global constant?
nickquednow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most looks good to me. There was only one major thing in there (it involved overloading a function), but other than that, looks good for the arm code.
| double leftX = c_operatorController->GetLeftX(); | ||
| // Square input to improve fidelity. | ||
| leftX = DEADZONE(leftX); | ||
| leftX = std::copysign(std::clamp(leftX * leftX, -1.0, 1.0), leftX); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we use std::pow(leftX,2) here (consistency).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's doesn't matter to me. Either way gets the point across. I'd like to think the c++ compiler is smart enough to convert a function call into a single equivalent multiplication, but I couldn't say for sure.
| const double k_maxPointSpeed = 0.005; | ||
| const double k_maxPointRotSpeed = (2.0 * M_PI / 10.0) * 0.02; // radians per second in 20ms. | ||
| const double k_maxWristRotSpeed = (2.0 * M_PI / 2.0) * 0.02; | ||
| const double k_maxGripSpeed = 0.1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review :)
| double gripMag = std::sqrt(std::pow(m_target.x,2)+std::pow(m_target.y,2)); | ||
| double gripDir = std::atan2(m_target.x, m_target.y); // 0 deg == y axis | ||
|
|
||
| // Rotate turret. Speed of rotation is reduced the further the arm reaches. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we move the second comment to line 44?
| double rightY = -c_operatorController->GetRightY(); /* Invert so + is up */ | ||
| // Square input to improve fidelity. | ||
| rightY = DEADZONE(rightY); | ||
| rightY = std::copysign(std::clamp(rightY * rightY, -1.0, 1.0), rightY); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we put std::pow(rightY,2) here?
|
We're three days before a competition. I've got more commits in The concerns here with files related to the arm system will be fixed later in a separate commit. I don't have the time to fix these now, merge this, rebase/merge |
This reverts commit 0f4ec52. combined multiple things into one commit. undoing.
did not realize it was used by the driver, so it was removes. undone :)
StartEndCommand used by autonomous. - Justin C
|
Due to the "fix later" issue, I will approve the changes and go ahead and approve the pull request (after the arm fixes have been merged and tested). I will just put the things into a new issue on GH. |
nickquednow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was only 1 odd thing I saw in robot.h other than that, it looks good.
I already opened an issue referencing this. All of the individual "will fix later" is addressed in the |
-Nick Q