Anybody used 'GO' to talk to ROS topics?

202 views
Skip to first unread message

Mark Johnston

unread,
Nov 21, 2017, 1:24:12 AM11/21/17
to HomeBrew Robotics Club
Has anybody implemented a piece of their system in GO that can talk either directly to ROS topics on the same linux box ROS is running?
Alternatively anybody sorted out or found a 'working'  GO interface to RosBridge?

Specifically to interface with ROS Kinetic on top of ubuntu 16.04 (on a raspberry Pi 3 bot)

I see some pieces along these lines but most seem like projects that may be only 'interfaces' so far or 'dreams'.  I seek 'reality' (he said to the Guru).

I ask this mostly because the GO implementation of a GATT server is orders of magnitude easier to use than raw BlueZ GATT server (I have setup both before).

My 'real' need is to setup a BLE GATT server on a bot to be able to talk to ROS topic(s) of my bots on raspberry Pi 3 hardware.   

Thanks,
Mark

James Nugen

unread,
Nov 21, 2017, 9:18:50 AM11/21/17
to hbrob...@googlegroups.com
This looks like your best bet. It's not complete, but does have the basics.

Pure Go implementation of ROS client library:

James Nugen


--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+unsubscribe@googlegroups.com.
To post to this group, send email to hbrob...@googlegroups.com.
Visit this group at https://groups.google.com/group/hbrobotics.
For more options, visit https://groups.google.com/d/optout.

JP Abgrall

unread,
Nov 21, 2017, 12:49:03 PM11/21/17
to hbrob...@googlegroups.com
golang does seem very suitable for ROS-like communications.
But triple check that everything you might need is available in the language and packages.

I would not recommend using go for robotics based projects that need low level interactions with the system.
Been there, regretted that. :)
It is fairly rough around the edges, it is not suitable for IO, OS,... and the C interface was not very easy to debug when things went wrong.
We had to 
  write our own termios routines to setup the hardware, 
  write stuff like
     import "golang.org/x/sys/unix"
      ...  unix.Syscall(...)
  debug issues related to C modules not correctly holding on to passed-in structures and then having the garbage collector tear them down while being used.
Our next step is to rewrite everything in C++.

Nowadays, there are external goodies like: https://github.com/pkg/term to duct-tape-and-bubble-gum what is lacking.

--




Mark Johnston

unread,
Nov 22, 2017, 2:12:58 AM11/22/17
to HomeBrew Robotics Club

I had run across what James pointed out and was sort of asking for an endorsement although I will 'go there'  so to speak and give it a try knowing I may have to scrap the effort  (Ya gotta know when to fold).

Again, my high layer goal is to get a friendly easy to code to BLE Gatt server that can communicate with ROS.  The GO example is easy to understand relative to use of the clumbsy full BlueZ.  Both of these would have to be 'duct tape' attached to ROS at this time I fear.

I'm not trying to code my bots in GO.    Just trying to leverage what looks like an easier to support BLE gatt server subsystem and 'duct tape' it into my bots.
Best case is if the darn thing could talk in ROS topics.    If not, 'duct tape required'.

Thanks for your inputs,
Mark

Mark Johnston

unread,
Nov 28, 2017, 4:53:46 AM11/28/17
to HomeBrew Robotics Club
Current Findings:   rosgo by akio does not seem to be ready for 'prime time'.

The github is: https://github.com/akio/rosgo     Of note is this was last updated 2 years ago.

When I do the make I get:   Could not find the required component 'rosgo_messages'
The above indicates as of May 2016 at least one other person felt is was incomplete at a minimum lacking a message generator (this aligns with my error)

The github page is same as http://wiki.ros.org/rosgo in 'documentation'  now the term 'documentation' is a stretch at best, it is poorly or rather minimally documented with 5 lines or so.

Unless I get corrected, I feel that rosgo was an effort where not all of it was pushed to github or perhaps was a dev effort never completed.

If I do choose to use golang for the GATT server it will be a duct tape effort I am afraid but then again, so would use of bluez

I will search a little for integration of bluez with ROS then 'bake my own' I guess.

Mark



Reply all
Reply to author
Forward
0 new messages