-
Notifications
You must be signed in to change notification settings - Fork 37
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
fixed mock hardware for botwheel explorer #28
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.
Ah cool, yeah this approach is preferred. The files are in part derived from the diffbot example (e.g. this file) so this stub support was an artifact I wasn't aware of.
What command did you use to test this? When I tried it I saw that botwheel_explorer.launch.py
needs some commented-out lines to be enabled to work with use_mock_hardware:=true
. Please add these to the PR too.
@@ -18,12 +18,25 @@ | |||
</xacro:if> | |||
<joint name="${prefix}left_wheel_joint"> | |||
<param name="node_id">0</param> | |||
<command_interface name="velocity"/> | |||
<command_interface name="position"/> | |||
<command_interface name="torque"/> |
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.
torque
needs to be renamed to effort
(4x). Otherwise, when I try it with the real hardware interface, it crashes with:
[ros2_control_node-1] terminate called after throwing an instance of 'std::runtime_error'
[ros2_control_node-1] what(): Wrong state or command interface configuration.
[ros2_control_node-1] missing state interfaces:
[ros2_control_node-1] ' left_wheel_joint/torque ' ' right_wheel_joint/torque '
[ros2_control_node-1] missing command interfaces:
[ros2_control_node-1] ' left_wheel_joint/torque ' ' right_wheel_joint/torque '
Co-authored-by: Libor Wagner (wagnelib) <[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.
Ok the launch command ros2 launch odrive_botwheel_explorer botwheel_explorer.launch.py use_mock_hardware:=true
works now, however the original command from the docs (ros2 launch odrive_botwheel_explorer botwheel_explorer.launch.py
) is still broken due to a typo.
Furthermore, please rebase the PR to the latest main
branch so that the history/diff only shows commits/changes related to this PR. Currently it includes a bunch of changes from an unrelated PR.
<command_interface name="effort"/> | ||
<state_interface name="position"/> | ||
<state_interface name="velocity"/> | ||
<state_interface name="effor"/> |
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.
typo here which prevents the launchfile from working
|
Goes along with this issue: #24
Pretty much everything was already setup in the official repo. The only thing missing was the command and state interfaces for the
mock_components/GenericSystem
plugin to recognize. I've assumed adding these will not break anything for the non-mock-hardware usage. If it will, it can be changed to be in an if statement.Cheers