class documentation

class LedRingCommander(object):

View In Hierarchy

This class is in charge of the Led Ring Node Its main goal is to interpret commands, and use methods from the LedRingCommander class according to this command

Method __init__ Undocumented
Method alternate_animation Undocumented
Method blink Undocumented
Method blink_over_status Undocumented
Method breath_animation Undocumented
Method chase_animation Undocumented
Method custom_animation Undocumented
Method display_user_mode Undocumented
Method error_animation Undocumented
Method flashing_animation Undocumented
Method get_robot_status_led_ring_cmd Undocumented
Method go_up_and_down_animation Undocumented
Method go_up_animation Undocumented
Method none_animation Undocumented
Method notify_current_anim_and_color called by the led_ring_anim when the current animation played or the color on the Led Ring is updated, used to publish Led STATUS
Method rainbow_animation Undocumented
Method rainbow_chase_animation Undocumented
Method rainbow_cycle_animation Undocumented
Method set_user_mode Undocumented
Method shutdown Undocumented
Method shutdown_check Undocumented
Method snake_animation Undocumented
Method solid_animation Undocumented
Method start_led_ring_thread Start a thread to allow the user to control the led. We use a thread to avoid the blocking effect of the Led ring control methods.
Method start_user_thread Undocumented
Method stop_led_ring_thread Undocumented
Method user_animation Undocumented
Method wait_until_finished Wait until all iterations of the Led Ring method are done. After that, the led ring is turned off. If function was interrupted, return True.
Method wipe_animation Undocumented
Instance Variable dict_led_ring_methods Undocumented
Instance Variable error_animation_lock Undocumented
Instance Variable led_ring_anim Undocumented
Instance Variable led_ring_animation_thread Undocumented
Instance Variable led_ring_state Undocumented
Instance Variable logs_status Undocumented
Instance Variable robot_out_of_bounds Undocumented
Instance Variable robot_status Undocumented
Instance Variable robot_status_str Undocumented
Instance Variable robot_status_subscriber Undocumented
Instance Variable rpi_overheating Undocumented
Instance Variable running_status_command Undocumented
Instance Variable user_animation_lock Undocumented
Instance Variable user_mode Undocumented
Property is_shutdown Undocumented
Static Method _return_after_waiting Return a CommandStatus and a message, after the requested animation was completed
Method __callback_niryo_studio Undocumented
Method __callback_robot_status Callback method to set led ring state according to current robot status. This callback takes precedence over the user's led ring control method, if the robot status is not RUNNING_AUTONOMOUS and logs status is not NONE...
Method __callback_save_current_point Undocumented
Method __callback_set_led_color Undocumented
Method __callback_set_led_ring_user Service to allow the user to control the Led Ring. A new request will interrupt the previous one, if still playing.
Method __callback_wifi_button_state Undocumented
Method _publish_led_ring_status Publish the current status of the Led ring, as a LedRingStatus message : led_mode: either controlled by user or displaying robot status animation_mode: which method is used to animate pixels (solid, flashing,...
Instance Variable __check_shutdown_timer Undocumented
Instance Variable __is_shutdown Undocumented
Instance Variable __is_simulation Undocumented
Instance Variable __led_ring_status_pub Undocumented
Instance Variable __set_led_color_service Undocumented
Instance Variable __set_ring_led_user Undocumented
def __init__(self):

Undocumented

def alternate_animation(self, cmd):

Undocumented

def blink(self, color, iterations, period):

Undocumented

def blink_over_status(self, color, iterations, period):

Undocumented

def breath_animation(self, cmd):

Undocumented

def chase_animation(self, cmd):

Undocumented

def custom_animation(self, cmd):

Undocumented

def display_user_mode(self):

Undocumented

def error_animation(self):

Undocumented

def flashing_animation(self, cmd):

Undocumented

def get_robot_status_led_ring_cmd(self):

Undocumented

def go_up_and_down_animation(self, cmd):

Undocumented

def go_up_animation(self, cmd):

Undocumented

def none_animation(self, _cmd):

Undocumented

def notify_current_anim_and_color(self, _observer):

called by the led_ring_anim when the current animation played or the color on the Led Ring is updated, used to publish Led STATUS

def rainbow_animation(self, cmd):

Undocumented

def rainbow_chase_animation(self, cmd):

Undocumented

def rainbow_cycle_animation(self, cmd):

Undocumented

def set_user_mode(self, boolean):

Undocumented

def shutdown(self, color=None):

Undocumented

def shutdown_check(self, *_):

Undocumented

def snake_animation(self, cmd):

Undocumented

def solid_animation(self, cmd):

Undocumented

def start_led_ring_thread(self, command):

Start a thread to allow the user to control the led. We use a thread to avoid the blocking effect of the Led ring control methods.

def start_user_thread(self, command):

Undocumented

def stop_led_ring_thread(self):

Undocumented

def user_animation(self, cmd):

Undocumented

def wait_until_finished(self):

Wait until all iterations of the Led Ring method are done. After that, the led ring is turned off. If function was interrupted, return True.

def wipe_animation(self, cmd):

Undocumented

dict_led_ring_methods =

Undocumented

error_animation_lock =

Undocumented

led_ring_anim =

Undocumented

led_ring_animation_thread =

Undocumented

led_ring_state =

Undocumented

logs_status =

Undocumented

robot_out_of_bounds =

Undocumented

robot_status =

Undocumented

robot_status_str =

Undocumented

robot_status_subscriber =

Undocumented

rpi_overheating =

Undocumented

running_status_command =

Undocumented

user_animation_lock =

Undocumented

user_mode =

Undocumented

@property
is_shutdown =

Undocumented

@staticmethod
def _return_after_waiting(anim_name, iterations, interrupted):

Return a CommandStatus and a message, after the requested animation was completed

def __callback_niryo_studio(self, msg):

Undocumented

def __callback_robot_status(self, msg):

Callback method to set led ring state according to current robot status. This callback takes precedence over the user's led ring control method, if the robot status is not RUNNING_AUTONOMOUS and logs status is not NONE. It is triggered only when the robot status changed.

def __callback_save_current_point(self, _msg):

Undocumented

def __callback_set_led_color(self, req):

Undocumented

def __callback_set_led_ring_user(self, req):

Service to allow the user to control the Led Ring. A new request will interrupt the previous one, if still playing.

def __callback_wifi_button_state(self, msg):

Undocumented

def _publish_led_ring_status(self):

Publish the current status of the Led ring, as a LedRingStatus message : led_mode: either controlled by user or displaying robot status animation_mode: which method is used to animate pixels (solid, flashing,...), as a LedRingAnimation message animation_color: current animation color, except for rainbow methods

Function called only when one parameter changed.

__check_shutdown_timer =

Undocumented

__is_shutdown: bool =

Undocumented

__is_simulation =

Undocumented

__led_ring_status_pub =

Undocumented

__set_led_color_service =

Undocumented

__set_ring_led_user =

Undocumented