-
Notifications
You must be signed in to change notification settings - Fork 199
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
Create a demo that uses transmissions #226
Create a demo that uses transmissions #226
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.
Great to see this example, I've got only some minor comments..
...n/rrbot_description/ros2_control/rrbot_transmissions_system_position_only.ros2_control.xacro
Outdated
Show resolved
Hide resolved
...emo_hardware/include/ros2_control_demo_hardware/rrbot_transmissions_system_position_only.hpp
Outdated
Show resolved
Hide resolved
Exact copy of rrbot_system_position_only for now. Using it from the transmission demo
Added a helper object to manage the joint to transmissions to actuator data handling
Checking joint consistency in the description not required. Already done by the parser
65abb2f
to
af5d961
Compare
<?xml version="1.0"?> | ||
<robot xmlns:xacro="http://www.ros.org/wiki/xacro"> | ||
|
||
<xacro:macro name="rrbot_transmissions_system_position_only" params="name prefix use_gazebo:=^|false use_fake_hardware:=^|true mock_sensor_commands:=^|false slowdown:=2.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.
we can further simplify this by deleting use_gazebo
, use_fake_hardware
, mock_sensor_comands
here
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.
Unfortunately this breaks the launch, since we use rrbot_base.launch.py
as base. Maybe something that could be addressed in #231.
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.
does it? removing them here and lines 34+35 in rrbot_transmissions_system_position_only.urdf.xacro works for me.
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.
in the interest of merging this prior to the restructure, I'll open a general cleanup issue for xacro parameters
..._demo_description/rrbot_description/urdf/rrbot_transmissions_system_position_only.urdf.xacro
Outdated
Show resolved
Hide resolved
..._demo_description/rrbot_description/urdf/rrbot_transmissions_system_position_only.urdf.xacro
Outdated
Show resolved
Hide resolved
..._demo_description/rrbot_description/urdf/rrbot_transmissions_system_position_only.urdf.xacro
Outdated
Show resolved
Hide resolved
..._demo_description/rrbot_description/urdf/rrbot_transmissions_system_position_only.urdf.xacro
Outdated
Show resolved
Hide resolved
..._demo_description/rrbot_description/urdf/rrbot_transmissions_system_position_only.urdf.xacro
Outdated
Show resolved
Hide resolved
@bmagyar As far as I can tell, the failing checks in the CI are not related to the contents of this PR. |
@christophfroehlich happy for me to merge this prior to the restructure PRs? May cause a little trouble there |
I'd suggest to merge this now in master, and then merge this into the restructuring branch to restructure that example. |
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.
Thanks a lot for this, only left some small comments
<?xml version="1.0"?> | ||
<robot xmlns:xacro="http://www.ros.org/wiki/xacro"> | ||
|
||
<xacro:macro name="rrbot_transmissions_system_position_only" params="name prefix use_gazebo:=^|false use_fake_hardware:=^|true mock_sensor_commands:=^|false slowdown:=2.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.
in the interest of merging this prior to the restructure, I'll open a general cleanup issue for xacro parameters
...emo_hardware/include/ros2_control_demo_hardware/rrbot_transmissions_system_position_only.hpp
Outdated
Show resolved
Hide resolved
std::string name_; | ||
double command_; | ||
double state_; | ||
double transmission_; |
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 name is quite confusing. Could you rename this variable please to clarify it's meaning/content?
What does it mean in the joint and in the actuator context?
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 the sink of the Joint/Actuator handle that lives inside the transmission. transmission_passthrough_
maybe?
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.
If you rename plus add this comment about the sink we are done ;)
ros2_control_demo_hardware/src/rrbot_transmissions_system_position_only.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Bence Magyar <[email protected]>
Co-authored-by: Bence Magyar <[email protected]>
@Mergifyio backport to new-structure-of-master |
* add copy for transmission demo and set in the urdf * Renamed to rrbot_transmissions * Changed reduction value of transmission2 * Added the rrbot_transmissions_system_position_only Exact copy of rrbot_system_position_only for now. Using it from the transmission demo * Moved logger into its own variable * Uncrustify * Renamed hw interface to joint. Added actuator interfaces * Formatting. Remove comments * Using transmissions for joint and actuator interfaces Added a helper object to manage the joint to transmissions to actuator data handling * Propagating data between all the interfaces * Cleanup. Added some consts * Simulate motor motion * Added logging to periodically show interface data * Refactored the parameters a bit. Removed unused ones * Added try/catches where needed Checking joint consistency in the description not required. Already done by the parser * Added transmission demo to README * Use clang-format instead * rename transmissions ros2_control macro * Remove unnecessary actuator parameters * Typo * Removed gazebo, mock hardware and fake sensors from the transmission demo * Missing 'explicit' from constructor * Further cleanup of gazebo, mock hardware and fake sensors from the transmission demo * branding fix * Remove pointer definitions Co-authored-by: Bence Magyar <[email protected]> * Fixed comment about reserve Co-authored-by: Bence Magyar <[email protected]> * Renamed member variable and added description --------- Co-authored-by: Noel Jimenez <[email protected]> Co-authored-by: Bence Magyar <[email protected]> (cherry picked from commit 1007b1d)
✅ Backports have been created
|
* Create a demo that uses transmissions (#226) * add copy for transmission demo and set in the urdf * Renamed to rrbot_transmissions * Changed reduction value of transmission2 * Added the rrbot_transmissions_system_position_only Exact copy of rrbot_system_position_only for now. Using it from the transmission demo * Moved logger into its own variable * Uncrustify * Renamed hw interface to joint. Added actuator interfaces * Formatting. Remove comments * Using transmissions for joint and actuator interfaces Added a helper object to manage the joint to transmissions to actuator data handling * Propagating data between all the interfaces * Cleanup. Added some consts * Simulate motor motion * Added logging to periodically show interface data * Refactored the parameters a bit. Removed unused ones * Added try/catches where needed Checking joint consistency in the description not required. Already done by the parser * Added transmission demo to README * Use clang-format instead * rename transmissions ros2_control macro * Remove unnecessary actuator parameters * Typo * Removed gazebo, mock hardware and fake sensors from the transmission demo * Missing 'explicit' from constructor * Further cleanup of gazebo, mock hardware and fake sensors from the transmission demo * branding fix * Remove pointer definitions Co-authored-by: Bence Magyar <[email protected]> * Fixed comment about reserve Co-authored-by: Bence Magyar <[email protected]> * Renamed member variable and added description --------- Co-authored-by: Noel Jimenez <[email protected]> Co-authored-by: Bence Magyar <[email protected]> (cherry picked from commit 1007b1d) * Fix preformatted block * fix header guard --------- Co-authored-by: Jordan Palacios <[email protected]> Co-authored-by: Bence Magyar <[email protected]>
* Create a demo that uses transmissions (#226) * add copy for transmission demo and set in the urdf * Renamed to rrbot_transmissions * Changed reduction value of transmission2 * Added the rrbot_transmissions_system_position_only Exact copy of rrbot_system_position_only for now. Using it from the transmission demo * Moved logger into its own variable * Uncrustify * Renamed hw interface to joint. Added actuator interfaces * Formatting. Remove comments * Using transmissions for joint and actuator interfaces Added a helper object to manage the joint to transmissions to actuator data handling * Propagating data between all the interfaces * Cleanup. Added some consts * Simulate motor motion * Added logging to periodically show interface data * Refactored the parameters a bit. Removed unused ones * Added try/catches where needed Checking joint consistency in the description not required. Already done by the parser * Added transmission demo to README * Use clang-format instead * rename transmissions ros2_control macro * Remove unnecessary actuator parameters * Typo * Removed gazebo, mock hardware and fake sensors from the transmission demo * Missing 'explicit' from constructor * Further cleanup of gazebo, mock hardware and fake sensors from the transmission demo * branding fix * Remove pointer definitions Co-authored-by: Bence Magyar <[email protected]> * Fixed comment about reserve Co-authored-by: Bence Magyar <[email protected]> * Renamed member variable and added description --------- Co-authored-by: Noel Jimenez <[email protected]> Co-authored-by: Bence Magyar <[email protected]> (cherry picked from commit 1007b1d) * Fix preformatted block * fix header guard --------- Co-authored-by: Jordan Palacios <[email protected]> Co-authored-by: Bence Magyar <[email protected]>
Based on the base
rrbot_system_position_only
demo but with transmissions. The goal is to have a system with two simple transmissions that connect thejoint1
with theactuator1
and thejoint2
with theactuator2
.joint1
has a reduction with value 2 andjoint2
a reduction with value 4.The behavior can be easily tracked in the log while the demo is running. Here is a sample:
TODOs: