Skip to content
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

How to apply transmission gear ratio (mechanical_reduction) in hardware_interface #216

Closed
firesurfer opened this issue Dec 21, 2022 · 5 comments · Fixed by #226
Closed

Comments

@firesurfer
Copy link

I have a transmission which looks like this:

<transmission name="${prefix}transmission/${name}">
          <plugin>transmission_interface/SimpleTransmission</plugin>
          <joint name="${name}" role="${prefix}${name}_actuator">
            <mechanical_reduction>${1.0 / config.travel_per_revolution}</mechanical_reduction>
          </joint>
        </transmission>

When writing a hardware interface i can access the via the hardware_interface::HardwareInfo &system_info passed in the on_init method.

Unfortunately I couldnt find any examples for best practices on how to actually use the transmission. My idea was to simply store a list in the hardware interface with the mechanical reduction for each joint handled by the hw interface and apply this value when calling write/read.

Is this the intended usage or am I doing this completely wrong?

@firesurfer
Copy link
Author

Still looking for an answer :)

@olivier-stasse
Copy link
Collaborator

Dear @firesurfer, you should probably ask this question in the ros2_control repository where hardware_interface are defined. or in the gz_ros2_control repository.

At the hardware_interface level, I have seen often the transmission used to hide a mechanical differential mechanism and provides an interface to an equivalent serial controlled hardware. This simplify the user experience. At the simulator side, the transmissison information is often used to avoid having a complete mechanical model and simplify the relation ship between the control value and the joint value (typically to emulate a reduction gear). In the latter case, you should check with the simulator plugin (gz_ros2_control or gazebo_ros2_control) if this is correct.

@firesurfer
Copy link
Author

@olivier-stasse Thanks a lot for your answer I posted the question also in the main ros2_control repo (ros-controls/ros2_control#897)

@jordan-palacios
Copy link
Member

Hey @firesurfer, if you are still interested, you can check the demo I've been working on in #226. Any feedback is appreciated.

@firesurfer
Copy link
Author

@jordan-palacios Thanks a lot this is exactly what I was looking for !

@destogl destogl linked a pull request Feb 2, 2023 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants