-
Notifications
You must be signed in to change notification settings - Fork 17
adding support to publish present temnperature, load, input current, and voltage #106
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: humble
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @bueche, 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 significantly enhances the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe 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 by creating a comment using either
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 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
|
|
see https://github.com/bueche/ros2_robot_arm for additional details on the test environment. |
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 successfully adds support for publishing additional telemetry data (temperature, voltage, current, and load) from the Dynamixel servos, addressing issue #104. The implementation correctly handles different servo models that may provide different sets of data. The changes are clear and follow the logic described. I have one suggestion to improve the maintainability of the code by refactoring the if-else if chain used for processing telemetry data.
|
I ran a test on my system using this PR. At first I was confused, since the majority of the added diagnostics were empty during runtime i.e. 0. However Present Current worked. I figured out the issue in my case, and I thought I'd mention it here. I was missing the xacro tags required by this feautre. I'd add into the in the example adding the tags for each diag type into the xacro/urdf. i.e. good stuff! |
ah. I should have pointed out the relevant URDF that I was using. It is located here. Excerpt: I wonder there is some additional documentation that I need to update? At a minimum, will add an additional comment to the msg file. You should get non-zero readings without much movement for temperature and input voltage. The current and load get more interesting when the robot is moving through various poses. |
…oltage Signed-off-by: bueche <ed.bueche64@gmail.com>
Signed-off-by: bueche <ed.bueche64@gmail.com>
|
also, this PR covers ros2-humble. Once the approach has been finalized on this version I can work to support the other versions of ros2 supported for the dynamixel servos. |
This PR is meant to address Issue #104 by enabling the ros2 /dynamixel_hardware_interface/dxl_state state to return servo values of "Present Temperature", "Present Input Voltage", "Present Current", and/or "Present Load". Some servo's return "Present Current" (XL330's) while others "Present Load" (e.g., XL430's). Whether or not they return these depends on the model files.
This PR is for the humble version (a jazzy version will be submitted separately). This has been tested in an environment in which both XL330's and XL430's are present to confirm that the Present current is always zero for XL430's and Present Load is always zero for XL330s. This is shown below with the slightly annotated output. In this example id's 1 & 2 are XL430's and id's 3 - 6 are XL330's.
The return values are not adjusted in any way, the consumer will need to do so (e.g., convert the Present Load from its raw value by dividing by 10 .. to change 146 to 14.6% and to divide by 10 do adjust the voltage values 121 becomes 12.1 v.
Example use: