About Bottle.class for Matlab

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

About Bottle.class for Matlab

เปี๊ยก ....
Dear Zhenli

I just set up Yarp for Matlab.
At this moment, I can install them already.
Now I can LoadYarp and connect Yarp to other terminal.

The example yarp_write can work perfectly.
However, I found some problem in yarp_read.

The problem come from Bottle.class.
I can create bottle, but I cannot access the value inside bottle.
I tried to find some in formation in the mailing list, unfortunately, I cannot find it. 

I would like to know how can Matlab get the value from other program or terminal through Yarp.

Here is the result when I try to use the sample from website

>> LoadYarp
b=yarp.Bottle
b.fromString('hello from MATLAB')
Yarp library loaded and initialized
 
ans =
 
LoadYarp@bdb375
 
 
b =
 
yarp.Bottle@82e4f3
 
>> b
 
b =
 
yarp.Bottle@82e4f3


I can send this b to other terminal, and the other terminal can show them well, but I cannot show b in the matlab.
The yarp_read example give the same result.

Best regards
Papat Fungtammasan

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers
Reply | Threaded
Open this post in threaded view
|

Re: About Bottle.class for Matlab

leo_pape
Hi Papat Fungtammasan,

a Bottle is a Java object. To see its contents as a String, use

b.toString_c()

in your example.

--Leo
Reply | Threaded
Open this post in threaded view
|

Re: About Bottle.class for Matlab

zhenli
In reply to this post by เปี๊ยก ....
Dear Papat Fungtammasan,
   CC:Leo.
   Just try to use b.toString_c().
   Leo,Stephane and Juan give me more help during the
installation.
    Cheers.
    Zhenli
   

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers
Reply | Threaded
Open this post in threaded view
|

Re: About Bottle.class for Matlab

Hector
In reply to this post by เปี๊ยก ....
Dear all
I am not sure whether this problem was solved. I am having the same information when I try to read Bottle from Matlab.
Testing "yarp_read.m", I already tried using
   
    b.toString()
The output I always got is

yarp.Bottle@82e4f3

Any further guide about this problem will be very appreciated

Hector
Reply | Threaded
Open this post in threaded view
|

Re: About Bottle.class for Matlab

paulfitz
Administrator
Hi Hector,

Try doing:
   b.toString_c()
instead.

At some point, the name collision between YARP's C++ toString method and
Java's native toString method caused problems, so bindings/yarp.i
renames YARP's toString method as toString_c.  Hopefully at some point a
Java programmer will figure out a more elegant solution.

Hope this helps,
Paul

On 12/14/2012 03:53 AM, Hector wrote:

> Dear all
> I am not sure whether this problem was solved. I am having the same
> information when I try to read Bottle from Matlab.
> Testing "yarp_read.m", I already tried using
>
>      b.toString()
> The output I always got is
>
> yarp.Bottle@82e4f3
>
> Any further guide about this problem will be very appreciated
>
> Hector
>
>


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers