forked from LexxPluss/teleop_twist_joy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add parameter to enable/disable requiring the enable button to be hel…
…d for motion (ros-teleop#21) * Add require_enable_button parameter Signed-off-by: Chris Lalancette <[email protected]> Co-authored-by: Chris Lalancette <[email protected]>
- Loading branch information
1 parent
affdc77
commit 9d86a01
Showing
5 changed files
with
67 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import launch | ||
import launch_ros.actions | ||
import launch_testing | ||
|
||
import pytest | ||
|
||
import test_joy_twist | ||
|
||
|
||
@pytest.mark.rostest | ||
def generate_test_description(): | ||
teleop_node = launch_ros.actions.Node( | ||
package='teleop_twist_joy', | ||
executable='teleop_node', | ||
parameters=[{ | ||
'axis_linear.x': 1, | ||
'axis_angular.yaw': 0, | ||
'scale_linear.x': 2.0, | ||
'scale_angular.yaw': 3.0, | ||
'enable_button': 0, | ||
'require_enable_button': False, | ||
}], | ||
) | ||
|
||
return launch.LaunchDescription([ | ||
teleop_node, | ||
launch_testing.actions.ReadyToTest(), | ||
]), locals() | ||
|
||
|
||
class NoRequireEnableJoy(test_joy_twist.TestJoyTwist): | ||
|
||
def setUp(self): | ||
super().setUp() | ||
self.joy_msg['axes'] = [0.3, 0.4] | ||
self.joy_msg['buttons'] = [0] | ||
self.expect_cmd_vel['linear']['x'] = 0.8 | ||
self.expect_cmd_vel['angular']['z'] = 0.9 |