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

About driver on ROS

asked 2014-12-10 06:57:57 -0500

pcler gravatar image

Hello everyone! Thesedays I am thinking of applying ROS on a simple arm we made. I uses a device to connect the motors with my computer. But that device has no driver for ROS. But I found its driver for linux.

So it means I need to re-write a driver on ROS for this device, right? Can I use that driver for linux and simply include it in my ROS code?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-12-10 07:00:03 -0500

dornhege gravatar image

Basically yes. That is usually how I do it.

edit flag offensive delete link more

Comments

Thank you for answering! If I could get the source code of that device's driver for linux, how can I make use of it? Should I create a "bridge" node inside the ROS or something to make use of it?

pcler gravatar image pcler  ( 2014-12-10 07:26:01 -0500 )edit

Is this a device driver in form of a kernel module or similar OR a driver that is just a program in userland?

dornhege gravatar image dornhege  ( 2014-12-10 07:46:21 -0500 )edit

Usually you'd just write a ROS node that is the driver code (user), but instead of whatever interface it currently uses, e.g. text output, you'd send and receive ROS messages.

dornhege gravatar image dornhege  ( 2014-12-10 07:47:44 -0500 )edit

I have asked for more information. Now we got a .o file for linux kernel module driver and multiple .so Dynamic Loaded Library files. And a .h head file is given for using its API in linux. Could you please tell me how to make use of these things on ROS? I am a new guy. Thank you sincerely!!!

pcler gravatar image pcler  ( 2014-12-11 11:06:48 -0500 )edit

As a start you must have some kind of user space program (non-ROS) that talks to your hardware. This you have to figure out for yourself. The next step would be to build that same thing with ROS.

dornhege gravatar image dornhege  ( 2014-12-11 11:25:11 -0500 )edit

Once you are there identify what interfaces you'd like to have in ROS and just add these as in the basic tutorials.

dornhege gravatar image dornhege  ( 2014-12-11 11:25:43 -0500 )edit

Thank you so much! Now I am looking into it...

pcler gravatar image pcler  ( 2014-12-13 07:57:40 -0500 )edit

Could you help me again? I have got a driver for linux and a .so dynamic library in /lib. Now I can run the user-space program thing on linux. And I am changing it into ROS. But there is question that how to include that .so dynamic library by editing CMakeLists? I can use gcc -l to include that .so

pcler gravatar image pcler  ( 2014-12-17 00:27:41 -0500 )edit

Question Tools

Stats

Asked: 2014-12-10 06:57:57 -0500

Seen: 165 times

Last updated: Dec 10 '14