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

How to wrap a hardware-driver in ROS

asked 2016-07-24 22:19:19 -0500

A.M Dynamics gravatar image

updated 2018-07-17 21:20:26 -0500

Dear All,

I need to write a ROS wrapper for a driver in ROS. Is there any clear procedure for writhing a ROS wrapper?

What if I consider the driver as ROS library? is it OK? How could I do that?

I could not find any clear tutorial for doing that. Dose anybody know how to do it?

Thanks for any suggestion and help.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-07-18 06:47:13 -0500

I have done this a few times now. It really depends how you can interface with the existing hardware drivers.

If you have a C++ library that can be used to access the hardware then you can create a C++ ROS node that has access to this library so that you can unify the ROS system and the hardware. You'll need to setup the CMakeLists.txt file so that the built can find the header files and the shared object for the library to be able to compile this.

When you have the skeleton of this node building successfully then it's just a case of connecting and disconnecting to the hardware on startup/shutdown and using the appropriate message topics or service servers.

If you can give us some more details of the type of hardware you are attaching to I could give you some more specific details.

edit flag offensive delete link more

Comments

@PeteBlackerThe3rd Thanks for your response.I have to build a mobile robot compatible with ROS. I'll control the robot using a Linux -cased laptop. Therefore, basically, I install the driver and ROS wrapper on Laptop. I also use an embedded system as interface between laptop and motors(EtherCat Com)

A.M Dynamics gravatar image A.M Dynamics  ( 2018-07-18 08:51:15 -0500 )edit

To clarify the hardware in this case is the mobile robot? So you'll need to drive the robot using twist messages on a topic such as /cmd_vel. Possibly monitor battery state, current draws and other such things.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-07-18 10:47:40 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2016-07-24 22:19:19 -0500

Seen: 353 times

Last updated: Jul 18 '18