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

Using non-supported hardware in a ROS system

asked 2017-07-24 11:19:15 -0500

JackBall gravatar image

I'm trying to integrate a small radiation detector into a robot's sensory system, and am very new to both ROS (indigo) and Linux (Ubuntu 14.04).

The detector came with files and folders (containing various CMakeLists, .cpp, and .h files) I used to build the device driver for it so that it could work on a Linux system. It has a driver module (.ko file) and its own library (.so file); all I did to compile the library was use "cmake" while in its main folder, "make install" to install the driver module while in the driver module file, and then added a rule in /etc/udev/rules.d to disconnect it from the standard USB driver and connect it to the driver I installed.

I would like to be able to use the data coming from the detector in a ROS system, which I think means that it just needs to be able to publish on a ROS topic. The question I have is: what would be the easiest/smartest way to go about making this happen?

I have heard I could write a ROS wrapper for the device and include it as a node in some sensory package, and I have heard I can just write a script that includes roscpp and run a loop to publish incoming data. If this is too general a question, or if more information is needed to provide an answer, let me know and I'll gladly try to accommodate. Any help would be much appreciated!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-07-24 13:59:39 -0500

allenh1 gravatar image

I have heard I could write a ROS wrapper for the device and include it as a node in some sensory package, and I have heard I can just write a script that includes roscpp and run a loop to publish incoming data.

You heard correct! That's going to be the general idea here. You'll likely have to define a custom message type for your sensor (see tutorials here and here), but, essentially, you will just read the data from the sensor, fill in your custom message, then publish the message with a ROS publisher.

edit flag offensive delete link more

Comments

Thanks for the response, this makes the path much clearer to me. In order to read data from the detector, I have to use a command from the custom library for the detector driver; if I'm doing this all in a catkin package, will the package be able to recognize this detector-specific command?

JackBall gravatar image JackBall  ( 2017-07-25 14:19:26 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2017-07-24 11:19:15 -0500

Seen: 215 times

Last updated: Jul 24 '17