ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Simple publisher from Windows?

asked 2011-08-24 10:10:11 -0500

Geaelith gravatar image

updated 2014-01-28 17:10:17 -0500

ngrennan gravatar image

I have a piece of hardware (a HID/joystick) that only has windows drivers. It came with a C/C++ SDK, so I can write code on the windows side for it. Unfortunately, the .dll that contains all the commands only works on windows.

I'd like to just publish the data from it to a roscore running on a linux machine. I don't need the core or tools or anything else.

What's the best way for me to do this? And what files will I need?

I've looked over the win_ros tutorials and the MinGW cross-compiling option (obviously) is not suitable.

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted

answered 2011-08-28 15:54:25 -0500

Daniel Stonier gravatar image

updated 2011-11-18 13:51:02 -0500

We're experimenting with a msvc ros_comms sdk. It's not official yet, but if you want to just quickly jump in and test, you can download the sdk zip from the files section on win-ros-pkg. More information on the roswki : Installation/Windows

Compiling and linking against that sdk from an msvc project will let you run a publisher using one of the common msg stacks we've included (std_msgs/navi_msgs/geometry_msgs). If you need a custom msg format, simply generate your headers in linux and then copy the msg_gen/cpp/include/__pkg__ directory into the sdk's include directory on your windows box.

The sdk is a debug, 32 bit msvc dll, built against the code in ros' electric release. It's also possible to build everything from scratch on windows using cmake, but that's a bit more difficult and still a bit volatile.

edit flag offensive delete link more

answered 2011-08-28 21:29:17 -0500

Poseidonius gravatar image


I had have a problems with Linux drivers for a measurement card that is well supported on Windows. So, first I tried the win-ros-pkg with the same result as you. Afterwards I discover the simple python workaround on

that needs only a transfer of a number of python files to the Windows PC. Afterwards you can implement a python publisher communicating your joystick data.

Best wishes


edit flag offensive delete link more


Yep, this also works. We've done similarly with python.
Daniel Stonier gravatar image Daniel Stonier  ( 2011-08-28 22:04:24 -0500 )edit

answered 2011-08-29 04:29:30 -0500

embeddedheaven gravatar image

Maybe this is the one you are looking for.AN port of ROS in Window Vista and 7, not available in XP <-- I have try it.

edit flag offensive delete link more


That one is running off cturtle code and as you say, wouldn't run on xp. Would've been nice if they'd merged the code back into ros, but unfortunately it fell by the side after diamondback. The win-ros-pkg is running off code ported inside ros itself, so would be good if that could get some testing.
Daniel Stonier gravatar image Daniel Stonier  ( 2011-08-29 14:58:30 -0500 )edit

answered 2011-08-25 10:46:46 -0500

davo gravatar image


have you tried the linux joystick teleop tutorials they have some tests for linux joysticks and debug buttons/axis to the console i'm using a saitek av8r -02 which on a pc windows uses an xbox360 driver and none for linux. alot of hid keyboards/ joysticks adhere to a config file, and then get tailored and/or extended.


plug in, ls -l /dev/input/js*

note the number, my mousepad on the laptop appears as a joystick js0 that threw me for a bit, but js1 is my device

what was good

ls -l /dev/input/jsX where x is the number you noted from above, also you might need to change permissions on that device file ....see the guide

the jstest in the above guide will give you a good idea of what buttons/ axis do and what they map too, also very dirty cat /dev/input/jsX some dirty characters come up I think you can redirect them into a hex app ....but jstest is better

the ros drivers topics etc also give good debug data if you can get that far.

do n't forget to run that rosparam setting in the guide for the ros

I'm running a custom teleop on this joystick via virtualbox hosted on windows 7 so it may well be doable

goodluck Dave

edit flag offensive delete link more


The problem with this approach is that the device has to be initialized via USB before it can provide the data I'm interested in. The initialization process is unknown, and contained in the .dll . It shows up in linux, but only has partial functionality (the part I'm not interested in)
Geaelith gravatar image Geaelith  ( 2011-08-25 11:53:42 -0500 )edit

Question Tools


Asked: 2011-08-24 10:10:11 -0500

Seen: 1,205 times

Last updated: Nov 18 '11