Ejemplo n.º 1
0
 def stop_recording(cls):
     """SocketIO Api: stop_recording()"""
     cls.__exec_bash_tool('stop_recording')
     RuntimeStatus.get_tools().recording_status = (
         ToolStatus.RECORDING_FINISHED)
     RuntimeStatus.stat_playable_duration()
     RuntimeStatus.broadcast_status_if_changed()
Ejemplo n.º 2
0
 def start_recording(cls):
     """SocketIO Api: start_recording()"""
     cls.__exec_bash_tool('start_recording')
     tool_status = RuntimeStatus.get_tools()
     tool_status.recording_status = ToolStatus.RECORDING
     tool_status.playing_status = ToolStatus.PLAYING_NOT_READY
     RuntimeStatus.broadcast_status_if_changed()
Ejemplo n.º 3
0
 def stop_playing(cls):
     """SocketIO Api: stop_playing()"""
     RosBridgeApi.change_driving_mode('manual')
     cls.__exec_bash_tool('stop_player')
     tool_status = RuntimeStatus.get_tools()
     tool_status.playing_status = ToolStatus.PLAYING_READY_TO_CHECK
     tool_status.planning_ready = False
     RuntimeStatus.broadcast_status_if_changed()
Ejemplo n.º 4
0
 def setup_playing(cls):
     """SocketIO Api: setup_playing()"""
     if not RuntimeStatus.are_record_replay_modules_ready():
         ModuleApi.start('record_replay_required_modules')
     if not RuntimeStatus.are_all_hardware_ready():
         HardwareApi.health_check('all')
     cls.__exec_bash_tool('start_player')
     RuntimeStatus.get_tools().playing_status = ToolStatus.PLAYING_CHECKING
     RuntimeStatus.broadcast_status_if_changed()
Ejemplo n.º 5
0
 def setup_recording(cls):
     """SocketIO Api: setup_recording()"""
     if not RuntimeStatus.are_record_replay_modules_ready():
         ModuleApi.start('record_replay_required_modules')
     if not RuntimeStatus.are_all_hardware_ready():
         HardwareApi.health_check('all')
     RuntimeStatus.get_tools().recording_status = (
         ToolStatus.RECORDING_CHECKING)
     RuntimeStatus.broadcast_status_if_changed()
Ejemplo n.º 6
0
 def reset_recording(cls):
     """SocketIO Api: reset_recording()"""
     file_to_play = gflags.FLAGS.file_to_play
     if os.path.exists(file_to_play):
         os.rename(file_to_play, file_to_play + '.bak')
     # Also stop player in case user has set it up.
     cls.__exec_bash_tool('stop_player')
     tool_status = RuntimeStatus.get_tools()
     tool_status.recording_status = ToolStatus.RECORDING_READY_TO_CHECK
     tool_status.playing_status = ToolStatus.PLAYING_NOT_READY
     tool_status.planning_ready = False
     RuntimeStatus.broadcast_status_if_changed()
Ejemplo n.º 7
0
 def start_playing(cls):
     """SocketIO Api: start_playing()"""
     RosBridgeApi.change_driving_mode('auto')
     RuntimeStatus.get_tools().playing_status = ToolStatus.PLAYING
     RuntimeStatus.broadcast_status_if_changed()