Bug #2002

Add ForcesQueue to rsb-matlab 0.9

Added by Anonymous almost 7 years ago. Updated almost 7 years ago.

Status:ResolvedStart date:09/16/2014
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Matlab
Target version:rsb-0.9

Description

Add ForcesQueue to rsb-matlab 0.9 in order to be able to receive rst.dynamics.Forces in Matlab.
Probably use PoseQueue etc. as template.

Then port to master.

ForcesQueue.java Magnifier (867 Bytes) Anonymous, 09/17/2014 01:21 PM

ForcesQueue.java Magnifier (867 Bytes) Anonymous, 09/17/2014 01:21 PM

Example3.cpp Magnifier - controllers used in webots (5.5 KB) K. Narioka, 09/17/2014 02:31 PM

History

#1 Updated by Anonymous almost 7 years ago

  • Assignee set to Anonymous

#2 Updated by Anonymous almost 7 years ago

#3 Updated by K. Narioka almost 7 years ago

I have put rsb-m-0.11.0.jar in /vol/amarsi/x86-64-precise/trunk/share/java/ and referred it by adding the path in the function getRSBed. An error occurs with a function rsbWrite, which works well with the previous version of rsb-m (rsb-m-0.10.0.jar). Error message is as following.

>> getRSBed();
>> rInformer = rsbOpenInformer('/cca/comp/OncillaWorld/statechange/');
>> rsbWrite(rInformer, 32, 'rst.generic.ValueType', 'Value', 'INT');

Error using rsb.Informer/send
Java exception occurred:
rsb.converter.ConversionException: rsb.converter.NoSuchConverterException: No
converter with key rst.generic.ValueType$Value registered in ConverterMap
    at
        rsb.protocol.ProtocolConversion.serializeEventData(ProtocolConversion.java:129)
            at
        rsb.transport.socket.SocketOutConnector.push(SocketOutConnector.java:74)
            at
        rsb.eventprocessing.DefaultOutRouteConfigurator.publishSync(DefaultOutRouteConfigurator.java:62)
            at rsb.Informer$InformerStateActive.send(Informer.java:156)
    at rsb.Informer$InformerStateActive.send(Informer.java:165)
    at rsb.Informer.send(Informer.java:302)
Caused by: rsb.converter.NoSuchConverterException: No converter with key
rst.generic.ValueType$Value registered in ConverterMap
    at
        rsb.converter.UnambiguousConverterMap.getConverter(UnambiguousConverterMap.java:49)
            at
        rsb.protocol.ProtocolConversion.serializeEventData(ProtocolConversion.java:123)
            ... 5 more

Error in rsbWrite (line 21)
informer.send(b.build);

#4 Updated by K. Narioka almost 7 years ago

It is still not working properly with rsb-m-0.11.0.jar to receive force information.

>> getRSBed();
>> fListener = rsbOpenListener('/oncilla/supervisor/force', 'ForcesQueue');

--
Sep 17, 2014 2:26:47 PM rsb.transport.socket.SocketInPushConnector handle
WARNING: Error while dispatching notification to registered handlers. Ignoring this.
rsb.converter.NoSuchConverterException: No converter with key .rst.dynamics.Forces registered in ConverterMap
    at rsb.converter.UnambiguousConverterMap.getConverter(UnambiguousConverterMap.java:49)
    at rsb.protocol.ProtocolConversion.fromNotification(ProtocolConversion.java:202)
    at rsb.transport.socket.SocketInPushConnector.handle(SocketInPushConnector.java:112)
    at rsb.transport.socket.BusBase.handleLocally(BusBase.java:336)
    at rsb.transport.socket.BusServer.handleIncoming(BusServer.java:218)
    at rsb.transport.socket.BusBase$ReceiveThread.doOneNotification(BusBase.java:111)
    at rsb.transport.socket.BusBase$ReceiveThread.run(BusBase.java:162)
--

this warning message is repeatedly displayed until stopping webots simulator.

#5 Updated by J. Wienke almost 7 years ago

So for the Matlab problem, you are missing the converter registration. This can be done as visible in the examples, i.e.:

rsb.matlab.ConverterRegistration.register('rst.generic.ValueType', 'Value')

This needs to be done before you create any informer or listener.

#6 Updated by J. Wienke almost 7 years ago

You need to use the following to receive forces:

rsb.matlab.ConverterRegistration.register('rst.dynamics.ForcesType', 'Forces')

#7 Updated by K. Narioka almost 7 years ago

It's working after the converter registration. Thanks a lot for your help!

#8 Updated by Anonymous almost 7 years ago

  • Status changed from New to Resolved

Also available in: Atom PDF