Write node on ROS with .ko kernel driver and .so dynamic link library

asked 2014-12-17 08:57:34 -0500

pcler gravatar image

Recently we are using a USB-Can device to control the motors and considering apply ROS on it. Now we have a .ko kernel driver for the USB-Can on Linux /lib/modules/linux-image-3.13.0-24-generic/kernel/drivers/usb AND a .so dynamic link library on Linux /usr/lib. We are also provided for a .h head file to use the function in dynamic link library.

Here we have two problems: [1] The dynamic link library is not compatible with C++ but works fine with C. I can write a C language node but ros/ros.h is not compatible with C. An error about a string library arises. Does anyone know how to solve it? [2] I can write a program in C on Linux to test the device. It works fine. But every time I run the program, I have to get the root permission first. So I can image that even though I can catkin_make a node, but this node will not work fine because of the permission issue. Could you please tell me how can I go through this?

I am still learning about the basic of ROS. Thank you all that make any suggestion. Best wishes!

edit retag flag offensive close merge delete