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

Simple publisher from Windows?

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

Geaelith gravatar image

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

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
5

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

Daniel Stonier gravatar image

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

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
1

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

Poseidonius gravatar image

Hi,

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

http://www.ros.org/wiki/cturtle/Installation/Windows

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

Poseidonius

edit flag offensive delete link more

Comments

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

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

embeddedheaven gravatar image

http://www.servicerobotics.eu/index.php?id=37

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

Comments

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 -0600 )edit
0

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

davo gravatar image

hiya,

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.

try http://www.ros.org/wiki/joy/Tutorials/ConfiguringALinuxJoystick

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 ....watch 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

Comments

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 -0600 )edit

Question Tools

Stats

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

Seen: 1,348 times

Last updated: Nov 18 '11