-
Notifications
You must be signed in to change notification settings - Fork 12
Bump 1.4.0 #21
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
Bump 1.4.0 #21
Conversation
- Added new models: xh540_w150 and xc330_t288. - Introduced torque constant parameter in relevant functions.
…al Current' interface. Ensured proper checks for interface names before accumulating values for transmission commands.
- Introduced 'torque_constant' to xc330_t181.model, xc330_t288.model, and xh540_w150.model.
Support Current Control
Signed-off-by: Pyo <[email protected]>
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.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (10)
- CHANGELOG.rst: Language not supported
- include/dynamixel_hardware_interface/dynamixel/dynamixel_info.hpp: Language not supported
- include/dynamixel_hardware_interface/dynamixel_hardware_interface.hpp: Language not supported
- package.xml: Language not supported
- param/dxl_model/xc330_t181.model: Language not supported
- param/dxl_model/xc330_t288.model: Language not supported
- param/dxl_model/xh540_w150.model: Language not supported
- src/dynamixel/dynamixel.cpp: Language not supported
- src/dynamixel/dynamixel_info.cpp: Language not supported
- src/dynamixel_hardware_interface.cpp: Language not supported
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.
Hello @robotpilot, 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!
Summary of Changes
This pull request bumps the version of the dynamixel_hardware_interface package to 1.4.0. It introduces a torque constant parameter to the DXL model files, enhances transmission command calculation, unifies the initialization structure, and adds support for goal current control. The changes include modifications to the changelog, dynamixel info header, hardware interface header, package XML, DXL model files, and source files.
Highlights
- Version Bump: The package version is bumped from 1.3.0 to 1.4.0.
- Torque Constant Parameter: A torque constant parameter is added to the DXL model files (xc330_t181.model, xc330_t288.model, xh540_w150.model) to improve accuracy in effort/torque calculations.
- Goal Current Control: Support for goal current control is added, allowing the user to set the desired current for the Dynamixel motors.
- Transmission Command Calculation: The transmission command calculation is enhanced to support goal current control, using the joint-to-transmission matrix to calculate the appropriate transmission commands based on joint efforts.
- Unified Initialization Structure: The initialization structure is unified to streamline the setup process.
Changelog
Click here to see the changelog
- CHANGELOG.rst
- Added version 1.4.0 changelog entry.
- Added Torque Constant Parameter to DXL Model Files
- Enhanced Transmission Command Calculation
- Unified Initialization Structure
- Support for Goal Current Control
- include/dynamixel_hardware_interface/dynamixel/dynamixel_info.hpp
- Added
torque_constantparameter to theGetDxlTypeInfomethod.
- Added
- include/dynamixel_hardware_interface/dynamixel_hardware_interface.hpp
- Added definitions for
GOAL_POSITION_INDEXandGOAL_CURRENT_INDEX.
- Added definitions for
- package.xml
- Updated package version to 1.4.0.
- param/dxl_model/xc330_t181.model
- Added
torque_constantparameter with a value of 0.0006709470296015791.
- Added
- param/dxl_model/xc330_t288.model
- Added
torque_constantparameter with a value of 0.0009674796739867748.
- Added
- param/dxl_model/xh540_w150.model
- Added
torque_constantparameter with a value of 0.0045.
- Added
- src/dynamixel/dynamixel.cpp
- Modified
GetDxlValueFromSyncReadandGetDxlValueFromBulkReadto convert current to effort usingdxl_info_.ConvertCurrentToEffort.
- Modified
- src/dynamixel/dynamixel_info.cpp
- Modified
GetDxlTypeInfoto retrieve and set thetorque_constantvalue.
- Modified
- src/dynamixel_hardware_interface.cpp
- Modified
InitDxlWriteItemsto include "Goal Position" and "Goal Current" command interfaces. - Modified
CalcJointToTransmissionto calculate transmission commands for both goal position and goal current.
- Modified
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 is currently in preview and 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 to provide feedback.
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.
Trivia time!
What company originally developed the Dynamixel actuators?
Click here for the answer
The Dynamixel actuators were originally developed by Robotis Co., Ltd.
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
The pull request bumps the version to 1.4.0 and introduces several new features and improvements, including torque constant parameter, enhanced transmission command calculation, unified initialization structure, and goal current control. The changes seem well-structured and address relevant aspects of the dynamixel hardware interface. However, there are a few areas that could benefit from further attention.
Summary of Findings
- Missing Goal Velocity Implementation: The
GOAL_VELOCITY_INDEXis defined but commented out with a TODO. This indicates an incomplete feature that should be addressed before merging, or the TODO should be removed if the feature is not planned for this release. - Inconsistent Interface Handling: The
InitDxlWriteItemsfunction adds "Goal Position" and potentially "Goal Current" interfaces, but the logic for handling these interfaces inCalcJointToTransmissionis somewhat complex and could be simplified for better readability and maintainability. - Potential Redundancy in Interface Checks: The nested
ifstatements inCalcJointToTransmissionfor handling "Goal Current" might be redundant and could be refactored for clarity and efficiency.
Merge Readiness
The pull request introduces valuable new features and improvements. However, the incomplete GOAL_VELOCITY_INDEX implementation and the complexity in CalcJointToTransmission warrant further attention. I recommend addressing these issues before merging. I am unable to approve this pull request, and users should have others review and approve this code before merging.
| #define PRESENT_EFFORT_INDEX 2 | ||
|
|
||
| #define GOAL_POSITION_INDEX 0 | ||
| // #define GOAL_VELOCITY_INDEX 1 // TODO: to be implemented |
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.
| HandlerVarType temp_write; | ||
| temp_write.id = id; | ||
| temp_write.name = gpio.name; | ||
|
|
||
| temp_write.interface_name_vec.push_back("Goal Position"); | ||
| temp_write.value_ptr_vec.push_back(std::make_shared<double>(0.0)); | ||
|
|
||
| temp_write.interface_name_vec.push_back(it.name); | ||
| temp_write.value_ptr_vec.push_back(std::make_shared<double>(0.0)); | ||
| hdl_trans_commands_.push_back(temp_write); | ||
| for (auto it : gpio.command_interfaces) { | ||
| if (it.name == "Goal Current") { | ||
| temp_write.interface_name_vec.push_back("Goal Current"); | ||
| temp_write.value_ptr_vec.push_back(std::make_shared<double>(0.0)); | ||
| } | ||
| } | ||
|
|
||
| hdl_trans_commands_.push_back(temp_write); |
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.
| for (size_t j = 0; j < hdl_joint_commands_.size(); j++) { | ||
| if (hdl_joint_commands_.at(j).interface_name_vec.size() > GOAL_CURRENT_INDEX && | ||
| hdl_joint_commands_.at(j).interface_name_vec.at(GOAL_CURRENT_INDEX) == | ||
| hardware_interface::HW_IF_EFFORT) |
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.
No description provided.