Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Feature/pm 391 sm to unknown button #34

Merged
merged 2 commits into from
Apr 10, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,8 @@ def publish_error(self):
rospy.logdebug('Mock Input Device published error')
self.error_pub.publish(Error(std_msgs.msg.Header(stamp=rospy.Time.now()),
'Fake error thrown by the develop input device.', Error.FATAL))

def publish_sm_to_unknown(self):
rospy.logdebug('Mock Input Device published state machine to unknown')
self.instruction_gait_pub.publish(GaitInstruction(std_msgs.msg.Header(stamp=rospy.Time.now()),
GaitInstruction.UNKNOWN, ''))
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,14 @@ def __init__(self, context):
error_button = self.create_button('error', image_path='/error.png',
callback=lambda: self.controller.publish_error())

sm_to_unknown_button = self.create_button('force unknown',
callback=lambda: self.controller.publish_sm_to_unknown())

# The button layout.
# Position in the array determines position on screen.
march_button_layout = [

[home_sit, home_stand, gait_walk, gait_walk_small, gait_walk_large],
[home_sit, home_stand, gait_walk, gait_walk_small, gait_walk_large, sm_to_unknown_button],

[gait_sit, gait_stand, rocker_switch_increment, rocker_switch_decrement, stop_button, error_button],

Expand Down