Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding Yarp Octave binding #316

Merged
merged 1 commit into from
Nov 17, 2014
Merged

Conversation

apaikan
Copy link
Collaborator

@apaikan apaikan commented Nov 16, 2014

Using Yarp from Octave

Swig already supports Octave binding. Thus it is not a bad idea to have Yarp-Octave binding. I have tested some simple examples of using YARP within octave on Linux and it works fine.

The compilation is easy and fine. I have not tested everything in Octave but the Port/BufferedPort reading/writing works correctly.

@paulfitz
Copy link
Member

Looks great, thanks @apaikan! One thing, could you mark the .m examples as being for octave, or we may have matlab users complaining about them not working. Either stick them in an "octave" subdirectory, or put a big clear warning at the start of the source?

@apaikan
Copy link
Collaborator Author

apaikan commented Nov 16, 2014

@paulfitz What about moving all binding example to the $YARP_ROOT/example/bindings under separate folders?. We can have something like:

$YARP_ROOT/example/bindings/perl/example.pl
$YARP_ROOT/example/bindings/python/example.py
$YARP_ROOT/example/bindings/rubby/example.rb
$YARP_ROOT/example/bindings/tcl/example.tcl
$YARP_ROOT/example/bindings/lisp/example.lisp
$YARP_ROOT/example/bindings/lua/example.lua
$YARP_ROOT/example/bindings/octave/example.m
...

we can even populate more useful examples for each language to clear tricky usage of some swig-bound functions. For example, yarp::os::Time::now() should be used in Lua as yarp.Time_now() while in Octave it should be called as yarp.Time.now().

@drdanz
Copy link
Member

drdanz commented Nov 17, 2014

+1 for the patch and +1 for moving the examples (-1 for "rubby", even though I kind of like it, I'd stick for the real name "ruby" :-) ).
I think that the reason the examples are inside the bindings folder is because you can choose to build them from outside yarp (i.e. from the svn just download the bindings folder), but in my opinion it does no longer make sense, and I think we should remove this option, in order to simplify the build and the number of options... Is anyone using it?

paulfitz added a commit that referenced this pull request Nov 17, 2014
@paulfitz paulfitz merged commit 8d68992 into robotology:master Nov 17, 2014
@paulfitz
Copy link
Member

All good points. Merging this as is so it doesn't get blocked and filed a separate issue for renovations #318.

@lornat75
Copy link
Member

Related to bindings compilation, now bindings can compiled directly from yarp, but the documentation does not mention it. I think we should update the bindings instructions.

@apaikan apaikan deleted the octave-binding branch November 19, 2014 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants