[Rock-dev] ruby bindings for RigidBodyState methods

Sylvain Joyeux sylvain.joyeux at dfki.de
Fri Sep 6 16:49:12 CEST 2013


On 09/06/2013 04:42 PM, Leif Christensen wrote:
> Hi,
>
> The c++ RigidBodyState has for example a 'hasValidPosition' method,
> which seems to have no ruby binding
>
> a) Do we have to implement the bindings manually?
> b) Where to implement them (somewhere beneath base/types_ruby?
> base/types/bindings/ruby? Conventions?)
base/types/bindings/ruby. base/types_ruby is a historical artefact that
is going away.
> c) Is there docu on this?
Not really.

There are three ways to get these methods on the Ruby side.

 - write bindings manually using e.g. rice
 - extend the typelib types, e.g. reimplement the C++ methods on the
Ruby side. This is done as typelib plugins, which for the base types lie
in types/bindings/ruby/typelib/blablabla.rb and should be require'd by
types/bindings/ruby/typelib.rb. This method is a bit documented there:
http://rock-robotics.org/master/documentation/runtime/ruby_and_types.html.
The big issue with those is that they currently don't appear in the API
documentation (yuk)
 - write bindings automatically, but this is very experimental ATM

IMO, if the stuff you need on the ruby side is simple, use the typelib
extension method. If it gets to more complicated methods, wrap the type
manually. I hope that in fine the automatic can be hardened and
generalized to all Rock packages.

-- 
Sylvain Joyeux (Dr.Ing.)
Senior Researcher

Space & Security Robotics
Underwater Robotics

!!! Achtung, neue Telefonnummer!!!

Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany

Phone: +49 (0)421 178-454136
Fax:   +49 (0)421 218-454150
E-Mail: robotik at dfki.de

Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.:    DE 148646973
Steuernummer:  19/673/0060/3
----------------------------------------------------------------------- 

-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20130906/0e72b875/attachment.htm 


More information about the Rock-dev mailing list