0
$\begingroup$

Rosanswers logo

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!


Originally posted by JackBall on ROS Answers with karma: 1 on 2017-07-24

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by allenh1 with karma: 3055 on 2017-07-24

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by JackBall on 2017-07-25:
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?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.