Esempio n. 1
0
        protected virtual void _gazebo_client_listener(ServiceStub context, ClientServiceListenerEventType ev, object parameter)
        {
            if (ev == ClientServiceListenerEventType.ClientClosed || ev == ClientServiceListenerEventType.ServicePathReleased)
            {
                lock (this)
                {
                    if (ev == ClientServiceListenerEventType.ServicePathReleased)
                    {
                        if (((string)parameter) != model_rr_path)
                        {
                            return;
                        }
                    }

                    connected                          = false;
                    gazebo_server                      = null;
                    gazebo_robot                       = null;
                    gazebo_controller                  = null;
                    gazebo_controller_position         = null;
                    gazebo_controller_position_command = null;
                    gazebo_controller_velocity         = null;
                    gazebo_controller_velocity_command = null;
                }

                Console.WriteLine("Connection to gazebo lost");
            }
        }
Esempio n. 2
0
 internal void ClientContextListener(ClientContext context, ClientServiceListenerEventType event_, object param)
 {
     if (event_ == ClientServiceListenerEventType.ClientClosed)
     {
         Shutdown();
     }
 }