(self, event=None)
Calls "roslaunch pr2_mannequin_mode pr2_mannequin_mode.launch"
        (only works for the PR2 robot).
Calls "roslaunch pr2_mannequin_mode pr2_mannequin_mode.launch"
        (only works for the PR2 robot).
Calls roslaunch pr2_mannequin_mode pr2_mannequin_mode . launch ( only works for the PR2 robot ) .
def mannequin_mode(self, event=None):
        """
        Calls "roslaunch pr2_mannequin_mode pr2_mannequin_mode.launch"
        (only works for the PR2 robot).
        """
        if not self._mannequin_mode:
            self.set_action_status_message('mannequin_mode', 'requested')
            subprocess.Popen(['rosrun', 'pr2_controller_manager', 
                    'pr2_controller_manager', 'stop', 'GPSPR2Plugin'], stdout=DEVNULL)
            self._mm_process = subprocess.Popen(['roslaunch',
                    'pr2_mannequin_mode', 'pr2_mannequin_mode.launch'], stdout=DEVNULL)
            self._mannequin_mode = True
            self.set_action_status_message('mannequin_mode', 'completed',
                    message='mannequin mode toggled on')
        else:
            self.set_action_status_message('mannequin_mode', 'requested')
            self._mm_process.send_signal(signal.SIGINT)
            subprocess.Popen(['rosrun', 'pr2_controller_manager',
                    'pr2_controller_manager', 'start', 'GPSPR2Plugin'], stdout=DEVNULL)
            self._mannequin_mode = False
            self.set_action_status_message('mannequin_mode', 'completed',
                    message='mannequin mode toggled off')
def mannequin_mode ( self , event = None ) : if not self . _mannequin_mode : self . set_action_status_message ( 'mannequin_mode' , 'requested' ) subprocess . Popen ( [ 'rosrun' , 'pr2_controller_manager' , 'pr2_controller_manager' , 'stop' , 'GPSPR2Plugin' ] , stdout = DEVNULL ) self . _mm_process = subprocess . Popen ( [ 'roslaunch' , 'pr2_mannequin_mode' , 'pr2_mannequin_mode.launch' ] , stdout = DEVNULL ) self . _mannequin_mode = True self . set_action_status_message ( 'mannequin_mode' , 'completed' , message = 'mannequin mode toggled on' ) else : self . set_action_status_message ( 'mannequin_mode' , 'requested' ) self . _mm_process . send_signal ( signal . SIGINT ) subprocess . Popen ( [ 'rosrun' , 'pr2_controller_manager' , 'pr2_controller_manager' , 'start' , 'GPSPR2Plugin' ] , stdout = DEVNULL ) self . _mannequin_mode = False self . set_action_status_message ( 'mannequin_mode' , 'completed' , message = 'mannequin mode toggled off' )