-
Notifications
You must be signed in to change notification settings - Fork 6
Fix actuator range and align joint axes for left/right arms #4
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
base: main
Are you sure you want to change the base?
Conversation
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.
Summary of Changes
Hello @gahyun0425, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request addresses inconsistencies in the robot model's arm definitions. It primarily focuses on correcting the control range for a specific right arm actuator and aligning the joint axes for the base joints of both the left and right arms. These changes aim to ensure more reliable control commands and establish symmetric and predictable kinematics for the robot's arms.
Highlights
- Right Arm Actuator Range Correction: The control range for actuator_arm_r_joint2 has been updated from 0 3.14 to -3.14 0 to match the underlying arm_r_joint2 definition, resolving potential control inconsistencies.
- Arm Base Joint Axis Alignment: The axis definition for arm_l_joint1 and arm_r_joint1 has been changed from 0 1 0 to 0 -1 0 to establish a symmetric convention for the base joints of both arms, improving kinematic consistency.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
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.
Code Review
This pull request aims to fix inconsistencies in the robot arm definitions. The change to the actuator_arm_r_joint2 control range is a good correction that aligns it with the corresponding joint's range. The modification of the joint axes for arm_l_joint1 and arm_r_joint1 appears to be for establishing a symmetric convention, which is reasonable.
However, my review found that the file contains numerous other inconsistencies between joint ranges and actuator control ranges for both arms. One particularly critical issue is with arm_l_joint3, where the actuator's control range is double the joint's physical range. I've left a detailed comment on this and recommend a thorough audit of all arm joint definitions and their corresponding actuators to prevent potential control issues and simulation errors. Fixing these additional issues would greatly improve the model's reliability.
| --> | ||
| <position name="actuator_arm_r_joint1" joint="arm_r_joint1" class="robot" ctrlrange="-3.14 3.14"/> | ||
| <position name="actuator_arm_r_joint2" joint="arm_r_joint2" class="robot" ctrlrange="0 3.14"/> | ||
| <position name="actuator_arm_r_joint2" joint="arm_r_joint2" class="robot" ctrlrange="-3.14 0"/> |
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 change correctly aligns the actuator's ctrlrange with the range of arm_r_joint2 (defined as -3.14 0 on line 164), which is great for consistency.
While this is a good fix, I've noticed that this file has several other mismatches between joint ranges, actuator control ranges, and their corresponding comments. These inconsistencies can lead to unexpected behavior or simulation errors.
Here are some examples:
arm_l_joint3: The actuatorctrlrangeis"-6.28 6.28"(line 292), but the jointrangeis"-3.14 3.14"(line 100). The actuator can command positions far outside the joint's physical limits. This is a critical issue.- The comment for
arm_r_joint2on line 261 still saysrange=0 3.14, which is now incorrect. - Many other joints have mismatches (e.g.,
arm_r_joint3,arm_r_joint4,arm_r_joint5,arm_r_joint7and their left arm counterparts).
I strongly recommend a full audit of all arm joint definitions, actuator ranges, and comments in this file to ensure they are all consistent. This will significantly improve the model's reliability.
Summary
actuator_arm_r_joint2control range from0 3.14to-3.14 0arm_r_joint2joint definition.axisforarm_l_joint1andarm_r_joint1Why
Impact
arm_r_joint2.