logo logo
Inicio arrow Foros...
Wednesday, 07 de January de 2009
 
 
English English  Español Español  
Próximos Eventos
10.Jun. 2009

IWANN 2009
Salamanca, Spain
11.Jun. 2009

Toward a Science of Consciousness
Hong Kong, China
14.Jun. 2009

International Workshop on Machine Consciousness
Hong Kong, China
15.Jun. 2009

The 8th IEEE International Conference on Cognitive Informatics
Hong Kong, China
22.Jun. 2009

IWINAC 2009
Santiago de Compostela, Spain
Etiquetas
Análisis Artificial Científicos Conciencia Consciencia Consciencia Artificial Conscientes Consciousness Developer Documentación Documentation Español Howto Investigación Publicaciones Reviews Robotics Robots Robótica Servicios Spanish Studio VPL artificial
Destacados
Conscious-Robots.com Forum  


Raúl
Moderador

Moderador
Mensajes: 444
graph
Karma: 6  
Re:simulated sonar, states and operations - 2008/08/28 15:08 Well, what you probably want is to subscribe to the sonar service and get notifications when its states changes, i.e. get the new sonar readings when they robot has moved (or something moved in front of the sonar).

In order to do that, you should use the generic contract for sonar and declare a parter of your service, something like this:

Code:

 // Raul - Sonar generic contract using pxsonar Microsoft.Robotics.Services.Sonar.Proxy; ... [Partner("Sonar"Contract pxsonar.Contract.IdentifierCreationPolicy PartnerCreationPolicy.UseExisting)] pxsonar.SonarOperations _sonarPort =                   new pxsonar.SonarOperations(); pxsonar.SonarOperations _sonarNotify =                   new pxsonar.SonarOperations(); ... // Within your start() method, maybe within an Interleave: Arbiter.ReceiveWithIterator<pxsonar.Replace>(true_sonarNotifyOnSonarReplaceHandler),



Have a look to the service tutorials if you have doubts about how the subscription works. Then, you could find useful to have a look to my code in ExplorerSimSonar that uses the Simulated Sonar.

Remember that you _mainport is for your own service opeations. For sonar notifications you declare another port as shown above.

Post edited by: Raúl, at: 2008/08/28 15:09
Raúl Arrabales Moreno. conscious-robots.com/raul
  El administrador ha deshabilitado la escritura de mensajes a los usuarios no registrados.

      Temas Autor Fecha
    thread link
simulated sonar, states and operations
carlcs 2008/08/27 17:21
    emo
thread linkthread link Re:simulated sonar, states and operations
Raúl 2008/08/28 09:44
    thread link
thread linkthread link Re:simulated sonar, states and operations
carlcs 2008/08/28 12:22
    thread link
thread linkthread link Re:simulated sonar, states and operations
carlcs 2008/08/28 13:29
    emo
thread linkthread linkthread link Re:simulated sonar, states and operations
Raúl 2008/08/28 15:08
    thread link
thread linkthread linkthread linkthread link Re:simulated sonar, states and operations
carlcs 2008/08/28 16:40
Titulares RSS
 Conscious Robots RSS FeedFuente RSS de Conscious Robots





¿Recuperar contraseña?
¿Quieres registrarte? Hazlo aquí
Mensajes en el Foro
 
Top!
Advertising links: Credit Cards - Arizona Pools - Loans - Guitar Books
Top!